summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSatish Kharat <satishkh@cisco.com>2026-08-30 15:22:53 -0700
committerJakub Kicinski <kuba@kernel.org>2026-09-03 19:10:18 -0700
commit8972d252f495d4be4bbfb32d4d9d6c2ff778fea4 (patch)
tree6cb89beb9f3f31db034c57604afb40798918c4c8 /include
parentb752e041d5845d03f285cf7a1f30b38ca7ef92bf (diff)
enic: match mailbox replies to request numbers
The version-1 VF mailbox protocol identifies every message with a message number, and a reply or acknowledgment echoes the number of the message it answers. ENIC instead generates a new number for outgoing replies and accepts a VF reply by message type alone. If a request times out, a delayed reply can therefore satisfy a subsequent request of the same type and cause the VF to consume the result of the old request. Allow replies to reuse the initiating message number. Make the in-tree PF handlers and the VF link-state acknowledgment echo that number. Record the expected reply type and message number on the VF, and require both values to match before accepting a reply. Protect expected-reply state with a lock so reply acceptance and timeout invalidation cannot race. Keep message numbers monotonic across an admin- channel reopen so a delayed reply from an earlier channel generation cannot match a new request. Reply-number echo is part of the established version-1 protocol, so this remains compatible with deployed V2-capable PF implementations that already echo msg_num. Fixes: 72b65c94058e ("enic: add MBOX VF handlers for capability, register and link state") Signed-off-by: Satish Kharat <satishkh@cisco.com> Link: https://patch.msgid.link/20260830-b4-enic-v2-mbox-fixes-net-v1-2-23adf9bfd426@cisco.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions