diff options
author | David S. Miller <davem@davemloft.net> | 2015-09-29 21:32:00 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-29 21:32:00 -0700 |
commit | eef50d466a47bb6a57f2e55a9415c716c463255b (patch) | |
tree | 0de3c7ff01fb38431f52e1977151ba299c0c1cfb /net/ipv6/tcp_ipv6.c | |
parent | 79b0eb2aadfefaecb34c84453bd44d3264c4c781 (diff) | |
parent | 44bbcf5c4a19a8be43ba35ca7e22310e171f022c (diff) | |
download | linux-eef50d466a47bb6a57f2e55a9415c716c463255b.tar.bz2 |
Merge branch 'switchdev-callback'
Vivien Didelot says:
====================
net: switchdev: use specific switchdev_obj_*
This patchset changes switchdev add, del, dump operations from this:
int (*switchdev_port_obj_add)(struct net_device *dev,
struct switchdev_obj *obj,
struct switchdev_trans *trans);
int (*switchdev_port_obj_del)(struct net_device *dev,
struct switchdev_obj *obj);
int (*switchdev_port_obj_dump)(struct net_device *dev,
struct switchdev_obj *obj);
to something similar to the notifier_call callback of a notifier_block:
int (*switchdev_port_obj_add)(struct net_device *dev,
enum switchdev_obj_id id,
const void *obj,
struct switchdev_trans *trans);
int (*switchdev_port_obj_del)(struct net_device *dev,
enum switchdev_obj_id id,
const void *obj);
int (*switchdev_port_obj_dump)(struct net_device *dev,
enum switchdev_obj_id id, void *obj,
int (*cb)(void *obj));
This allows the caller to pass and expect back a specific switchdev_obj_*
structure (e.g. switchdev_obj_fdb) instead of the generic switchdev_obj one.
This will simplify pushing the callback function down to the drivers.
The first 3 patches get rid of the dev parameter of the dump callback, since it
is not always neeeded (e.g. vlan_dump) and some drivers (such as DSA drivers)
may not have easy access to it.
Patches 4 and 5 implement the change in the switchdev operations and its users.
Patch 6 extracts the inner switchdev_obj_* structures from switchdev_obj and
removes this last one.
v2: fix error spotted by kbuild (extra ';' inline switchdev_port_obj_dump).
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
0 files changed, 0 insertions, 0 deletions