mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net 0/2] enic: fix V2 VF mailbox reply matching and carrier reopen
@ 2026-08-30 22:22 Satish Kharat
  2026-08-30 22:22 ` [PATCH net 1/2] enic: preserve V2 VF carrier across netdev reopen Satish Kharat
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Satish Kharat @ 2026-08-30 22:22 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: netdev, Sesidhar Baddela, linux-kernel, Satish Kharat

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@cisco.com>
---
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@cisco.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-04  2:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-30 22:22 [PATCH net 0/2] enic: fix V2 VF mailbox reply matching and carrier reopen Satish Kharat
2026-08-30 22:22 ` [PATCH net 1/2] enic: preserve V2 VF carrier across netdev reopen Satish Kharat
2026-08-30 22:22 ` [PATCH net 2/2] enic: match mailbox replies to request numbers Satish Kharat
2026-09-03 15:23   ` [net,2/2] " netdev-bot+sashiko
2026-09-04  2:20 ` [PATCH net 0/2] enic: fix V2 VF mailbox reply matching and carrier reopen patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®