aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/switchdev.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-05 13:11:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-05 13:11:24 -0400
commit687ee0ad4e897e29f4b41f7a20c866d74c5e0660 (patch)
treeb31a2af35c24a54823674cdd126993b80daeac67 /include/net/switchdev.h
parent3ddf40e8c31964b744ff10abb48c8e36a83ec6e7 (diff)
parent03a1eabc3f54469abd4f1784182851b2e29630cc (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: 1) BBR TCP congestion control, from Neal Cardwell, Yuchung Cheng and co. at Google. https://lwn.net/Articles/701165/ 2) Do TCP Small Queues for retransmits, from Eric Dumazet. 3) Support collect_md mode for all IPV4 and IPV6 tunnels, from Alexei Starovoitov. 4) Allow cls_flower to classify packets in ip tunnels, from Amir Vadai. 5) Support DSA tagging in older mv88e6xxx switches, from Andrew Lunn. 6) Support GMAC protocol in iwlwifi mwm, from Ayala Beker. 7) Support ndo_poll_controller in mlx5, from Calvin Owens. 8) Move VRF processing to an output hook and allow l3mdev to be loopback, from David Ahern. 9) Support SOCK_DESTROY for UDP sockets. Also from David Ahern. 10) Congestion control in RXRPC, from David Howells. 11) Support geneve RX offload in ixgbe, from Emil Tantilov. 12) When hitting pressure for new incoming TCP data SKBs, perform a partial rathern than a full purge of the OFO queue (which could be huge). From Eric Dumazet. 13) Convert XFRM state and policy lookups to RCU, from Florian Westphal. 14) Support RX network flow classification to igb, from Gangfeng Huang. 15) Hardware offloading of eBPF in nfp driver, from Jakub Kicinski. 16) New skbmod packet action, from Jamal Hadi Salim. 17) Remove some inefficiencies in snmp proc output, from Jia He. 18) Add FIB notifications to properly propagate route changes to hardware which is doing forwarding offloading. From Jiri Pirko. 19) New dsa driver for qca8xxx chips, from John Crispin. 20) Implement RFC7559 ipv6 router solicitation backoff, from Maciej Żenczykowski. 21) Add L3 mode to ipvlan, from Mahesh Bandewar. 22) Support 802.1ad in mlx4, from Moshe Shemesh. 23) Support hardware LRO in mediatek driver, from Nelson Chang. 24) Add TC offloading to mlx5, from Or Gerlitz. 25) Convert various drivers to ethtool ksettings interfaces, from Philippe Reynes. 26) TX max rate limiting for cxgb4, from Rahul Lakkireddy. 27) NAPI support for ath10k, from Rajkumar Manoharan. 28) Support XDP in mlx5, from Rana Shahout and Saeed Mahameed. 29) UDP replicast support in TIPC, from Richard Alpe. 30) Per-queue statistics for qed driver, from Sudarsana Reddy Kalluru. 31) Support BQL in thunderx driver, from Sunil Goutham. 32) TSO support in alx driver, from Tobias Regnery. 33) Add stream parser engine and use it in kcm. 34) Support async DHCP replies in ipconfig module, from Uwe Kleine-König. 35) DSA port fast aging for mv88e6xxx driver, from Vivien Didelot. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1715 commits) mlxsw: switchx2: Fix misuse of hard_header_len mlxsw: spectrum: Fix misuse of hard_header_len net/faraday: Stop NCSI device on shutdown net/ncsi: Introduce ncsi_stop_dev() net/ncsi: Rework the channel monitoring net/ncsi: Allow to extend NCSI request properties net/ncsi: Rework request index allocation net/ncsi: Don't probe on the reserved channel ID (0x1f) net/ncsi: Introduce NCSI_RESERVED_CHANNEL net/ncsi: Avoid unused-value build warning from ia64-linux-gcc net: Add netdev all_adj_list refcnt propagation to fix panic net: phy: Add Edge-rate driver for Microsemi PHYs. vmxnet3: Wake queue from reset work i40e: avoid NULL pointer dereference and recursive errors on early PCI error qed: Add RoCE ll2 & GSI support qed: Add support for memory registeration verbs qed: Add support for QP verbs qed: PD,PKEY and CQ verb support qed: Add support for RoCE hw init qede: Add qedr framework ...
Diffstat (limited to 'include/net/switchdev.h')
-rw-r--r--include/net/switchdev.h52
1 files changed, 3 insertions, 49 deletions
diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index 62f6a967a1b7..eba80c4fc56f 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -68,7 +68,6 @@ struct switchdev_attr {
68enum switchdev_obj_id { 68enum switchdev_obj_id {
69 SWITCHDEV_OBJ_ID_UNDEFINED, 69 SWITCHDEV_OBJ_ID_UNDEFINED,
70 SWITCHDEV_OBJ_ID_PORT_VLAN, 70 SWITCHDEV_OBJ_ID_PORT_VLAN,
71 SWITCHDEV_OBJ_ID_IPV4_FIB,
72 SWITCHDEV_OBJ_ID_PORT_FDB, 71 SWITCHDEV_OBJ_ID_PORT_FDB,
73 SWITCHDEV_OBJ_ID_PORT_MDB, 72 SWITCHDEV_OBJ_ID_PORT_MDB,
74}; 73};
@@ -92,21 +91,6 @@ struct switchdev_obj_port_vlan {
92#define SWITCHDEV_OBJ_PORT_VLAN(obj) \ 91#define SWITCHDEV_OBJ_PORT_VLAN(obj) \
93 container_of(obj, struct switchdev_obj_port_vlan, obj) 92 container_of(obj, struct switchdev_obj_port_vlan, obj)
94 93
95/* SWITCHDEV_OBJ_ID_IPV4_FIB */
96struct switchdev_obj_ipv4_fib {
97 struct switchdev_obj obj;
98 u32 dst;
99 int dst_len;
100 struct fib_info *fi;
101 u8 tos;
102 u8 type;
103 u32 nlflags;
104 u32 tb_id;
105};
106
107#define SWITCHDEV_OBJ_IPV4_FIB(obj) \
108 container_of(obj, struct switchdev_obj_ipv4_fib, obj)
109
110/* SWITCHDEV_OBJ_ID_PORT_FDB */ 94/* SWITCHDEV_OBJ_ID_PORT_FDB */
111struct switchdev_obj_port_fdb { 95struct switchdev_obj_port_fdb {
112 struct switchdev_obj obj; 96 struct switchdev_obj obj;
@@ -209,11 +193,6 @@ int switchdev_port_bridge_setlink(struct net_device *dev,
209 struct nlmsghdr *nlh, u16 flags); 193 struct nlmsghdr *nlh, u16 flags);
210int switchdev_port_bridge_dellink(struct net_device *dev, 194int switchdev_port_bridge_dellink(struct net_device *dev,
211 struct nlmsghdr *nlh, u16 flags); 195 struct nlmsghdr *nlh, u16 flags);
212int switchdev_fib_ipv4_add(u32 dst, int dst_len, struct fib_info *fi,
213 u8 tos, u8 type, u32 nlflags, u32 tb_id);
214int switchdev_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi,
215 u8 tos, u8 type, u32 tb_id);
216void switchdev_fib_ipv4_abort(struct fib_info *fi);
217int switchdev_port_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], 196int switchdev_port_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
218 struct net_device *dev, const unsigned char *addr, 197 struct net_device *dev, const unsigned char *addr,
219 u16 vid, u16 nlm_flags); 198 u16 vid, u16 nlm_flags);
@@ -222,7 +201,7 @@ int switchdev_port_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
222 u16 vid); 201 u16 vid);
223int switchdev_port_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb, 202int switchdev_port_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
224 struct net_device *dev, 203 struct net_device *dev,
225 struct net_device *filter_dev, int idx); 204 struct net_device *filter_dev, int *idx);
226void switchdev_port_fwd_mark_set(struct net_device *dev, 205void switchdev_port_fwd_mark_set(struct net_device *dev,
227 struct net_device *group_dev, 206 struct net_device *group_dev,
228 bool joining); 207 bool joining);
@@ -304,25 +283,6 @@ static inline int switchdev_port_bridge_dellink(struct net_device *dev,
304 return -EOPNOTSUPP; 283 return -EOPNOTSUPP;
305} 284}
306 285
307static inline int switchdev_fib_ipv4_add(u32 dst, int dst_len,
308 struct fib_info *fi,
309 u8 tos, u8 type,
310 u32 nlflags, u32 tb_id)
311{
312 return 0;
313}
314
315static inline int switchdev_fib_ipv4_del(u32 dst, int dst_len,
316 struct fib_info *fi,
317 u8 tos, u8 type, u32 tb_id)
318{
319 return 0;
320}
321
322static inline void switchdev_fib_ipv4_abort(struct fib_info *fi)
323{
324}
325
326static inline int switchdev_port_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], 286static inline int switchdev_port_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
327 struct net_device *dev, 287 struct net_device *dev,
328 const unsigned char *addr, 288 const unsigned char *addr,
@@ -342,15 +302,9 @@ static inline int switchdev_port_fdb_dump(struct sk_buff *skb,
342 struct netlink_callback *cb, 302 struct netlink_callback *cb,
343 struct net_device *dev, 303 struct net_device *dev,
344 struct net_device *filter_dev, 304 struct net_device *filter_dev,
345 int idx) 305 int *idx)
346{
347 return idx;
348}
349
350static inline void switchdev_port_fwd_mark_set(struct net_device *dev,
351 struct net_device *group_dev,
352 bool joining)
353{ 306{
307 return *idx;
354} 308}
355 309
356static inline bool switchdev_port_same_parent_id(struct net_device *a, 310static inline bool switchdev_port_same_parent_id(struct net_device *a,