switchdev: introduce possibility to defer obj_add/del

Similar to the attr usecase, the caller knows if he is holding RTNL and is
in atomic section. So let the called to decide the correct call variant.

This allows drivers to sleep inside their ops and wait for hw to get the
operation status. Then the status is propagated into switchdev core.
This avoids silent errors in drivers.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Pirko
2015-10-14 19:40:52 +02:00
committed by David S. Miller
parent 850d0cbc91
commit 4d429c5ddc
2 changed files with 81 additions and 20 deletions
+1
View File
@@ -69,6 +69,7 @@ enum switchdev_obj_id {
struct switchdev_obj {
enum switchdev_obj_id id;
u32 flags;
};
/* SWITCHDEV_OBJ_ID_PORT_VLAN */