0bc05d58 | 14-Oct-2015 |
Jiri Pirko <jiri@mellanox.com> |
switchdev: allow caller to explicitly request attr_set as deferred
Caller should know if he can call attr_set directly (when holding RTNL) or if he has to defer the att_set processing for later.
Th
switchdev: allow caller to explicitly request attr_set as deferred
Caller should know if he can call attr_set directly (when holding RTNL) or if he has to defer the att_set processing for later.
This also allows drivers to sleep inside attr_set and report operation status back to switchdev core. Switchdev core then warns if status is not ok, instead of silent errors happening in drivers.
Benefit from newly introduced switchdev deferred ops infrastructure.
Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
ab069002 | 29-Sep-2015 |
Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
net: switchdev: abstract object in add/del ops
Similar to the notifier_call callback of a notifier_block, change the function signature of switchdev add and del operations to:
int switchdev_por
net: switchdev: abstract object in add/del ops
Similar to the notifier_call callback of a notifier_block, change the function signature of switchdev add and del operations to:
int switchdev_port_obj_add/del(struct net_device *dev, enum switchdev_obj_id id, void *obj);
This allows the caller to pass a specific switchdev_obj_* structure instead of the generic switchdev_obj one.
Drivers implementation of these operations and switchdev have been changed accordingly.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
25f07adc | 29-Sep-2015 |
Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
net: switchdev: pass callback to dump operation
Similar to the notifier_call callback of a notifier_block, change the function signature of switchdev dump operation to:
int switchdev_port_obj_d
net: switchdev: pass callback to dump operation
Similar to the notifier_call callback of a notifier_block, change the function signature of switchdev dump operation to:
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 instead of the generic switchdev_obj one.
Drivers implementation of dump operation can now expect this specific structure and call the callback with it. Drivers have been changed accordingly.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
03d5fb18 | 29-Sep-2015 |
Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
net: switchdev: remove dev from switchdev_obj cb
The net_device associated to a dump operation does not have to be passed to the callback. switchdev stores it in a superset struct, if needed.
Also
net: switchdev: remove dev from switchdev_obj cb
The net_device associated to a dump operation does not have to be passed to the callback. switchdev stores it in a superset struct, if needed.
Also some drivers (such as DSA drivers) may not have easy access to it.
This will simplify pushing the callback function down to the drivers.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
e02a06b2 | 29-Sep-2015 |
Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
net: switchdev: move dev in switchdev_fdb_dump
The FDB dump callback requires the related net_device so move it to the struct switchdev_fdb_dump superset instead of using a callback param.
With thi
net: switchdev: move dev in switchdev_fdb_dump
The FDB dump callback requires the related net_device so move it to the struct switchdev_fdb_dump superset instead of using a callback param.
With this done, it'll be simpler to change the dump function signature.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
f623ab7f | 24-Sep-2015 |
Jiri Pirko <jiri@mellanox.com> |
switchdev: reduce transaction phase enum down to a boolean
Now, since we have only 2 values for transaction phase, just use bool.
Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David
switchdev: reduce transaction phase enum down to a boolean
Now, since we have only 2 values for transaction phase, just use bool.
Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
9f6467cf | 24-Sep-2015 |
Jiri Pirko <jiri@mellanox.com> |
switchdev: remove "ABORT" transaction phase
No longer used by drivers, as transaction queue with item destructors takes care of abort phase internally in switchdev code. So kill it.
Signed-off-by:
switchdev: remove "ABORT" transaction phase
No longer used by drivers, as transaction queue with item destructors takes care of abort phase internally in switchdev code. So kill it.
Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
f8db8348 | 24-Sep-2015 |
Jiri Pirko <jiri@mellanox.com> |
switchdev: move transaction phase enum under transaction structure
Before it disappears completely, move transaction phase enum under transaction structure and make attr/obj structures a bit cleaner
switchdev: move transaction phase enum under transaction structure
Before it disappears completely, move transaction phase enum under transaction structure and make attr/obj structures a bit cleaner.
Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
7ea6eb3f | 24-Sep-2015 |
Jiri Pirko <jiri@mellanox.com> |
switchdev: introduce transaction item queue for attr_set and obj_add
Now, the memory allocation in prepare/commit state is done separatelly in each driver (rocker). Introduce the similar mechanism i
switchdev: introduce transaction item queue for attr_set and obj_add
Now, the memory allocation in prepare/commit state is done separatelly in each driver (rocker). Introduce the similar mechanism in generic switchdev code, in form of queue. That can be used not only for memory allocations, but also for different items. Abort item destruction is handled as well.
Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
ce80e7bc | 10-Aug-2015 |
Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
net: switchdev: support static FDB addresses
This patch adds an ndm_state member to the switchdev_obj_fdb structure, in order to support static FDB addresses.
Set Rocker ndm_state to NUD_REACHABLE.
net: switchdev: support static FDB addresses
This patch adds an ndm_state member to the switchdev_obj_fdb structure, in order to support static FDB addresses.
Set Rocker ndm_state to NUD_REACHABLE.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Acked-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|