mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/6] enic: configure V2 VF addresses and receive mode
@ 2026-09-29 18:58 Satish Kharat
  2026-09-29 18:58 ` [PATCH net-next v2 1/6] net: add netif_rx_mode_schedule_update() Satish Kharat
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Satish Kharat @ 2026-09-29 18:58 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Simon Horman
  Cc: netdev, linux-kernel, Satish Kharat, sebaddel

An ENIC V2 VF cannot program its station address or receive filters
directly. The PF owns those resources and exposes mailbox operations for
the VF to request changes. Add the VF control plane needed to use those
operations for station-address, address-list, and packet-filter
configuration.

The mailbox transport remains asynchronous: receive dispatch continues to
process replies and unsolicited PF notifications. The VF allows only one
request/reply transaction at a time because it stores one expected reply
and uses one completion. This serialization applies only to VF requests;
PF-side request processing is unchanged. Notifications and their
acknowledgments remain deferred and asynchronous.

The first patch adds a netdev helper for scheduling an immediate
receive-mode update with a new retry budget. Callers which need to replay
lost address state explicitly reset the corresponding synchronization state
before scheduling the update. The second patch serializes only VF requests.
The third patch recovers when a lost or malformed reply means that the VF
does not know which changes the PF applied. A hardware send timeout is
handled separately because the descriptor may still belong to the device.

The remaining patches add and validate the configuration operations,
manage station and administrative MAC changes, and install address lists
and packet-filter settings through the sleepable receive-mode path. Replies
are checked against the requested operation. If a station-address
replacement deletes the old address but fails to add the new one, the VF
registers again and rebuilds its mailbox state instead of assuming which
address the PF kept.

This is the VF-side receive-control series. It does not register
.sriov_configure, so the in-tree V2 PF path remains dormant. A later PF
activation series must implement the PF side of the MAC-address and
packet-filter mailbox requests, including the VF policy checks, before
wiring that callback.

AI assistance:

An LLM was used for design review, source review, commit-message
drafting, test automation, and review triage. Sashiko was used as an
additional review tool. All findings and generated changes were manually
reviewed, and the author takes responsibility for the series.

Validation:

- The exact v2 VF module against the deployed async PF passed 32 secondary
  unicast addresses, station-address add/delete through the multicast list,
  and fixed administrative-MAC enforcement across a close/open.
- Isolated test-only fault and timing controls verified bounded behavior
  under persistent registration rejection, no reconnect after a coherent
  generic MAC-operation rejection, convergence when an address changed
  during receive-mode processing, and synchronous broad-to-exact filter
  completion.
- With all injections disabled, the exact v2 VF passed 20 multicast
  add/delete operations, three close/open cycles, statistics retrieval, and
  bidirectional traffic. Bounded host and guest kernel-health scans found
  no new fault report. The installed kernel was not rebuilt or rebooted.

Signed-off-by: Satish Kharat <satishkh@cisco.com>
---
Changes in v2:
- Rename the netdev helper to netif_rx_mode_schedule_update() and clarify
  that it resets retry state and schedules reconciliation without itself
  forcing a complete address-list replay.
- Stop a failed registration-recovery handshake from requeueing its own
  reset worker indefinitely.
- Keep coherent generic MAC-operation failures as ordinary errors;
  reconnect only after explicit registration loss or an indeterminate reply.
- Enforce a cached fixed administrative MAC while the VF is down and repair
  an actual device-address mismatch during registration.
- Preserve compatibility with deployed async PFs at 32 secondary unicast
  addresses and exclude the station address from both secondary lists.
- Complete receive-mode transitions in one callback so concurrent list
  changes converge and synchronous operations return with filters
  installed.
- Link to v1: https://patch.msgid.link/20260921-b4-enic-sriov-v2-vf-receive-control-v1-0-67a0a6e08d43@cisco.com

---
Satish Kharat (6):
      net: add netif_rx_mode_schedule_update()
      enic: serialize V2 VF mailbox requests
      enic: recover V2 VF mailbox when PF state is unknown
      enic: validate V2 VF configuration replies
      enic: manage V2 VF station and administrative MAC
      enic: configure V2 VF receive mode over mailbox

 drivers/net/ethernet/cisco/enic/enic.h       |   58 +-
 drivers/net/ethernet/cisco/enic/enic_admin.c |   29 +-
 drivers/net/ethernet/cisco/enic/enic_dev.c   |   11 +
 drivers/net/ethernet/cisco/enic/enic_dev.h   |    1 +
 drivers/net/ethernet/cisco/enic/enic_main.c  | 1251 +++++++++++++++++++++++++-
 drivers/net/ethernet/cisco/enic/enic_mbox.c  |  739 ++++++++++++++-
 drivers/net/ethernet/cisco/enic/enic_mbox.h  |   84 ++
 drivers/net/ethernet/cisco/enic/enic_rq.c    |   11 +-
 include/linux/netdevice.h                    |    1 +
 net/core/dev_addr_lists.c                    |   21 +
 10 files changed, 2126 insertions(+), 80 deletions(-)
---
base-commit: 8830e65ed46de41f849eefb8ba227d4852c460f6
change-id: 20260916-b4-enic-sriov-v2-vf-receive-control-b5c40bdae5b9

Best regards,
--  
Satish Kharat <satishkh@cisco.com>


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

end of thread, other threads:[~2026-10-03 19:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-29 18:58 [PATCH net-next v2 0/6] enic: configure V2 VF addresses and receive mode Satish Kharat
2026-09-29 18:58 ` [PATCH net-next v2 1/6] net: add netif_rx_mode_schedule_update() Satish Kharat
2026-09-29 18:58 ` [PATCH net-next v2 2/6] enic: serialize V2 VF mailbox requests Satish Kharat
2026-09-29 18:58 ` [PATCH net-next v2 3/6] enic: recover V2 VF mailbox when PF state is unknown Satish Kharat
2026-10-03 19:50   ` netdev-bot+sashiko
2026-09-29 18:58 ` [PATCH net-next v2 4/6] enic: validate V2 VF configuration replies Satish Kharat
2026-10-03 19:50   ` netdev-bot+sashiko
2026-09-29 18:58 ` [PATCH net-next v2 5/6] enic: manage V2 VF station and administrative MAC Satish Kharat
2026-10-03 19:50   ` netdev-bot+sashiko
2026-09-29 18:58 ` [PATCH net-next v2 6/6] enic: configure V2 VF receive mode over mailbox Satish Kharat
2026-10-03 19:50   ` netdev-bot+sashiko

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®