.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * include/net/switchdev.h - Switch device API |
---|
3 | 4 | * Copyright (c) 2014-2015 Jiri Pirko <jiri@resnulli.us> |
---|
4 | 5 | * Copyright (c) 2014-2015 Scott Feldman <sfeldma@gmail.com> |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify |
---|
7 | | - * it under the terms of the GNU General Public License as published by |
---|
8 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
9 | | - * (at your option) any later version. |
---|
10 | 6 | */ |
---|
11 | 7 | #ifndef _LINUX_SWITCHDEV_H_ |
---|
12 | 8 | #define _LINUX_SWITCHDEV_H_ |
---|
.. | .. |
---|
20 | 16 | #define SWITCHDEV_F_SKIP_EOPNOTSUPP BIT(1) |
---|
21 | 17 | #define SWITCHDEV_F_DEFER BIT(2) |
---|
22 | 18 | |
---|
23 | | -struct switchdev_trans_item { |
---|
24 | | - struct list_head list; |
---|
25 | | - void *data; |
---|
26 | | - void (*destructor)(const void *data); |
---|
27 | | -}; |
---|
28 | | - |
---|
29 | 19 | struct switchdev_trans { |
---|
30 | | - struct list_head item_list; |
---|
31 | 20 | bool ph_prepare; |
---|
32 | 21 | }; |
---|
33 | 22 | |
---|
.. | .. |
---|
43 | 32 | |
---|
44 | 33 | enum switchdev_attr_id { |
---|
45 | 34 | SWITCHDEV_ATTR_ID_UNDEFINED, |
---|
46 | | - SWITCHDEV_ATTR_ID_PORT_PARENT_ID, |
---|
47 | 35 | SWITCHDEV_ATTR_ID_PORT_STP_STATE, |
---|
48 | 36 | SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS, |
---|
49 | | - SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT, |
---|
| 37 | + SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS, |
---|
50 | 38 | SWITCHDEV_ATTR_ID_PORT_MROUTER, |
---|
51 | 39 | SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME, |
---|
52 | 40 | SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING, |
---|
| 41 | + SWITCHDEV_ATTR_ID_BRIDGE_VLAN_PROTOCOL, |
---|
53 | 42 | SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED, |
---|
54 | 43 | SWITCHDEV_ATTR_ID_BRIDGE_MROUTER, |
---|
| 44 | +#if IS_ENABLED(CONFIG_BRIDGE_MRP) |
---|
| 45 | + SWITCHDEV_ATTR_ID_MRP_PORT_ROLE, |
---|
| 46 | +#endif |
---|
55 | 47 | }; |
---|
56 | 48 | |
---|
57 | 49 | struct switchdev_attr { |
---|
.. | .. |
---|
61 | 53 | void *complete_priv; |
---|
62 | 54 | void (*complete)(struct net_device *dev, int err, void *priv); |
---|
63 | 55 | union { |
---|
64 | | - struct netdev_phys_item_id ppid; /* PORT_PARENT_ID */ |
---|
65 | 56 | u8 stp_state; /* PORT_STP_STATE */ |
---|
66 | | - unsigned long brport_flags; /* PORT_BRIDGE_FLAGS */ |
---|
67 | | - unsigned long brport_flags_support; /* PORT_BRIDGE_FLAGS_SUPPORT */ |
---|
| 57 | + unsigned long brport_flags; /* PORT_{PRE}_BRIDGE_FLAGS */ |
---|
68 | 58 | bool mrouter; /* PORT_MROUTER */ |
---|
69 | 59 | clock_t ageing_time; /* BRIDGE_AGEING_TIME */ |
---|
70 | 60 | bool vlan_filtering; /* BRIDGE_VLAN_FILTERING */ |
---|
| 61 | + u16 vlan_protocol; /* BRIDGE_VLAN_PROTOCOL */ |
---|
71 | 62 | bool mc_disabled; /* MC_DISABLED */ |
---|
| 63 | +#if IS_ENABLED(CONFIG_BRIDGE_MRP) |
---|
| 64 | + u8 mrp_port_role; /* MRP_PORT_ROLE */ |
---|
| 65 | +#endif |
---|
72 | 66 | } u; |
---|
73 | 67 | }; |
---|
74 | 68 | |
---|
.. | .. |
---|
77 | 71 | SWITCHDEV_OBJ_ID_PORT_VLAN, |
---|
78 | 72 | SWITCHDEV_OBJ_ID_PORT_MDB, |
---|
79 | 73 | SWITCHDEV_OBJ_ID_HOST_MDB, |
---|
| 74 | +#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, |
---|
| 79 | + SWITCHDEV_OBJ_ID_IN_TEST_MRP, |
---|
| 80 | + SWITCHDEV_OBJ_ID_IN_ROLE_MRP, |
---|
| 81 | + SWITCHDEV_OBJ_ID_IN_STATE_MRP, |
---|
| 82 | + |
---|
| 83 | +#endif |
---|
80 | 84 | }; |
---|
81 | 85 | |
---|
82 | 86 | struct switchdev_obj { |
---|
.. | .. |
---|
95 | 99 | u16 vid_end; |
---|
96 | 100 | }; |
---|
97 | 101 | |
---|
98 | | -#define SWITCHDEV_OBJ_PORT_VLAN(obj) \ |
---|
99 | | - container_of(obj, struct switchdev_obj_port_vlan, obj) |
---|
| 102 | +#define SWITCHDEV_OBJ_PORT_VLAN(OBJ) \ |
---|
| 103 | + container_of((OBJ), struct switchdev_obj_port_vlan, obj) |
---|
100 | 104 | |
---|
101 | 105 | /* SWITCHDEV_OBJ_ID_PORT_MDB */ |
---|
102 | 106 | struct switchdev_obj_port_mdb { |
---|
.. | .. |
---|
105 | 109 | u16 vid; |
---|
106 | 110 | }; |
---|
107 | 111 | |
---|
108 | | -#define SWITCHDEV_OBJ_PORT_MDB(obj) \ |
---|
109 | | - container_of(obj, struct switchdev_obj_port_mdb, obj) |
---|
| 112 | +#define SWITCHDEV_OBJ_PORT_MDB(OBJ) \ |
---|
| 113 | + container_of((OBJ), struct switchdev_obj_port_mdb, obj) |
---|
110 | 114 | |
---|
111 | | -void switchdev_trans_item_enqueue(struct switchdev_trans *trans, |
---|
112 | | - void *data, void (*destructor)(void const *), |
---|
113 | | - struct switchdev_trans_item *tritem); |
---|
114 | | -void *switchdev_trans_item_dequeue(struct switchdev_trans *trans); |
---|
| 115 | + |
---|
| 116 | +#if IS_ENABLED(CONFIG_BRIDGE_MRP) |
---|
| 117 | +/* SWITCHDEV_OBJ_ID_MRP */ |
---|
| 118 | +struct switchdev_obj_mrp { |
---|
| 119 | + struct switchdev_obj obj; |
---|
| 120 | + struct net_device *p_port; |
---|
| 121 | + struct net_device *s_port; |
---|
| 122 | + u32 ring_id; |
---|
| 123 | + u16 prio; |
---|
| 124 | +}; |
---|
| 125 | + |
---|
| 126 | +#define SWITCHDEV_OBJ_MRP(OBJ) \ |
---|
| 127 | + container_of((OBJ), struct switchdev_obj_mrp, obj) |
---|
| 128 | + |
---|
| 129 | +/* SWITCHDEV_OBJ_ID_RING_TEST_MRP */ |
---|
| 130 | +struct 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; |
---|
| 137 | + bool monitor; |
---|
| 138 | +}; |
---|
| 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 */ |
---|
| 144 | +struct 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 | + |
---|
| 153 | +struct 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 | + |
---|
| 162 | +/* SWITCHDEV_OBJ_ID_IN_TEST_MRP */ |
---|
| 163 | +struct 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 */ |
---|
| 176 | +struct 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 | + |
---|
| 187 | +struct 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 | + |
---|
| 196 | +#endif |
---|
115 | 197 | |
---|
116 | 198 | typedef int switchdev_obj_dump_cb_t(struct switchdev_obj *obj); |
---|
117 | | - |
---|
118 | | -/** |
---|
119 | | - * struct switchdev_ops - switchdev operations |
---|
120 | | - * |
---|
121 | | - * @switchdev_port_attr_get: Get a port attribute (see switchdev_attr). |
---|
122 | | - * |
---|
123 | | - * @switchdev_port_attr_set: Set a port attribute (see switchdev_attr). |
---|
124 | | - * |
---|
125 | | - * @switchdev_port_obj_add: Add an object to port (see switchdev_obj_*). |
---|
126 | | - * |
---|
127 | | - * @switchdev_port_obj_del: Delete an object from port (see switchdev_obj_*). |
---|
128 | | - */ |
---|
129 | | -struct switchdev_ops { |
---|
130 | | - int (*switchdev_port_attr_get)(struct net_device *dev, |
---|
131 | | - struct switchdev_attr *attr); |
---|
132 | | - int (*switchdev_port_attr_set)(struct net_device *dev, |
---|
133 | | - const struct switchdev_attr *attr, |
---|
134 | | - struct switchdev_trans *trans); |
---|
135 | | - int (*switchdev_port_obj_add)(struct net_device *dev, |
---|
136 | | - const struct switchdev_obj *obj, |
---|
137 | | - struct switchdev_trans *trans); |
---|
138 | | - int (*switchdev_port_obj_del)(struct net_device *dev, |
---|
139 | | - const struct switchdev_obj *obj); |
---|
140 | | -}; |
---|
141 | 199 | |
---|
142 | 200 | enum switchdev_notifier_type { |
---|
143 | 201 | SWITCHDEV_FDB_ADD_TO_BRIDGE = 1, |
---|
.. | .. |
---|
145 | 203 | SWITCHDEV_FDB_ADD_TO_DEVICE, |
---|
146 | 204 | SWITCHDEV_FDB_DEL_TO_DEVICE, |
---|
147 | 205 | SWITCHDEV_FDB_OFFLOADED, |
---|
| 206 | + SWITCHDEV_FDB_FLUSH_TO_BRIDGE, |
---|
| 207 | + |
---|
| 208 | + SWITCHDEV_PORT_OBJ_ADD, /* Blocking. */ |
---|
| 209 | + SWITCHDEV_PORT_OBJ_DEL, /* Blocking. */ |
---|
| 210 | + SWITCHDEV_PORT_ATTR_SET, /* May be blocking . */ |
---|
| 211 | + |
---|
| 212 | + SWITCHDEV_VXLAN_FDB_ADD_TO_BRIDGE, |
---|
| 213 | + SWITCHDEV_VXLAN_FDB_DEL_TO_BRIDGE, |
---|
| 214 | + SWITCHDEV_VXLAN_FDB_ADD_TO_DEVICE, |
---|
| 215 | + SWITCHDEV_VXLAN_FDB_DEL_TO_DEVICE, |
---|
| 216 | + SWITCHDEV_VXLAN_FDB_OFFLOADED, |
---|
148 | 217 | }; |
---|
149 | 218 | |
---|
150 | 219 | struct switchdev_notifier_info { |
---|
151 | 220 | struct net_device *dev; |
---|
| 221 | + struct netlink_ext_ack *extack; |
---|
152 | 222 | }; |
---|
153 | 223 | |
---|
154 | 224 | struct switchdev_notifier_fdb_info { |
---|
155 | 225 | struct switchdev_notifier_info info; /* must be first */ |
---|
156 | 226 | const unsigned char *addr; |
---|
157 | 227 | u16 vid; |
---|
158 | | - bool added_by_user; |
---|
| 228 | + u8 added_by_user:1, |
---|
| 229 | + offloaded:1; |
---|
| 230 | +}; |
---|
| 231 | + |
---|
| 232 | +struct switchdev_notifier_port_obj_info { |
---|
| 233 | + struct switchdev_notifier_info info; /* must be first */ |
---|
| 234 | + const struct switchdev_obj *obj; |
---|
| 235 | + struct switchdev_trans *trans; |
---|
| 236 | + bool handled; |
---|
| 237 | +}; |
---|
| 238 | + |
---|
| 239 | +struct switchdev_notifier_port_attr_info { |
---|
| 240 | + struct switchdev_notifier_info info; /* must be first */ |
---|
| 241 | + const struct switchdev_attr *attr; |
---|
| 242 | + struct switchdev_trans *trans; |
---|
| 243 | + bool handled; |
---|
159 | 244 | }; |
---|
160 | 245 | |
---|
161 | 246 | static inline struct net_device * |
---|
.. | .. |
---|
164 | 249 | return info->dev; |
---|
165 | 250 | } |
---|
166 | 251 | |
---|
| 252 | +static inline struct netlink_ext_ack * |
---|
| 253 | +switchdev_notifier_info_to_extack(const struct switchdev_notifier_info *info) |
---|
| 254 | +{ |
---|
| 255 | + return info->extack; |
---|
| 256 | +} |
---|
| 257 | + |
---|
167 | 258 | #ifdef CONFIG_NET_SWITCHDEV |
---|
168 | 259 | |
---|
169 | 260 | void switchdev_deferred_process(void); |
---|
170 | | -int switchdev_port_attr_get(struct net_device *dev, |
---|
171 | | - struct switchdev_attr *attr); |
---|
172 | 261 | int switchdev_port_attr_set(struct net_device *dev, |
---|
173 | 262 | const struct switchdev_attr *attr); |
---|
174 | 263 | int switchdev_port_obj_add(struct net_device *dev, |
---|
175 | | - const struct switchdev_obj *obj); |
---|
| 264 | + const struct switchdev_obj *obj, |
---|
| 265 | + struct netlink_ext_ack *extack); |
---|
176 | 266 | int switchdev_port_obj_del(struct net_device *dev, |
---|
177 | 267 | const struct switchdev_obj *obj); |
---|
| 268 | + |
---|
178 | 269 | int register_switchdev_notifier(struct notifier_block *nb); |
---|
179 | 270 | int unregister_switchdev_notifier(struct notifier_block *nb); |
---|
180 | 271 | int call_switchdev_notifiers(unsigned long val, struct net_device *dev, |
---|
181 | | - struct switchdev_notifier_info *info); |
---|
| 272 | + struct switchdev_notifier_info *info, |
---|
| 273 | + struct netlink_ext_ack *extack); |
---|
| 274 | + |
---|
| 275 | +int register_switchdev_blocking_notifier(struct notifier_block *nb); |
---|
| 276 | +int unregister_switchdev_blocking_notifier(struct notifier_block *nb); |
---|
| 277 | +int call_switchdev_blocking_notifiers(unsigned long val, struct net_device *dev, |
---|
| 278 | + struct switchdev_notifier_info *info, |
---|
| 279 | + struct netlink_ext_ack *extack); |
---|
| 280 | + |
---|
182 | 281 | void switchdev_port_fwd_mark_set(struct net_device *dev, |
---|
183 | 282 | struct net_device *group_dev, |
---|
184 | 283 | bool joining); |
---|
185 | 284 | |
---|
186 | | -bool switchdev_port_same_parent_id(struct net_device *a, |
---|
187 | | - struct net_device *b); |
---|
| 285 | +int switchdev_handle_port_obj_add(struct net_device *dev, |
---|
| 286 | + struct switchdev_notifier_port_obj_info *port_obj_info, |
---|
| 287 | + bool (*check_cb)(const struct net_device *dev), |
---|
| 288 | + int (*add_cb)(struct net_device *dev, |
---|
| 289 | + const struct switchdev_obj *obj, |
---|
| 290 | + struct switchdev_trans *trans, |
---|
| 291 | + struct netlink_ext_ack *extack)); |
---|
| 292 | +int switchdev_handle_port_obj_del(struct net_device *dev, |
---|
| 293 | + struct switchdev_notifier_port_obj_info *port_obj_info, |
---|
| 294 | + bool (*check_cb)(const struct net_device *dev), |
---|
| 295 | + int (*del_cb)(struct net_device *dev, |
---|
| 296 | + const struct switchdev_obj *obj)); |
---|
188 | 297 | |
---|
189 | | -#define SWITCHDEV_SET_OPS(netdev, ops) ((netdev)->switchdev_ops = (ops)) |
---|
| 298 | +int switchdev_handle_port_attr_set(struct net_device *dev, |
---|
| 299 | + struct switchdev_notifier_port_attr_info *port_attr_info, |
---|
| 300 | + bool (*check_cb)(const struct net_device *dev), |
---|
| 301 | + int (*set_cb)(struct net_device *dev, |
---|
| 302 | + const struct switchdev_attr *attr, |
---|
| 303 | + struct switchdev_trans *trans)); |
---|
190 | 304 | #else |
---|
191 | 305 | |
---|
192 | 306 | static inline void switchdev_deferred_process(void) |
---|
193 | 307 | { |
---|
194 | | -} |
---|
195 | | - |
---|
196 | | -static inline int switchdev_port_attr_get(struct net_device *dev, |
---|
197 | | - struct switchdev_attr *attr) |
---|
198 | | -{ |
---|
199 | | - return -EOPNOTSUPP; |
---|
200 | 308 | } |
---|
201 | 309 | |
---|
202 | 310 | static inline int switchdev_port_attr_set(struct net_device *dev, |
---|
.. | .. |
---|
206 | 314 | } |
---|
207 | 315 | |
---|
208 | 316 | static inline int switchdev_port_obj_add(struct net_device *dev, |
---|
209 | | - const struct switchdev_obj *obj) |
---|
| 317 | + const struct switchdev_obj *obj, |
---|
| 318 | + struct netlink_ext_ack *extack) |
---|
210 | 319 | { |
---|
211 | 320 | return -EOPNOTSUPP; |
---|
212 | 321 | } |
---|
.. | .. |
---|
229 | 338 | |
---|
230 | 339 | static inline int call_switchdev_notifiers(unsigned long val, |
---|
231 | 340 | struct net_device *dev, |
---|
232 | | - struct switchdev_notifier_info *info) |
---|
| 341 | + struct switchdev_notifier_info *info, |
---|
| 342 | + struct netlink_ext_ack *extack) |
---|
233 | 343 | { |
---|
234 | 344 | return NOTIFY_DONE; |
---|
235 | 345 | } |
---|
236 | 346 | |
---|
237 | | -static inline bool switchdev_port_same_parent_id(struct net_device *a, |
---|
238 | | - struct net_device *b) |
---|
| 347 | +static inline int |
---|
| 348 | +register_switchdev_blocking_notifier(struct notifier_block *nb) |
---|
239 | 349 | { |
---|
240 | | - return false; |
---|
| 350 | + return 0; |
---|
241 | 351 | } |
---|
242 | 352 | |
---|
243 | | -#define SWITCHDEV_SET_OPS(netdev, ops) do {} while (0) |
---|
| 353 | +static inline int |
---|
| 354 | +unregister_switchdev_blocking_notifier(struct notifier_block *nb) |
---|
| 355 | +{ |
---|
| 356 | + return 0; |
---|
| 357 | +} |
---|
244 | 358 | |
---|
| 359 | +static inline int |
---|
| 360 | +call_switchdev_blocking_notifiers(unsigned long val, |
---|
| 361 | + struct net_device *dev, |
---|
| 362 | + struct switchdev_notifier_info *info, |
---|
| 363 | + struct netlink_ext_ack *extack) |
---|
| 364 | +{ |
---|
| 365 | + return NOTIFY_DONE; |
---|
| 366 | +} |
---|
| 367 | + |
---|
| 368 | +static inline int |
---|
| 369 | +switchdev_handle_port_obj_add(struct net_device *dev, |
---|
| 370 | + struct switchdev_notifier_port_obj_info *port_obj_info, |
---|
| 371 | + bool (*check_cb)(const struct net_device *dev), |
---|
| 372 | + int (*add_cb)(struct net_device *dev, |
---|
| 373 | + const struct switchdev_obj *obj, |
---|
| 374 | + struct switchdev_trans *trans, |
---|
| 375 | + struct netlink_ext_ack *extack)) |
---|
| 376 | +{ |
---|
| 377 | + return 0; |
---|
| 378 | +} |
---|
| 379 | + |
---|
| 380 | +static inline int |
---|
| 381 | +switchdev_handle_port_obj_del(struct net_device *dev, |
---|
| 382 | + struct switchdev_notifier_port_obj_info *port_obj_info, |
---|
| 383 | + bool (*check_cb)(const struct net_device *dev), |
---|
| 384 | + int (*del_cb)(struct net_device *dev, |
---|
| 385 | + const struct switchdev_obj *obj)) |
---|
| 386 | +{ |
---|
| 387 | + return 0; |
---|
| 388 | +} |
---|
| 389 | + |
---|
| 390 | +static inline int |
---|
| 391 | +switchdev_handle_port_attr_set(struct net_device *dev, |
---|
| 392 | + struct switchdev_notifier_port_attr_info *port_attr_info, |
---|
| 393 | + bool (*check_cb)(const struct net_device *dev), |
---|
| 394 | + int (*set_cb)(struct net_device *dev, |
---|
| 395 | + const struct switchdev_attr *attr, |
---|
| 396 | + struct switchdev_trans *trans)) |
---|
| 397 | +{ |
---|
| 398 | + return 0; |
---|
| 399 | +} |
---|
245 | 400 | #endif |
---|
246 | 401 | |
---|
247 | 402 | #endif /* _LINUX_SWITCHDEV_H_ */ |
---|