aboutsummaryrefslogtreecommitdiff
path: root/drivers/ntb
diff options
context:
space:
mode:
authorTaehee Yoo2022-07-17 16:09:03 +0000
committerPaolo Abeni2022-07-19 12:37:02 +0200
commit30e22a6ebca039572ce9bc10f1934f4eabfb5b7f (patch)
treefdac85fda8d87241c107c26526651353544742a6 /drivers/ntb
parent1774559f07993e1cac33c2406e99049d4bdea6c8 (diff)
amt: use workqueue for gateway side message handling
There are some synchronization issues(amt->status, amt->req_cnt, etc) if the interface is in gateway mode because gateway message handlers are processed concurrently. This applies a work queue for processing these messages instead of expanding the locking context. So, the purposes of this patch are to fix exist race conditions and to make gateway to be able to validate a gateway status more correctly. When the AMT gateway interface is created, it tries to establish to relay. The establishment step looks stateless, but it should be managed well. In order to handle messages in the gateway, it saves the current status(i.e. AMT_STATUS_XXX). This patch makes gateway code to be worked with a single thread. Now, all messages except the multicast are triggered(received or delay expired), and these messages will be stored in the event queue(amt->events). Then, the single worker processes stored messages asynchronously one by one. The multicast data message type will be still processed immediately. Now, amt->lock is only needed to access the event queue(amt->events) if an interface is the gateway mode. Fixes: cbc21dc1cfe9 ("amt: add data plane of amt interface") Signed-off-by: Taehee Yoo <ap420073@gmail.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/ntb')
0 files changed, 0 insertions, 0 deletions