blob: 195f62672cc419c8646e3f86ea794928b2e554ff [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
Scott Feldman30943332015-05-10 09:47:48 -070019enum switchdev_attr_id {
Jiri Pirko1f868392015-10-01 11:03:42 +020020 SWITCHDEV_ATTR_ID_UNDEFINED,
Jiri Pirko1f868392015-10-01 11:03:42 +020021 SWITCHDEV_ATTR_ID_PORT_STP_STATE,
22 SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS,
Florian Fainelli746dc182019-02-20 16:58:19 -080023 SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS,
Nogah Frankel6d549642017-02-09 14:54:42 +010024 SWITCHDEV_ATTR_ID_PORT_MROUTER,
Scott Feldmanf55ac582015-10-08 19:23:17 -070025 SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME,
Elad Raz81435c32016-01-06 13:01:05 +010026 SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING,
Danielle Ratson22ec19f32020-11-29 14:54:05 +020027 SWITCHDEV_ATTR_ID_BRIDGE_VLAN_PROTOCOL,
Nogah Frankel147c1e92017-02-09 14:54:40 +010028 SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED,
Yotam Gigi77041422017-10-09 11:15:31 +020029 SWITCHDEV_ATTR_ID_BRIDGE_MROUTER,
Horatiu Vulturc284b542020-04-26 15:22:03 +020030#if IS_ENABLED(CONFIG_BRIDGE_MRP)
Horatiu Vulturc284b542020-04-26 15:22:03 +020031 SWITCHDEV_ATTR_ID_MRP_PORT_ROLE,
32#endif
Scott Feldman30943332015-05-10 09:47:48 -070033};
34
Vladimir Olteane18f4c12021-02-12 17:15:55 +020035struct switchdev_brport_flags {
36 unsigned long val;
37 unsigned long mask;
38};
39
Scott Feldman30943332015-05-10 09:47:48 -070040struct switchdev_attr {
Ido Schimmel6ff64f62015-12-15 16:03:35 +010041 struct net_device *orig_dev;
Scott Feldman30943332015-05-10 09:47:48 -070042 enum switchdev_attr_id id;
Scott Feldman30943332015-05-10 09:47:48 -070043 u32 flags;
Elad Raz7ceb2af2016-04-21 12:52:43 +020044 void *complete_priv;
45 void (*complete)(struct net_device *dev, int err, void *priv);
Scott Feldmanf8e20a92015-05-10 09:47:49 -070046 union {
Scott Feldman35636062015-05-10 09:47:51 -070047 u8 stp_state; /* PORT_STP_STATE */
Vladimir Olteane18f4c12021-02-12 17:15:55 +020048 struct switchdev_brport_flags brport_flags; /* PORT_BRIDGE_FLAGS */
Nogah Frankel6d549642017-02-09 14:54:42 +010049 bool mrouter; /* PORT_MROUTER */
Vivien Dideloteabfdda2016-07-18 15:02:06 -040050 clock_t ageing_time; /* BRIDGE_AGEING_TIME */
Elad Raz81435c32016-01-06 13:01:05 +010051 bool vlan_filtering; /* BRIDGE_VLAN_FILTERING */
Danielle Ratson22ec19f32020-11-29 14:54:05 +020052 u16 vlan_protocol; /* BRIDGE_VLAN_PROTOCOL */
Nogah Frankel147c1e92017-02-09 14:54:40 +010053 bool mc_disabled; /* MC_DISABLED */
Horatiu Vulturc284b542020-04-26 15:22:03 +020054#if IS_ENABLED(CONFIG_BRIDGE_MRP)
Horatiu Vulturc284b542020-04-26 15:22:03 +020055 u8 mrp_port_role; /* MRP_PORT_ROLE */
Horatiu Vulturc284b542020-04-26 15:22:03 +020056#endif
Scott Feldman42275bd2015-05-13 11:16:50 -070057 } u;
Scott Feldman30943332015-05-10 09:47:48 -070058};
59
Scott Feldman491d0f12015-05-10 09:47:52 -070060enum switchdev_obj_id {
Jiri Pirko57d80832015-10-01 11:03:41 +020061 SWITCHDEV_OBJ_ID_UNDEFINED,
62 SWITCHDEV_OBJ_ID_PORT_VLAN,
Elad Raz4d41e1252016-01-10 21:06:22 +010063 SWITCHDEV_OBJ_ID_PORT_MDB,
Andrew Lunn47d5b6d2017-11-09 23:10:59 +010064 SWITCHDEV_OBJ_ID_HOST_MDB,
Horatiu Vulturc284b542020-04-26 15:22:03 +020065#if IS_ENABLED(CONFIG_BRIDGE_MRP)
66 SWITCHDEV_OBJ_ID_MRP,
67 SWITCHDEV_OBJ_ID_RING_TEST_MRP,
68 SWITCHDEV_OBJ_ID_RING_ROLE_MRP,
69 SWITCHDEV_OBJ_ID_RING_STATE_MRP,
Horatiu Vulturcf7c5272020-07-14 09:34:47 +020070 SWITCHDEV_OBJ_ID_IN_TEST_MRP,
71 SWITCHDEV_OBJ_ID_IN_ROLE_MRP,
72 SWITCHDEV_OBJ_ID_IN_STATE_MRP,
73
Horatiu Vulturc284b542020-04-26 15:22:03 +020074#endif
Scott Feldman491d0f12015-05-10 09:47:52 -070075};
76
Jiri Pirko648b4a92015-10-01 11:03:45 +020077struct switchdev_obj {
Ido Schimmel6ff64f62015-12-15 16:03:35 +010078 struct net_device *orig_dev;
Jiri Pirko9e8f4a52015-10-01 11:03:46 +020079 enum switchdev_obj_id id;
Jiri Pirko4d429c52015-10-14 19:40:52 +020080 u32 flags;
Elad Raz7ceb2af2016-04-21 12:52:43 +020081 void *complete_priv;
82 void (*complete)(struct net_device *dev, int err, void *priv);
Jiri Pirko648b4a92015-10-01 11:03:45 +020083};
84
Jiri Pirko57d80832015-10-01 11:03:41 +020085/* SWITCHDEV_OBJ_ID_PORT_VLAN */
Jiri Pirko8f24f302015-10-01 11:03:43 +020086struct switchdev_obj_port_vlan {
Jiri Pirko648b4a92015-10-01 11:03:45 +020087 struct switchdev_obj obj;
Vivien Didelot44bbcf52015-09-29 12:07:18 -040088 u16 flags;
Vladimir Olteanb7a9e0d2021-01-09 02:01:46 +020089 u16 vid;
Vivien Didelot44bbcf52015-09-29 12:07:18 -040090};
91
Petr Machataec394af2018-11-22 23:28:07 +000092#define SWITCHDEV_OBJ_PORT_VLAN(OBJ) \
93 container_of((OBJ), struct switchdev_obj_port_vlan, obj)
Jiri Pirko648b4a92015-10-01 11:03:45 +020094
Elad Raz4d41e1252016-01-10 21:06:22 +010095/* SWITCHDEV_OBJ_ID_PORT_MDB */
96struct switchdev_obj_port_mdb {
97 struct switchdev_obj obj;
98 unsigned char addr[ETH_ALEN];
99 u16 vid;
100};
101
Petr Machataec394af2018-11-22 23:28:07 +0000102#define SWITCHDEV_OBJ_PORT_MDB(OBJ) \
103 container_of((OBJ), struct switchdev_obj_port_mdb, obj)
Elad Raz4d41e1252016-01-10 21:06:22 +0100104
Horatiu Vulturc284b542020-04-26 15:22:03 +0200105
106#if IS_ENABLED(CONFIG_BRIDGE_MRP)
107/* SWITCHDEV_OBJ_ID_MRP */
108struct switchdev_obj_mrp {
109 struct switchdev_obj obj;
110 struct net_device *p_port;
111 struct net_device *s_port;
112 u32 ring_id;
Horatiu Vultur4b3a61b2020-05-30 18:09:47 +0000113 u16 prio;
Horatiu Vulturc284b542020-04-26 15:22:03 +0200114};
115
116#define SWITCHDEV_OBJ_MRP(OBJ) \
117 container_of((OBJ), struct switchdev_obj_mrp, obj)
118
119/* SWITCHDEV_OBJ_ID_RING_TEST_MRP */
120struct switchdev_obj_ring_test_mrp {
121 struct switchdev_obj obj;
122 /* The value is in us and a value of 0 represents to stop */
123 u32 interval;
124 u8 max_miss;
125 u32 ring_id;
126 u32 period;
Horatiu Vulturc6676e72020-05-30 18:09:48 +0000127 bool monitor;
Horatiu Vulturc284b542020-04-26 15:22:03 +0200128};
129
130#define SWITCHDEV_OBJ_RING_TEST_MRP(OBJ) \
131 container_of((OBJ), struct switchdev_obj_ring_test_mrp, obj)
132
133/* SWICHDEV_OBJ_ID_RING_ROLE_MRP */
134struct switchdev_obj_ring_role_mrp {
135 struct switchdev_obj obj;
136 u8 ring_role;
137 u32 ring_id;
138};
139
140#define SWITCHDEV_OBJ_RING_ROLE_MRP(OBJ) \
141 container_of((OBJ), struct switchdev_obj_ring_role_mrp, obj)
142
143struct switchdev_obj_ring_state_mrp {
144 struct switchdev_obj obj;
145 u8 ring_state;
146 u32 ring_id;
147};
148
149#define SWITCHDEV_OBJ_RING_STATE_MRP(OBJ) \
150 container_of((OBJ), struct switchdev_obj_ring_state_mrp, obj)
151
Horatiu Vulturcf7c5272020-07-14 09:34:47 +0200152/* SWITCHDEV_OBJ_ID_IN_TEST_MRP */
153struct switchdev_obj_in_test_mrp {
154 struct switchdev_obj obj;
155 /* The value is in us and a value of 0 represents to stop */
156 u32 interval;
157 u32 in_id;
158 u32 period;
159 u8 max_miss;
160};
161
162#define SWITCHDEV_OBJ_IN_TEST_MRP(OBJ) \
163 container_of((OBJ), struct switchdev_obj_in_test_mrp, obj)
164
165/* SWICHDEV_OBJ_ID_IN_ROLE_MRP */
166struct switchdev_obj_in_role_mrp {
167 struct switchdev_obj obj;
168 struct net_device *i_port;
169 u32 ring_id;
170 u16 in_id;
171 u8 in_role;
172};
173
174#define SWITCHDEV_OBJ_IN_ROLE_MRP(OBJ) \
175 container_of((OBJ), struct switchdev_obj_in_role_mrp, obj)
176
177struct switchdev_obj_in_state_mrp {
178 struct switchdev_obj obj;
179 u32 in_id;
180 u8 in_state;
181};
182
183#define SWITCHDEV_OBJ_IN_STATE_MRP(OBJ) \
184 container_of((OBJ), struct switchdev_obj_in_state_mrp, obj)
185
Horatiu Vulturc284b542020-04-26 15:22:03 +0200186#endif
187
Jiri Pirko648b4a92015-10-01 11:03:45 +0200188typedef int switchdev_obj_dump_cb_t(struct switchdev_obj *obj);
189
Jiri Pirkoebb9a032015-05-10 09:47:46 -0700190enum switchdev_notifier_type {
Arkadi Sharshevsky6b26b512017-06-08 08:44:14 +0200191 SWITCHDEV_FDB_ADD_TO_BRIDGE = 1,
192 SWITCHDEV_FDB_DEL_TO_BRIDGE,
193 SWITCHDEV_FDB_ADD_TO_DEVICE,
194 SWITCHDEV_FDB_DEL_TO_DEVICE,
Arkadi Sharshevsky9fe8bce2017-06-08 08:44:15 +0200195 SWITCHDEV_FDB_OFFLOADED,
Alexandra Winterd05e8e62020-09-10 19:23:48 +0200196 SWITCHDEV_FDB_FLUSH_TO_BRIDGE,
Petr Machata9a997352018-10-17 08:53:22 +0000197
Petr Machataaa4efe22018-11-22 23:28:38 +0000198 SWITCHDEV_PORT_OBJ_ADD, /* Blocking. */
199 SWITCHDEV_PORT_OBJ_DEL, /* Blocking. */
Florian Fainelli1cb33af2019-02-27 11:44:25 -0800200 SWITCHDEV_PORT_ATTR_SET, /* May be blocking . */
Petr Machataaa4efe22018-11-22 23:28:38 +0000201
Petr Machata5728ae02018-11-21 08:02:39 +0000202 SWITCHDEV_VXLAN_FDB_ADD_TO_BRIDGE,
203 SWITCHDEV_VXLAN_FDB_DEL_TO_BRIDGE,
Petr Machata9a997352018-10-17 08:53:22 +0000204 SWITCHDEV_VXLAN_FDB_ADD_TO_DEVICE,
205 SWITCHDEV_VXLAN_FDB_DEL_TO_DEVICE,
Petr Machata0efe1172018-10-17 08:53:26 +0000206 SWITCHDEV_VXLAN_FDB_OFFLOADED,
Jiri Pirko3aeb6612015-01-15 23:49:37 +0100207};
208
Jiri Pirkoebb9a032015-05-10 09:47:46 -0700209struct switchdev_notifier_info {
Jiri Pirko03bf0c22015-01-15 23:49:36 +0100210 struct net_device *dev;
Petr Machata479c86d2018-12-12 17:02:54 +0000211 struct netlink_ext_ack *extack;
Jiri Pirko03bf0c22015-01-15 23:49:36 +0100212};
213
Jiri Pirkoebb9a032015-05-10 09:47:46 -0700214struct switchdev_notifier_fdb_info {
215 struct switchdev_notifier_info info; /* must be first */
Jiri Pirko3aeb6612015-01-15 23:49:37 +0100216 const unsigned char *addr;
217 u16 vid;
Ido Schimmele9ba0fb2018-10-17 08:53:29 +0000218 u8 added_by_user:1,
219 offloaded:1;
Jiri Pirko3aeb6612015-01-15 23:49:37 +0100220};
221
Petr Machataaa4efe22018-11-22 23:28:38 +0000222struct switchdev_notifier_port_obj_info {
223 struct switchdev_notifier_info info; /* must be first */
224 const struct switchdev_obj *obj;
Petr Machataaa4efe22018-11-22 23:28:38 +0000225 bool handled;
226};
227
Florian Fainelli1cb33af2019-02-27 11:44:25 -0800228struct switchdev_notifier_port_attr_info {
229 struct switchdev_notifier_info info; /* must be first */
230 const struct switchdev_attr *attr;
Florian Fainelli1cb33af2019-02-27 11:44:25 -0800231 bool handled;
232};
233
Jiri Pirko03bf0c22015-01-15 23:49:36 +0100234static inline struct net_device *
Jiri Pirkoebb9a032015-05-10 09:47:46 -0700235switchdev_notifier_info_to_dev(const struct switchdev_notifier_info *info)
Jiri Pirko03bf0c22015-01-15 23:49:36 +0100236{
237 return info->dev;
238}
Jiri Pirko007f7902014-11-28 14:34:17 +0100239
Petr Machata479c86d2018-12-12 17:02:54 +0000240static inline struct netlink_ext_ack *
241switchdev_notifier_info_to_extack(const struct switchdev_notifier_info *info)
242{
243 return info->extack;
244}
245
Jiri Pirko007f7902014-11-28 14:34:17 +0100246#ifdef CONFIG_NET_SWITCHDEV
247
Jiri Pirko793f4012015-10-14 19:40:48 +0200248void switchdev_deferred_process(void);
Scott Feldman30943332015-05-10 09:47:48 -0700249int switchdev_port_attr_set(struct net_device *dev,
Vladimir Olteandcbdf132021-02-13 22:43:17 +0200250 const struct switchdev_attr *attr,
251 struct netlink_ext_ack *extack);
Jiri Pirko9e8f4a52015-10-01 11:03:46 +0200252int switchdev_port_obj_add(struct net_device *dev,
Petr Machata69b73202018-12-12 17:02:52 +0000253 const struct switchdev_obj *obj,
254 struct netlink_ext_ack *extack);
Jiri Pirko9e8f4a52015-10-01 11:03:46 +0200255int switchdev_port_obj_del(struct net_device *dev,
Jiri Pirko648b4a92015-10-01 11:03:45 +0200256 const struct switchdev_obj *obj);
Petr Machataa93e3b12018-11-22 23:28:25 +0000257
Jiri Pirkoebb9a032015-05-10 09:47:46 -0700258int register_switchdev_notifier(struct notifier_block *nb);
259int unregister_switchdev_notifier(struct notifier_block *nb);
260int call_switchdev_notifiers(unsigned long val, struct net_device *dev,
Petr Machata66859872019-01-16 23:06:56 +0000261 struct switchdev_notifier_info *info,
262 struct netlink_ext_ack *extack);
Petr Machataa93e3b12018-11-22 23:28:25 +0000263
264int register_switchdev_blocking_notifier(struct notifier_block *nb);
265int unregister_switchdev_blocking_notifier(struct notifier_block *nb);
266int call_switchdev_blocking_notifiers(unsigned long val, struct net_device *dev,
Petr Machata479c86d2018-12-12 17:02:54 +0000267 struct switchdev_notifier_info *info,
268 struct netlink_ext_ack *extack);
Petr Machataa93e3b12018-11-22 23:28:25 +0000269
Scott Feldman1a3b2ec2015-07-18 18:24:50 -0700270void switchdev_port_fwd_mark_set(struct net_device *dev,
271 struct net_device *group_dev,
272 bool joining);
Scott Feldman5e8d9042015-03-05 21:21:15 -0800273
Petr Machataf30f0602018-11-22 23:29:44 +0000274int switchdev_handle_port_obj_add(struct net_device *dev,
275 struct switchdev_notifier_port_obj_info *port_obj_info,
276 bool (*check_cb)(const struct net_device *dev),
277 int (*add_cb)(struct net_device *dev,
278 const struct switchdev_obj *obj,
Petr Machata69213512018-12-12 17:02:56 +0000279 struct netlink_ext_ack *extack));
Petr Machataf30f0602018-11-22 23:29:44 +0000280int switchdev_handle_port_obj_del(struct net_device *dev,
281 struct switchdev_notifier_port_obj_info *port_obj_info,
282 bool (*check_cb)(const struct net_device *dev),
283 int (*del_cb)(struct net_device *dev,
284 const struct switchdev_obj *obj));
285
Florian Fainelli1cb33af2019-02-27 11:44:25 -0800286int switchdev_handle_port_attr_set(struct net_device *dev,
287 struct switchdev_notifier_port_attr_info *port_attr_info,
288 bool (*check_cb)(const struct net_device *dev),
289 int (*set_cb)(struct net_device *dev,
Vladimir Oltean4c08c582021-02-12 17:15:51 +0200290 const struct switchdev_attr *attr,
291 struct netlink_ext_ack *extack));
Jiri Pirko007f7902014-11-28 14:34:17 +0100292#else
293
Jiri Pirko793f4012015-10-14 19:40:48 +0200294static inline void switchdev_deferred_process(void)
295{
296}
297
Scott Feldman30943332015-05-10 09:47:48 -0700298static inline int switchdev_port_attr_set(struct net_device *dev,
Jiri Pirkof7fadf32015-10-14 19:40:49 +0200299 const struct switchdev_attr *attr)
Scott Feldman30943332015-05-10 09:47:48 -0700300{
301 return -EOPNOTSUPP;
302}
303
Scott Feldman491d0f12015-05-10 09:47:52 -0700304static inline int switchdev_port_obj_add(struct net_device *dev,
Petr Machata69b73202018-12-12 17:02:52 +0000305 const struct switchdev_obj *obj,
306 struct netlink_ext_ack *extack)
Scott Feldman491d0f12015-05-10 09:47:52 -0700307{
308 return -EOPNOTSUPP;
309}
310
311static inline int switchdev_port_obj_del(struct net_device *dev,
Jiri Pirko648b4a92015-10-01 11:03:45 +0200312 const struct switchdev_obj *obj)
Scott Feldman491d0f12015-05-10 09:47:52 -0700313{
314 return -EOPNOTSUPP;
315}
316
Jiri Pirkoebb9a032015-05-10 09:47:46 -0700317static inline int register_switchdev_notifier(struct notifier_block *nb)
Jiri Pirko03bf0c22015-01-15 23:49:36 +0100318{
319 return 0;
320}
321
Jiri Pirkoebb9a032015-05-10 09:47:46 -0700322static inline int unregister_switchdev_notifier(struct notifier_block *nb)
Jiri Pirko03bf0c22015-01-15 23:49:36 +0100323{
324 return 0;
325}
326
Jiri Pirkoebb9a032015-05-10 09:47:46 -0700327static inline int call_switchdev_notifiers(unsigned long val,
328 struct net_device *dev,
Petr Machata66859872019-01-16 23:06:56 +0000329 struct switchdev_notifier_info *info,
330 struct netlink_ext_ack *extack)
Jiri Pirko03bf0c22015-01-15 23:49:36 +0100331{
332 return NOTIFY_DONE;
333}
334
Petr Machataa93e3b12018-11-22 23:28:25 +0000335static inline int
336register_switchdev_blocking_notifier(struct notifier_block *nb)
337{
338 return 0;
339}
340
341static inline int
342unregister_switchdev_blocking_notifier(struct notifier_block *nb)
343{
344 return 0;
345}
346
347static inline int
348call_switchdev_blocking_notifiers(unsigned long val,
349 struct net_device *dev,
Petr Machata479c86d2018-12-12 17:02:54 +0000350 struct switchdev_notifier_info *info,
351 struct netlink_ext_ack *extack)
Petr Machataa93e3b12018-11-22 23:28:25 +0000352{
353 return NOTIFY_DONE;
354}
355
Petr Machataf30f0602018-11-22 23:29:44 +0000356static inline int
357switchdev_handle_port_obj_add(struct net_device *dev,
358 struct switchdev_notifier_port_obj_info *port_obj_info,
359 bool (*check_cb)(const struct net_device *dev),
360 int (*add_cb)(struct net_device *dev,
361 const struct switchdev_obj *obj,
Petr Machata69213512018-12-12 17:02:56 +0000362 struct netlink_ext_ack *extack))
Petr Machataf30f0602018-11-22 23:29:44 +0000363{
364 return 0;
365}
366
367static inline int
368switchdev_handle_port_obj_del(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 (*del_cb)(struct net_device *dev,
372 const struct switchdev_obj *obj))
373{
374 return 0;
375}
376
Florian Fainelli1cb33af2019-02-27 11:44:25 -0800377static inline int
378switchdev_handle_port_attr_set(struct net_device *dev,
379 struct switchdev_notifier_port_attr_info *port_attr_info,
380 bool (*check_cb)(const struct net_device *dev),
381 int (*set_cb)(struct net_device *dev,
Vladimir Oltean4c08c582021-02-12 17:15:51 +0200382 const struct switchdev_attr *attr,
383 struct netlink_ext_ack *extack))
Florian Fainelli1cb33af2019-02-27 11:44:25 -0800384{
385 return 0;
386}
Jiri Pirko007f7902014-11-28 14:34:17 +0100387#endif
388
389#endif /* _LINUX_SWITCHDEV_H_ */