switchdev.h (479c86dc551c9720765ed19433990eae6a1f899f) | switchdev.h (6921351359395a6c6ac72cd275a8393f399cecc7) |
---|---|
1/* 2 * include/net/switchdev.h - Switch device API 3 * Copyright (c) 2014-2015 Jiri Pirko <jiri@resnulli.us> 4 * 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 --- 201 unchanged lines hidden (view full) --- 210bool switchdev_port_same_parent_id(struct net_device *a, 211 struct net_device *b); 212 213int switchdev_handle_port_obj_add(struct net_device *dev, 214 struct switchdev_notifier_port_obj_info *port_obj_info, 215 bool (*check_cb)(const struct net_device *dev), 216 int (*add_cb)(struct net_device *dev, 217 const struct switchdev_obj *obj, | 1/* 2 * include/net/switchdev.h - Switch device API 3 * Copyright (c) 2014-2015 Jiri Pirko <jiri@resnulli.us> 4 * 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 --- 201 unchanged lines hidden (view full) --- 210bool switchdev_port_same_parent_id(struct net_device *a, 211 struct net_device *b); 212 213int switchdev_handle_port_obj_add(struct net_device *dev, 214 struct switchdev_notifier_port_obj_info *port_obj_info, 215 bool (*check_cb)(const struct net_device *dev), 216 int (*add_cb)(struct net_device *dev, 217 const struct switchdev_obj *obj, |
218 struct switchdev_trans *trans)); | 218 struct switchdev_trans *trans, 219 struct netlink_ext_ack *extack)); |
219int switchdev_handle_port_obj_del(struct net_device *dev, 220 struct switchdev_notifier_port_obj_info *port_obj_info, 221 bool (*check_cb)(const struct net_device *dev), 222 int (*del_cb)(struct net_device *dev, 223 const struct switchdev_obj *obj)); 224 225#define SWITCHDEV_SET_OPS(netdev, ops) ((netdev)->switchdev_ops = (ops)) 226#else --- 72 unchanged lines hidden (view full) --- 299} 300 301static inline int 302switchdev_handle_port_obj_add(struct net_device *dev, 303 struct switchdev_notifier_port_obj_info *port_obj_info, 304 bool (*check_cb)(const struct net_device *dev), 305 int (*add_cb)(struct net_device *dev, 306 const struct switchdev_obj *obj, | 220int switchdev_handle_port_obj_del(struct net_device *dev, 221 struct switchdev_notifier_port_obj_info *port_obj_info, 222 bool (*check_cb)(const struct net_device *dev), 223 int (*del_cb)(struct net_device *dev, 224 const struct switchdev_obj *obj)); 225 226#define SWITCHDEV_SET_OPS(netdev, ops) ((netdev)->switchdev_ops = (ops)) 227#else --- 72 unchanged lines hidden (view full) --- 300} 301 302static inline int 303switchdev_handle_port_obj_add(struct net_device *dev, 304 struct switchdev_notifier_port_obj_info *port_obj_info, 305 bool (*check_cb)(const struct net_device *dev), 306 int (*add_cb)(struct net_device *dev, 307 const struct switchdev_obj *obj, |
307 struct switchdev_trans *trans)) | 308 struct switchdev_trans *trans, 309 struct netlink_ext_ack *extack)) |
308{ 309 return 0; 310} 311 312static inline int 313switchdev_handle_port_obj_del(struct net_device *dev, 314 struct switchdev_notifier_port_obj_info *port_obj_info, 315 bool (*check_cb)(const struct net_device *dev), 316 int (*del_cb)(struct net_device *dev, 317 const struct switchdev_obj *obj)) 318{ 319 return 0; 320} 321 322#define SWITCHDEV_SET_OPS(netdev, ops) do {} while (0) 323 324#endif 325 326#endif /* _LINUX_SWITCHDEV_H_ */ | 310{ 311 return 0; 312} 313 314static inline int 315switchdev_handle_port_obj_del(struct net_device *dev, 316 struct switchdev_notifier_port_obj_info *port_obj_info, 317 bool (*check_cb)(const struct net_device *dev), 318 int (*del_cb)(struct net_device *dev, 319 const struct switchdev_obj *obj)) 320{ 321 return 0; 322} 323 324#define SWITCHDEV_SET_OPS(netdev, ops) do {} while (0) 325 326#endif 327 328#endif /* _LINUX_SWITCHDEV_H_ */ |