[PATCH net 0/2] enic: fix V2 VF mailbox reply matching and carrier reopen
From: Satish Kharat
Date: Sun Aug 30 2026 - 18:24:51 EST
Preserve ENIC V2 VF carrier state across netdev reopen and match mailbox
replies to their originating requests.
A V2 VF receives carrier state from PF MBOX notifications. enic_stop()
forces carrier off, but enic_open() does not request another notification
or restore the previous state. An ordinary netdev close/open can therefore
leave the VF without carrier until the PF sends another link-state
notification.
The first patch preserves the last PF-reported link state across an
ordinary netdev close/open. Internal reset paths invalidate the saved state
before reopening the datapath, so carrier remains off until the PF provides
a new notification.
Mailbox messages carry a message number that replies and acknowledgments
echo. ENIC currently assigns a new number to outgoing replies and accepts
VF replies by message type alone. After a request times out, a delayed
reply can therefore satisfy a later request of the same type.
The second patch makes PF replies and the VF link-state acknowledgment echo
the initiating message number. The VF accepts a reply only when both its
type and message number match the pending request. Reply handling and
timeout cleanup are protected by the same lock, and message numbering
remains monotonic across admin-channel reopen.
Validation:
- The VF module with this series applied passed multiple netdev close/open
and ENIC module unload/reload cycles, as well as guest reboot testing,
with carrier restored as expected after each operation.
- With this series folded into the full SR-IOV development stack, VFIO
guests passed bidirectional cross-DUT PF-to-VF, VF-to-PF, and VF-to-VF
traffic using standard-sized and 8972-byte jumbo ICMP packets.
Signed-off-by: Satish Kharat <satishkh@xxxxxxxxx>
---
Satish Kharat (2):
enic: preserve V2 VF carrier across netdev reopen
enic: match mailbox replies to request numbers
drivers/net/ethernet/cisco/enic/enic.h | 26 ++-
drivers/net/ethernet/cisco/enic/enic_main.c | 25 ++-
drivers/net/ethernet/cisco/enic/enic_mbox.c | 309 +++++++++++++++++-----------
drivers/net/ethernet/cisco/enic/enic_mbox.h | 2 +
4 files changed, 233 insertions(+), 129 deletions(-)
---
base-commit: 2188569e7e1b0bc3f3b557dc97ab7a02befc11c8
change-id: 20260829-b4-enic-v2-mbox-fixes-net-f8588b813e4d
Best regards,
--
Satish Kharat <satishkh@xxxxxxxxx>