switchdev.h (b7a9e0da2d1c954b7c38217a29e002528b90d174) | switchdev.h (ffb68fc58e9640762be891f9aebe4f5aac615ab3) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * include/net/switchdev.h - Switch device API 4 * Copyright (c) 2014-2015 Jiri Pirko <jiri@resnulli.us> 5 * Copyright (c) 2014-2015 Scott Feldman <sfeldma@gmail.com> 6 */ 7#ifndef _LINUX_SWITCHDEV_H_ 8#define _LINUX_SWITCHDEV_H_ --- 219 unchanged lines hidden (view full) --- 228 u16 vid; 229 u8 added_by_user:1, 230 offloaded:1; 231}; 232 233struct switchdev_notifier_port_obj_info { 234 struct switchdev_notifier_info info; /* must be first */ 235 const struct switchdev_obj *obj; | 1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * include/net/switchdev.h - Switch device API 4 * Copyright (c) 2014-2015 Jiri Pirko <jiri@resnulli.us> 5 * Copyright (c) 2014-2015 Scott Feldman <sfeldma@gmail.com> 6 */ 7#ifndef _LINUX_SWITCHDEV_H_ 8#define _LINUX_SWITCHDEV_H_ --- 219 unchanged lines hidden (view full) --- 228 u16 vid; 229 u8 added_by_user:1, 230 offloaded:1; 231}; 232 233struct switchdev_notifier_port_obj_info { 234 struct switchdev_notifier_info info; /* must be first */ 235 const struct switchdev_obj *obj; |
236 struct switchdev_trans *trans; | |
237 bool handled; 238}; 239 240struct switchdev_notifier_port_attr_info { 241 struct switchdev_notifier_info info; /* must be first */ 242 const struct switchdev_attr *attr; 243 struct switchdev_trans *trans; 244 bool handled; --- 38 unchanged lines hidden (view full) --- 283 struct net_device *group_dev, 284 bool joining); 285 286int switchdev_handle_port_obj_add(struct net_device *dev, 287 struct switchdev_notifier_port_obj_info *port_obj_info, 288 bool (*check_cb)(const struct net_device *dev), 289 int (*add_cb)(struct net_device *dev, 290 const struct switchdev_obj *obj, | 236 bool handled; 237}; 238 239struct 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; --- 38 unchanged lines hidden (view full) --- 282 struct net_device *group_dev, 283 bool joining); 284 285int 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, |
291 struct switchdev_trans *trans, | |
292 struct netlink_ext_ack *extack)); 293int switchdev_handle_port_obj_del(struct net_device *dev, 294 struct switchdev_notifier_port_obj_info *port_obj_info, 295 bool (*check_cb)(const struct net_device *dev), 296 int (*del_cb)(struct net_device *dev, 297 const struct switchdev_obj *obj)); 298 299int switchdev_handle_port_attr_set(struct net_device *dev, --- 67 unchanged lines hidden (view full) --- 367} 368 369static inline int 370switchdev_handle_port_obj_add(struct net_device *dev, 371 struct switchdev_notifier_port_obj_info *port_obj_info, 372 bool (*check_cb)(const struct net_device *dev), 373 int (*add_cb)(struct net_device *dev, 374 const struct switchdev_obj *obj, | 290 struct netlink_ext_ack *extack)); 291int 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 297int switchdev_handle_port_attr_set(struct net_device *dev, --- 67 unchanged lines hidden (view full) --- 365} 366 367static 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, |
375 struct switchdev_trans *trans, | |
376 struct netlink_ext_ack *extack)) 377{ 378 return 0; 379} 380 381static inline int 382switchdev_handle_port_obj_del(struct net_device *dev, 383 struct switchdev_notifier_port_obj_info *port_obj_info, --- 20 unchanged lines hidden --- | 373 struct netlink_ext_ack *extack)) 374{ 375 return 0; 376} 377 378static inline int 379switchdev_handle_port_obj_del(struct net_device *dev, 380 struct switchdev_notifier_port_obj_info *port_obj_info, --- 20 unchanged lines hidden --- |