]> git.baikalelectronics.ru Git - kernel.git/commit
switchdev: Adding complete operation to deferred switchdev ops
authorElad Raz <eladr@mellanox.com>
Thu, 21 Apr 2016 10:52:43 +0000 (12:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 24 Apr 2016 18:23:32 +0000 (14:23 -0400)
commit19cb032e8390184c4be269dd498d6d3146925208
tree036274876d95f82a6f64d2fb35409987522951e3
parentb4526d8fa14c23e863af974f93b5125aa1fd0f06
switchdev: Adding complete operation to deferred switchdev ops

When using switchdev deferred operation (SWITCHDEV_F_DEFER), the operation
is executed in different context and the application doesn't have any way
to get the operation real status.

Adding a completion callback fixes that. This patch adds fields to
switchdev_attr and switchdev_obj "complete_priv" field which is used by
the "complete" callback.

Application can set a complete function which will be called once the
operation executed.

Signed-off-by: Elad Raz <eladr@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/switchdev.h
net/switchdev/switchdev.c