lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Thu, 22 Jan 2015 20:33:21 -0800
	Roopa Prabhu <>
Subject: [PATCH net-next v3 0/5] switchdev offload flags

From: Roopa Prabhu <>

This patch series introduces new offload flags for switchdev.
Kernel network subsystems can use this flag to accelerate
kernel network functions by offloading to hw.

I expect that there will be need for subsystem specific feature
flag in the future.

This patch series currently only addresses bridge driver link
attribute offloads to hardware.

Looking at the current state of bridge l2 offload in the kernel,
    - flag 'self' is the way to directly manage the bridge device in hw via
      the ndo_bridge_setlink/ndo_bridge_getlink calls

    - flag 'master' is always used to manage the in kernel bridge devices
      via the same ndo_bridge_setlink/ndo_bridge_getlink calls

Today these are used separately. The nic offloads use hwmode "vepa/veb" to go
directly to hw with the "self" flag.

At this point i am trying not to introduce any new user facing flags/attributes.
In the model where we want the kernel bridging to be accelerated with
hardware, we very much want the bridge driver to be involved.

In this proposal,
- The offload flag/bit helps switch asic drivers to indicate that they
  accelerate the kernel networking objects/functions
- The user does not have to specify a new flag to do so. A bridge created with
  switch asic ports will be accelerated if the switch driver supports it.
- The user can continue to directly manage l2 in nics (ixgbe) using the
  existing hwmode/self flags
- It also does not stop users from using the 'self' flag to talk to the
  switch asic driver directly
- Involving the bridge driver makes sure the add/del notifications to user
  space go out after both kernel and hardware are programmed

(To selectively offload bridge port attributes,
example learning in hw only etc, we can introduce offload bits for
per bridge port flag attribute as in my previous patch I have not included that in this

   - try a different name for the offload flag/bit
   - tries to solve the stacked netdev case by traversing the lowerdev
     list to reach the switch port

v3 -
    - Tested with bond as bridge port for the stacked device case.
      Includes a bond_fix_features change to not ignore the
    - Some checkpatch fixes

Signed-off-by: Roopa Prabhu <>

Roopa Prabhu (5):
  netdev: introduce new NETIF_F_HW_NETFUNC_OFFLOAD feature flag for
    switch device offloads
  swdevice: add new api to set and del bridge port attributes
  bridge: offload bridge port attributes to switch asic if feature flag
  rocker: set feature NETIF_F_HW_NETFUNC_OFFLOAD
  bonding: handle NETIF_F_HW_NETFUNC_OFFLOAD flag to bonding feature

 drivers/net/bonding/bond_main.c               |    6 ++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |    2 +-
 drivers/net/ethernet/rocker/rocker.c          |    5 +-
 include/linux/netdev_features.h               |    6 ++-
 include/linux/netdevice.h                     |    4 +-
 include/net/switchdev.h                       |   17 +++++-
 net/bridge/br_netlink.c                       |   30 +++++++++--
 net/bridge/br_private.h                       |    4 +-
 net/core/rtnetlink.c                          |   10 ++--
 net/switchdev/switchdev.c                     |   70 +++++++++++++++++++++++++
 10 files changed, 135 insertions(+), 19 deletions(-)


To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists