blob: ff22469143013c288cd2b902a1374b4e5d2d76c5 [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Jiri Pirko007f7902014-11-28 14:34:17 +01002/*
3 * include/net/switchdev.h - Switch device API
Jiri Pirko7ea6eb32015-09-24 10:02:41 +02004 * Copyright (c) 2014-2015 Jiri Pirko <jiri@resnulli.us>
Scott Feldmanf8f21472015-03-09 13:59:09 -07005 * Copyright (c) 2014-2015 Scott Feldman <sfeldma@gmail.com>
Jiri Pirko007f7902014-11-28 14:34:17 +01006 */
7#ifndef _LINUX_SWITCHDEV_H_
8#define _LINUX_SWITCHDEV_H_
9
10#include <linux/netdevice.h>
Jiri Pirko03bf0c22015-01-15 23:49:36 +010011#include <linux/notifier.h>
Jiri Pirko7ea6eb32015-09-24 10:02:41 +020012#include <linux/list.h>
Jiri Pirko850d0cb2015-10-14 19:40:51 +020013#include <net/ip_fib.h>
Jiri Pirko03bf0c22015-01-15 23:49:36 +010014
Scott Feldman30943332015-05-10 09:47:48 -070015#define SWITCHDEV_F_NO_RECURSE BIT(0)
Scott Feldman464314e2015-10-08 19:23:18 -070016#define SWITCHDEV_F_SKIP_EOPNOTSUPP BIT(1)
Jiri Pirko0bc05d52015-10-14 19:40:50 +020017#define SWITCHDEV_F_DEFER BIT(2)
Scott Feldman30943332015-05-10 09:47:48 -070018
Jiri Pirko7ea6eb32015-09-24 10:02:41 +020019struct switchdev_trans {
Jiri Pirkof623ab72015-09-24 10:02:49 +020020 bool ph_prepare;
Jiri Pirko7ea6eb32015-09-24 10:02:41 +020021};
22
Jiri Pirko8bdb4272015-09-24 10:02:43 +020023static inline bool switchdev_trans_ph_prepare(struct switchdev_trans *trans)
24{
Jiri Pirkof623ab72015-09-24 10:02:49 +020025 return trans && trans->ph_prepare;
Jiri Pirko8bdb4272015-09-24 10:02:43 +020026}
27
28static inline bool switchdev_trans_ph_commit(struct switchdev_trans *trans)
29{
Jiri Pirkof623ab72015-09-24 10:02:49 +020030 return trans && !trans->ph_prepare;
Jiri Pirko8bdb4272015-09-24 10:02:43 +020031}
32
Scott Feldman30943332015-05-10 09:47:48 -070033enum switchdev_attr_id {
Jiri Pirko1f868392015-10-01 11:03:42 +020034 SWITCHDEV_ATTR_ID_UNDEFINED,
Jiri Pirko1f868392015-10-01 11:03:42 +020035 SWITCHDEV_ATTR_ID_PORT_STP_STATE,
36 SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS,
Florian Fainelli746dc182019-02-20 16:58:19 -080037 SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS,
Nogah Frankel6d549642017-02-09 14:54:42 +010038 SWITCHDEV_ATTR_ID_PORT_MROUTER,
Scott Feldmanf55ac582015-10-08 19:23:17 -070039 SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME,
Elad Raz81435c32016-01-06 13:01:05 +010040 SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING,
Nogah Frankel147c1e92017-02-09 14:54:40 +010041 SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED,
Yotam Gigi77041422017-10-09 11:15:31 +020042 SWITCHDEV_ATTR_ID_BRIDGE_MROUTER,
Horatiu Vulturc284b542020-04-26 15:22:03 +020043#if IS_ENABLED(CONFIG_BRIDGE_MRP)
44 SWITCHDEV_ATTR_ID_MRP_PORT_STATE,
45 SWITCHDEV_ATTR_ID_MRP_PORT_ROLE,
46#endif
Scott Feldman30943332015-05-10 09:47:48 -070047};
48
49struct switchdev_attr {
Ido Schimmel6ff64f62015-12-15 16:03:35 +010050 struct net_device *orig_dev;
Scott Feldman30943332015-05-10 09:47:48 -070051 enum switchdev_attr_id id;
Scott Feldman30943332015-05-10 09:47:48 -070052 u32 flags;
Elad Raz7ceb2af2016-04-21 12:52:43 +020053 void *complete_priv;
54 void (*complete)(struct net_device *dev, int err, void *priv);
Scott Feldmanf8e20a92015-05-10 09:47:49 -070055 union {
Scott Feldman35636062015-05-10 09:47:51 -070056 u8 stp_state; /* PORT_STP_STATE */
Florian Fainelli746dc182019-02-20 16:58:19 -080057 unsigned long brport_flags; /* PORT_{PRE}_BRIDGE_FLAGS */
Nogah Frankel6d549642017-02-09 14:54:42 +010058 bool mrouter; /* PORT_MROUTER */
Vivien Dideloteabfdda2016-07-18 15:02:06 -040059 clock_t ageing_time; /* BRIDGE_AGEING_TIME */
Elad Raz81435c32016-01-06 13:01:05 +010060 bool vlan_filtering; /* BRIDGE_VLAN_FILTERING */
Nogah Frankel147c1e92017-02-09 14:54:40 +010061 bool mc_disabled; /* MC_DISABLED */
Horatiu Vulturc284b542020-04-26 15:22:03 +020062#if IS_ENABLED(CONFIG_BRIDGE_MRP)
63 u8 mrp_port_state; /* MRP_PORT_STATE */
64 u8 mrp_port_role; /* MRP_PORT_ROLE */
Horatiu Vulturc284b542020-04-26 15:22:03 +020065#endif
Scott Feldman42275bd2015-05-13 11:16:50 -070066 } u;
Scott Feldman30943332015-05-10 09:47:48 -070067};
68
Scott Feldman491d0f12015-05-10 09:47:52 -070069enum switchdev_obj_id {
Jiri Pirko57d80832015-10-01 11:03:41 +020070 SWITCHDEV_OBJ_ID_UNDEFINED,
71 SWITCHDEV_OBJ_ID_PORT_VLAN,
Elad Raz4d41e1252016-01-10 21:06:22 +010072 SWITCHDEV_OBJ_ID_PORT_MDB,
Andrew Lunn47d5b6d2017-11-09 23:10:59 +010073 SWITCHDEV_OBJ_ID_HOST_MDB,
Horatiu Vulturc284b542020-04-26 15:22:03 +020074#if IS_ENABLED(CONFIG_BRIDGE_MRP)
75 SWITCHDEV_OBJ_ID_MRP,
76 SWITCHDEV_OBJ_ID_RING_TEST_MRP,
77 SWITCHDEV_OBJ_ID_RING_ROLE_MRP,
78 SWITCHDEV_OBJ_ID_RING_STATE_MRP,
Horatiu Vulturcf7c5272020-07-14 09:34:47 +020079 SWITCHDEV_OBJ_ID_IN_TEST_MRP,
80 SWITCHDEV_OBJ_ID_IN_ROLE_MRP,
81 SWITCHDEV_OBJ_ID_IN_STATE_MRP,
82
Horatiu Vulturc284b542020-04-26 15:22:03 +020083#endif
Scott Feldman491d0f12015-05-10 09:47:52 -070084};
85
Jiri Pirko648b4a92015-10-01 11:03:45 +020086struct switchdev_obj {
Ido Schimmel6ff64f62015-12-15 16:03:35 +010087 struct net_device *orig_dev;
Jiri Pirko9e8f4a52015-10-01 11:03:46 +020088 enum switchdev_obj_id id;
Jiri Pirko4d429c52015-10-14 19:40:52 +020089 u32 flags;
Elad Raz7ceb2af2016-04-21 12:52:43 +020090 void *complete_priv;
91 void (*complete)(struct net_device *dev, int err, void *priv);
Jiri Pirko648b4a92015-10-01 11:03:45 +020092};
93
Jiri Pirko57d80832015-10-01 11:03:41 +020094/* SWITCHDEV_OBJ_ID_PORT_VLAN */
Jiri Pirko8f24f302015-10-01 11:03:43 +020095struct switchdev_obj_port_vlan {
Jiri Pirko648b4a92015-10-01 11:03:45 +020096 struct switchdev_obj obj;
Vivien Didelot44bbcf52015-09-29 12:07:18 -040097 u16 flags;
98 u16 vid_begin;
99 u16 vid_end;
100};
101
Petr Machataec394af2018-11-22 23:28:07 +0000102#define SWITCHDEV_OBJ_PORT_VLAN(OBJ) \
103 container_of((OBJ), struct switchdev_obj_port_vlan, obj)
Jiri Pirko648b4a92015-10-01 11:03:45 +0200104
Elad Raz4d41e1252016-01-10 21:06:22 +0100105/* SWITCHDEV_OBJ_ID_PORT_MDB */
106struct switchdev_obj_port_mdb {
107 struct switchdev_obj obj;
108 unsigned char addr[ETH_ALEN];
109 u16 vid;
110};
111
Petr Machataec394af2018-11-22 23:28:07 +0000112#define SWITCHDEV_OBJ_PORT_MDB(OBJ) \
113 container_of((OBJ), struct switchdev_obj_port_mdb, obj)
Elad Raz4d41e1252016-01-10 21:06:22 +0100114
Horatiu Vulturc284b542020-04-26 15:22:03 +0200115
116#if IS_ENABLED(CONFIG_BRIDGE_MRP)
117/* SWITCHDEV_OBJ_ID_MRP */
118struct switchdev_obj_mrp {
119 struct switchdev_obj obj;
120 struct net_device *p_port;
121 struct net_device *s_port;
122 u32 ring_id;
Horatiu Vultur4b3a61b2020-05-30 18:09:47 +0000123 u16 prio;
Horatiu Vulturc284b542020-04-26 15:22:03 +0200124};
125
126#define SWITCHDEV_OBJ_MRP(OBJ) \
127 container_of((OBJ), struct switchdev_obj_mrp, obj)
128
129/* SWITCHDEV_OBJ_ID_RING_TEST_MRP */
130struct switchdev_obj_ring_test_mrp {
131 struct switchdev_obj obj;
132 /* The value is in us and a value of 0 represents to stop */
133 u32 interval;
134 u8 max_miss;
135 u32 ring_id;
136 u32 period;
Horatiu Vulturc6676e72020-05-30 18:09:48 +0000137 bool monitor;
Horatiu Vulturc284b542020-04-26 15:22:03 +0200138};
139
140#define SWITCHDEV_OBJ_RING_TEST_MRP(OBJ) \
141 container_of((OBJ), struct switchdev_obj_ring_test_mrp, obj)
142
143/* SWICHDEV_OBJ_ID_RING_ROLE_MRP */
144struct switchdev_obj_ring_role_mrp {
145 struct switchdev_obj obj;
146 u8 ring_role;
147 u32 ring_id;
148};
149
150#define SWITCHDEV_OBJ_RING_ROLE_MRP(OBJ) \
151 container_of((OBJ), struct switchdev_obj_ring_role_mrp, obj)
152
153struct switchdev_obj_ring_state_mrp {
154 struct switchdev_obj obj;
155 u8 ring_state;
156 u32 ring_id;
157};
158
159#define SWITCHDEV_OBJ_RING_STATE_MRP(OBJ) \
160 container_of((OBJ), struct switchdev_obj_ring_state_mrp, obj)
161
Horatiu Vulturcf7c5272020-07-14 09:34:47 +0200162/* SWITCHDEV_OBJ_ID_IN_TEST_MRP */
163struct switchdev_obj_in_test_mrp {
164 struct switchdev_obj obj;
165 /* The value is in us and a value of 0 represents to stop */
166 u32 interval;
167 u32 in_id;
168 u32 period;
169 u8 max_miss;
170};
171
172#define SWITCHDEV_OBJ_IN_TEST_MRP(OBJ) \
173 container_of((OBJ), struct switchdev_obj_in_test_mrp, obj)
174
175/* SWICHDEV_OBJ_ID_IN_ROLE_MRP */
176struct switchdev_obj_in_role_mrp {
177 struct switchdev_obj obj;
178 struct net_device *i_port;
179 u32 ring_id;
180 u16 in_id;
181 u8 in_role;
182};
183
184#define SWITCHDEV_OBJ_IN_ROLE_MRP(OBJ) \
185 container_of((OBJ), struct switchdev_obj_in_role_mrp, obj)
186
187struct switchdev_obj_in_state_mrp {
188 struct switchdev_obj obj;
189 u32 in_id;
190 u8 in_state;
191};
192
193#define SWITCHDEV_OBJ_IN_STATE_MRP(OBJ) \
194 container_of((OBJ), struct switchdev_obj_in_state_mrp, obj)
195
Horatiu Vulturc284b542020-04-26 15:22:03 +0200196#endif
197
Jiri Pirko648b4a92015-10-01 11:03:45 +0200198typedef int switchdev_obj_dump_cb_t(struct switchdev_obj *obj);
199
Jiri Pirkoebb9a032015-05-10 09:47:46 -0700200enum switchdev_notifier_type {
Arkadi Sharshevsky6b26b512017-06-08 08:44:14 +0200201 SWITCHDEV_FDB_ADD_TO_BRIDGE = 1,
202 SWITCHDEV_FDB_DEL_TO_BRIDGE,
203 SWITCHDEV_FDB_ADD_TO_DEVICE,
204 SWITCHDEV_FDB_DEL_TO_DEVICE,
Arkadi Sharshevsky9fe8bce2017-06-08 08:44:15 +0200205 SWITCHDEV_FDB_OFFLOADED,
Petr Machata9a997352018-10-17 08:53:22 +0000206
Petr Machataaa4efe22018-11-22 23:28:38 +0000207 SWITCHDEV_PORT_OBJ_ADD, /* Blocking. */
208 SWITCHDEV_PORT_OBJ_DEL, /* Blocking. */
Florian Fainelli1cb33af2019-02-27 11:44:25 -0800209 SWITCHDEV_PORT_ATTR_SET, /* May be blocking . */
Petr Machataaa4efe22018-11-22 23:28:38 +0000210
Petr Machata5728ae02018-11-21 08:02:39 +0000211 SWITCHDEV_VXLAN_FDB_ADD_TO_BRIDGE,
212 SWITCHDEV_VXLAN_FDB_DEL_TO_BRIDGE,
Petr Machata9a997352018-10-17 08:53:22 +0000213 SWITCHDEV_VXLAN_FDB_ADD_TO_DEVICE,
214 SWITCHDEV_VXLAN_FDB_DEL_TO_DEVICE,
Petr Machata0efe1172018-10-17 08:53:26 +0000215 SWITCHDEV_VXLAN_FDB_OFFLOADED,
Jiri Pirko3aeb6612015-01-15 23:49:37 +0100216};
217
Jiri Pirkoebb9a032015-05-10 09:47:46 -0700218struct switchdev_notifier_info {
Jiri Pirko03bf0c22015-01-15 23:49:36 +0100219 struct net_device *dev;
Petr Machata479c86d2018-12-12 17:02:54 +0000220 struct netlink_ext_ack *extack;
Jiri Pirko03bf0c22015-01-15 23:49:36 +0100221};
222
Jiri Pirkoebb9a032015-05-10 09:47:46 -0700223struct switchdev_notifier_fdb_info {
224 struct switchdev_notifier_info info; /* must be first */
Jiri Pirko3aeb6612015-01-15 23:49:37 +0100225 const unsigned char *addr;
226 u16 vid;
Ido Schimmele9ba0fb2018-10-17 08:53:29 +0000227 u8 added_by_user:1,
228 offloaded:1;
Jiri Pirko3aeb6612015-01-15 23:49:37 +0100229};
230
Petr Machataaa4efe22018-11-22 23:28:38 +0000231struct switchdev_notifier_port_obj_info {
232 struct switchdev_notifier_info info; /* must be first */
233 const struct switchdev_obj *obj;
234 struct switchdev_trans *trans;
235 bool handled;
236};
237
Florian Fainelli1cb33af2019-02-27 11:44:25 -0800238struct switchdev_notifier_port_attr_info {
239 struct switchdev_notifier_info info; /* must be first */
240 const struct switchdev_attr *attr;
241 struct switchdev_trans *trans;
242 bool handled;
243};
244
Jiri Pirko03bf0c22015-01-15 23:49:36 +0100245static inline struct net_device *
Jiri Pirkoebb9a032015-05-10 09:47:46 -0700246switchdev_notifier_info_to_dev(const struct switchdev_notifier_info *info)
Jiri Pirko03bf0c22015-01-15 23:49:36 +0100247{
248 return info->dev;
249}
Jiri Pirko007f7902014-11-28 14:34:17 +0100250
Petr Machata479c86d2018-12-12 17:02:54 +0000251static inline struct netlink_ext_ack *
252switchdev_notifier_info_to_extack(const struct switchdev_notifier_info *info)
253{
254 return info->extack;
255}
256
Jiri Pirko007f7902014-11-28 14:34:17 +0100257#ifdef CONFIG_NET_SWITCHDEV
258
Jiri Pirko793f4012015-10-14 19:40:48 +0200259void switchdev_deferred_process(void);
Scott Feldman30943332015-05-10 09:47:48 -0700260int switchdev_port_attr_set(struct net_device *dev,
Jiri Pirkof7fadf32015-10-14 19:40:49 +0200261 const struct switchdev_attr *attr);
Jiri Pirko9e8f4a52015-10-01 11:03:46 +0200262int switchdev_port_obj_add(struct net_device *dev,
Petr Machata69b73202018-12-12 17:02:52 +0000263 const struct switchdev_obj *obj,
264 struct netlink_ext_ack *extack);
Jiri Pirko9e8f4a52015-10-01 11:03:46 +0200265int switchdev_port_obj_del(struct net_device *dev,
Jiri Pirko648b4a92015-10-01 11:03:45 +0200266 const struct switchdev_obj *obj);
Petr Machataa93e3b12018-11-22 23:28:25 +0000267
Jiri Pirkoebb9a032015-05-10 09:47:46 -0700268int register_switchdev_notifier(struct notifier_block *nb);
269int unregister_switchdev_notifier(struct notifier_block *nb);
270int call_switchdev_notifiers(unsigned long val, struct net_device *dev,
Petr Machata66859872019-01-16 23:06:56 +0000271 struct switchdev_notifier_info *info,
272 struct netlink_ext_ack *extack);
Petr Machataa93e3b12018-11-22 23:28:25 +0000273
274int register_switchdev_blocking_notifier(struct notifier_block *nb);
275int unregister_switchdev_blocking_notifier(struct notifier_block *nb);
276int call_switchdev_blocking_notifiers(unsigned long val, struct net_device *dev,
Petr Machata479c86d2018-12-12 17:02:54 +0000277 struct switchdev_notifier_info *info,
278 struct netlink_ext_ack *extack);
Petr Machataa93e3b12018-11-22 23:28:25 +0000279
Scott Feldman1a3b2ec2015-07-18 18:24:50 -0700280void switchdev_port_fwd_mark_set(struct net_device *dev,
281 struct net_device *group_dev,
282 bool joining);
Scott Feldman5e8d9042015-03-05 21:21:15 -0800283
Petr Machataf30f0602018-11-22 23:29:44 +0000284int switchdev_handle_port_obj_add(struct net_device *dev,
285 struct switchdev_notifier_port_obj_info *port_obj_info,
286 bool (*check_cb)(const struct net_device *dev),
287 int (*add_cb)(struct net_device *dev,
288 const struct switchdev_obj *obj,
Petr Machata69213512018-12-12 17:02:56 +0000289 struct switchdev_trans *trans,
290 struct netlink_ext_ack *extack));
Petr Machataf30f0602018-11-22 23:29:44 +0000291int switchdev_handle_port_obj_del(struct net_device *dev,
292 struct switchdev_notifier_port_obj_info *port_obj_info,
293 bool (*check_cb)(const struct net_device *dev),
294 int (*del_cb)(struct net_device *dev,
295 const struct switchdev_obj *obj));
296
Florian Fainelli1cb33af2019-02-27 11:44:25 -0800297int switchdev_handle_port_attr_set(struct net_device *dev,
298 struct switchdev_notifier_port_attr_info *port_attr_info,
299 bool (*check_cb)(const struct net_device *dev),
300 int (*set_cb)(struct net_device *dev,
301 const struct switchdev_attr *attr,
302 struct switchdev_trans *trans));
Jiri Pirko007f7902014-11-28 14:34:17 +0100303#else
304
Jiri Pirko793f4012015-10-14 19:40:48 +0200305static inline void switchdev_deferred_process(void)
306{
307}
308
Scott Feldman30943332015-05-10 09:47:48 -0700309static inline int switchdev_port_attr_set(struct net_device *dev,
Jiri Pirkof7fadf32015-10-14 19:40:49 +0200310 const struct switchdev_attr *attr)
Scott Feldman30943332015-05-10 09:47:48 -0700311{
312 return -EOPNOTSUPP;
313}
314
Scott Feldman491d0f12015-05-10 09:47:52 -0700315static inline int switchdev_port_obj_add(struct net_device *dev,
Petr Machata69b73202018-12-12 17:02:52 +0000316 const struct switchdev_obj *obj,
317 struct netlink_ext_ack *extack)
Scott Feldman491d0f12015-05-10 09:47:52 -0700318{
319 return -EOPNOTSUPP;
320}
321
322static inline int switchdev_port_obj_del(struct net_device *dev,
Jiri Pirko648b4a92015-10-01 11:03:45 +0200323 const struct switchdev_obj *obj)
Scott Feldman491d0f12015-05-10 09:47:52 -0700324{
325 return -EOPNOTSUPP;
326}
327
Jiri Pirkoebb9a032015-05-10 09:47:46 -0700328static inline int register_switchdev_notifier(struct notifier_block *nb)
Jiri Pirko03bf0c22015-01-15 23:49:36 +0100329{
330 return 0;
331}
332
Jiri Pirkoebb9a032015-05-10 09:47:46 -0700333static inline int unregister_switchdev_notifier(struct notifier_block *nb)
Jiri Pirko03bf0c22015-01-15 23:49:36 +0100334{
335 return 0;
336}
337
Jiri Pirkoebb9a032015-05-10 09:47:46 -0700338static inline int call_switchdev_notifiers(unsigned long val,
339 struct net_device *dev,
Petr Machata66859872019-01-16 23:06:56 +0000340 struct switchdev_notifier_info *info,
341 struct netlink_ext_ack *extack)
Jiri Pirko03bf0c22015-01-15 23:49:36 +0100342{
343 return NOTIFY_DONE;
344}
345
Petr Machataa93e3b12018-11-22 23:28:25 +0000346static inline int
347register_switchdev_blocking_notifier(struct notifier_block *nb)
348{
349 return 0;
350}
351
352static inline int
353unregister_switchdev_blocking_notifier(struct notifier_block *nb)
354{
355 return 0;
356}
357
358static inline int
359call_switchdev_blocking_notifiers(unsigned long val,
360 struct net_device *dev,
Petr Machata479c86d2018-12-12 17:02:54 +0000361 struct switchdev_notifier_info *info,
362 struct netlink_ext_ack *extack)
Petr Machataa93e3b12018-11-22 23:28:25 +0000363{
364 return NOTIFY_DONE;
365}
366
Petr Machataf30f0602018-11-22 23:29:44 +0000367static inline int
368switchdev_handle_port_obj_add(struct net_device *dev,
369 struct switchdev_notifier_port_obj_info *port_obj_info,
370 bool (*check_cb)(const struct net_device *dev),
371 int (*add_cb)(struct net_device *dev,
372 const struct switchdev_obj *obj,
Petr Machata69213512018-12-12 17:02:56 +0000373 struct switchdev_trans *trans,
374 struct netlink_ext_ack *extack))
Petr Machataf30f0602018-11-22 23:29:44 +0000375{
376 return 0;
377}
378
379static inline int
380switchdev_handle_port_obj_del(struct net_device *dev,
381 struct switchdev_notifier_port_obj_info *port_obj_info,
382 bool (*check_cb)(const struct net_device *dev),
383 int (*del_cb)(struct net_device *dev,
384 const struct switchdev_obj *obj))
385{
386 return 0;
387}
388
Florian Fainelli1cb33af2019-02-27 11:44:25 -0800389static inline int
390switchdev_handle_port_attr_set(struct net_device *dev,
391 struct switchdev_notifier_port_attr_info *port_attr_info,
392 bool (*check_cb)(const struct net_device *dev),
393 int (*set_cb)(struct net_device *dev,
394 const struct switchdev_attr *attr,
395 struct switchdev_trans *trans))
396{
397 return 0;
398}
Jiri Pirko007f7902014-11-28 14:34:17 +0100399#endif
400
401#endif /* _LINUX_SWITCHDEV_H_ */