aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/switchdev.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-01-12 21:57:02 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-12 21:57:02 -0500
commitaee3bfa3307cd0da2126bdc0ea359dabea5ee8f7 (patch)
tree3d35c69e8fa835098bb90f77f30abed120681651 /include/net/switchdev.h
parentc597b6bcd5c624534afc3df65cdc42bb05173bca (diff)
parent415b6f19e87e350b13585591859d4fdf50772229 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from Davic Miller: 1) Support busy polling generically, for all NAPI drivers. From Eric Dumazet. 2) Add byte/packet counter support to nft_ct, from Floriani Westphal. 3) Add RSS/XPS support to mvneta driver, from Gregory Clement. 4) Implement IPV6_HDRINCL socket option for raw sockets, from Hannes Frederic Sowa. 5) Add support for T6 adapter to cxgb4 driver, from Hariprasad Shenai. 6) Add support for VLAN device bridging to mlxsw switch driver, from Ido Schimmel. 7) Add driver for Netronome NFP4000/NFP6000, from Jakub Kicinski. 8) Provide hwmon interface to mlxsw switch driver, from Jiri Pirko. 9) Reorganize wireless drivers into per-vendor directories just like we do for ethernet drivers. From Kalle Valo. 10) Provide a way for administrators "destroy" connected sockets via the SOCK_DESTROY socket netlink diag operation. From Lorenzo Colitti. 11) Add support to add/remove multicast routes via netlink, from Nikolay Aleksandrov. 12) Make TCP keepalive settings per-namespace, from Nikolay Borisov. 13) Add forwarding and packet duplication facilities to nf_tables, from Pablo Neira Ayuso. 14) Dead route support in MPLS, from Roopa Prabhu. 15) TSO support for thunderx chips, from Sunil Goutham. 16) Add driver for IBM's System i/p VNIC protocol, from Thomas Falcon. 17) Rationalize, consolidate, and more completely document the checksum offloading facilities in the networking stack. From Tom Herbert. 18) Support aborting an ongoing scan in mac80211/cfg80211, from Vidyullatha Kanchanapally. 19) Use per-bucket spinlock for bpf hash facility, from Tom Leiming. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1375 commits) net: bnxt: always return values from _bnxt_get_max_rings net: bpf: reject invalid shifts phonet: properly unshare skbs in phonet_rcv() dwc_eth_qos: Fix dma address for multi-fragment skbs phy: remove an unneeded condition mdio: remove an unneed condition mdio_bus: NULL dereference on allocation error net: Fix typo in netdev_intersect_features net: freescale: mac-fec: Fix build error from phy_device API change net: freescale: ucc_geth: Fix build error from phy_device API change bonding: Prevent IPv6 link local address on enslaved devices IB/mlx5: Add flow steering support net/mlx5_core: Export flow steering API net/mlx5_core: Make ipv4/ipv6 location more clear net/mlx5_core: Enable flow steering support for the IB driver net/mlx5_core: Initialize namespaces only when supported by device net/mlx5_core: Set priority attributes net/mlx5_core: Connect flow tables net/mlx5_core: Introduce modify flow table command net/mlx5_core: Managing root flow table ...
Diffstat (limited to 'include/net/switchdev.h')
-rw-r--r--include/net/switchdev.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index 1d22ce9f352e..d451122e8404 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -47,9 +47,11 @@ enum switchdev_attr_id {
47 SWITCHDEV_ATTR_ID_PORT_STP_STATE, 47 SWITCHDEV_ATTR_ID_PORT_STP_STATE,
48 SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS, 48 SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS,
49 SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME, 49 SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME,
50 SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING,
50}; 51};
51 52
52struct switchdev_attr { 53struct switchdev_attr {
54 struct net_device *orig_dev;
53 enum switchdev_attr_id id; 55 enum switchdev_attr_id id;
54 u32 flags; 56 u32 flags;
55 union { 57 union {
@@ -57,6 +59,7 @@ struct switchdev_attr {
57 u8 stp_state; /* PORT_STP_STATE */ 59 u8 stp_state; /* PORT_STP_STATE */
58 unsigned long brport_flags; /* PORT_BRIDGE_FLAGS */ 60 unsigned long brport_flags; /* PORT_BRIDGE_FLAGS */
59 u32 ageing_time; /* BRIDGE_AGEING_TIME */ 61 u32 ageing_time; /* BRIDGE_AGEING_TIME */
62 bool vlan_filtering; /* BRIDGE_VLAN_FILTERING */
60 } u; 63 } u;
61}; 64};
62 65
@@ -65,9 +68,11 @@ enum switchdev_obj_id {
65 SWITCHDEV_OBJ_ID_PORT_VLAN, 68 SWITCHDEV_OBJ_ID_PORT_VLAN,
66 SWITCHDEV_OBJ_ID_IPV4_FIB, 69 SWITCHDEV_OBJ_ID_IPV4_FIB,
67 SWITCHDEV_OBJ_ID_PORT_FDB, 70 SWITCHDEV_OBJ_ID_PORT_FDB,
71 SWITCHDEV_OBJ_ID_PORT_MDB,
68}; 72};
69 73
70struct switchdev_obj { 74struct switchdev_obj {
75 struct net_device *orig_dev;
71 enum switchdev_obj_id id; 76 enum switchdev_obj_id id;
72 u32 flags; 77 u32 flags;
73}; 78};
@@ -109,6 +114,16 @@ struct switchdev_obj_port_fdb {
109#define SWITCHDEV_OBJ_PORT_FDB(obj) \ 114#define SWITCHDEV_OBJ_PORT_FDB(obj) \
110 container_of(obj, struct switchdev_obj_port_fdb, obj) 115 container_of(obj, struct switchdev_obj_port_fdb, obj)
111 116
117/* SWITCHDEV_OBJ_ID_PORT_MDB */
118struct switchdev_obj_port_mdb {
119 struct switchdev_obj obj;
120 unsigned char addr[ETH_ALEN];
121 u16 vid;
122};
123
124#define SWITCHDEV_OBJ_PORT_MDB(obj) \
125 container_of(obj, struct switchdev_obj_port_mdb, obj)
126
112void switchdev_trans_item_enqueue(struct switchdev_trans *trans, 127void switchdev_trans_item_enqueue(struct switchdev_trans *trans,
113 void *data, void (*destructor)(void const *), 128 void *data, void (*destructor)(void const *),
114 struct switchdev_trans_item *tritem); 129 struct switchdev_trans_item *tritem);