]> git.baikalelectronics.ru Git - kernel.git/commit
IB/core: Add ordered workqueue for RoCE GID management
authorMajd Dibbiny <majd@mellanox.com>
Tue, 30 May 2017 06:58:06 +0000 (09:58 +0300)
committerDoug Ledford <dledford@redhat.com>
Tue, 18 Jul 2017 01:21:25 +0000 (21:21 -0400)
commitaa8787099fc9e838c538ae581d60b7f682f0426b
tree095c7eea7f03591ca4c5a6615e7257c31c80be41
parent848293625d0aabddab83a91929583d23c167d7c0
IB/core: Add ordered workqueue for RoCE GID management

Currently the RoCE GID management uses the ib_wq to do add and delete new GIDs
according to the netdev events.

The ib_wq isn't an ordered workqueue and thus two work elements can be executed
concurrently which will result in unexpected behavior and inconsistency of the
GIDs cache content.

Example:
ifconfig eth1 11.11.11.11/16 up

This command will invoke the following netdev events in the following order:
1. NETDEV_UP
2. NETDEV_DOWN
3. NETDEV_UP

If (2) and (3) will be executed concurrently or in reverse order, instead of
having a new GID with 11.11.11.11 IP, we will end up without any new GIDs.

Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/roce_gid_mgmt.c