aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2016-08-25 12:42:37 -0400
committerDavid S. Miller <davem@davemloft.net>2016-08-26 16:13:36 -0400
commit6bc506b4fb065eac3d89ca1ce37082e174493d9e (patch)
treeb2ce45bcdf47c388d9d0977af7bf511685a00e6e /include/linux/netdevice.h
parent5c326ab49e5ee014ba5314c076fe9b93fd8b0406 (diff)
bridge: switchdev: Add forward mark support for stacked devices
switchdev_port_fwd_mark_set() is used to set the 'offload_fwd_mark' of port netdevs so that packets being flooded by the device won't be flooded twice. It works by assigning a unique identifier (the ifindex of the first bridge port) to bridge ports sharing the same parent ID. This prevents packets from being flooded twice by the same switch, but will flood packets through bridge ports belonging to a different switch. This method is problematic when stacked devices are taken into account, such as VLANs. In such cases, a physical port netdev can have upper devices being members in two different bridges, thus requiring two different 'offload_fwd_mark's to be configured on the port netdev, which is impossible. The main problem is that packet and netdev marking is performed at the physical netdev level, whereas flooding occurs between bridge ports, which are not necessarily port netdevs. Instead, packet and netdev marking should really be done in the bridge driver with the switch driver only telling it which packets it already forwarded. The bridge driver will mark such packets using the mark assigned to the ingress bridge port and will prevent the packet from being forwarded through any bridge port sharing the same mark (i.e. having the same parent ID). Remove the current switchdev 'offload_fwd_mark' implementation and instead implement the proposed method. In addition, make rocker - the sole user of the mark - use the proposed method. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 794bb0733799..d122be9345c7 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1562,8 +1562,6 @@ enum netdev_priv_flags {
1562 * 1562 *
1563 * @xps_maps: XXX: need comments on this one 1563 * @xps_maps: XXX: need comments on this one
1564 * 1564 *
1565 * @offload_fwd_mark: Offload device fwding mark
1566 *
1567 * @watchdog_timeo: Represents the timeout that is used by 1565 * @watchdog_timeo: Represents the timeout that is used by
1568 * the watchdog (see dev_watchdog()) 1566 * the watchdog (see dev_watchdog())
1569 * @watchdog_timer: List of timers 1567 * @watchdog_timer: List of timers
@@ -1814,9 +1812,6 @@ struct net_device {
1814#ifdef CONFIG_NET_CLS_ACT 1812#ifdef CONFIG_NET_CLS_ACT
1815 struct tcf_proto __rcu *egress_cl_list; 1813 struct tcf_proto __rcu *egress_cl_list;
1816#endif 1814#endif
1817#ifdef CONFIG_NET_SWITCHDEV
1818 u32 offload_fwd_mark;
1819#endif
1820 1815
1821 /* These may be needed for future network-power-down code. */ 1816 /* These may be needed for future network-power-down code. */
1822 struct timer_list watchdog_timer; 1817 struct timer_list watchdog_timer;