[PATCH net-next 0/6] enic: configure V2 VF addresses and receive mode
From: Satish Kharat
Date: Mon Sep 21 2026 - 16:10:06 EST
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, complete
receive-mode replay. 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:
- With this 6-patch series, the VF module passed 20 unload/reload cycles,
10 concurrent PF administrative-MAC versus VF unload/reload race cycles,
and concurrent 100-unicast/100-multicast address churn with 20 netdev
reopen cycles. Carrier, the selected address, bidirectional traffic, and
host/guest kernel health were checked.
- With this 6-patch series folded into the full SR-IOV development stack,
the final module passed the 20-case cross-DUT PF/VF TCP, UDP, and
8972-byte jumbo matrix. It also passed 100 unload/reload cycles on each VF
guest, 25 PF administrative-MAC versus VF unload/reload race cycles, and
a 30-minute post-stress traffic and kernel-health soak.
Signed-off-by: Satish Kharat <satishkh@xxxxxxxxx>
---
Satish Kharat (6):
net: add netif_rx_mode_schedule_fresh()
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 | 54 +-
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 | 1259 +++++++++++++++++++++++++-
drivers/net/ethernet/cisco/enic/enic_mbox.c | 740 ++++++++++++++-
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, 2131 insertions(+), 80 deletions(-)
---
base-commit: 8830e65ed46de41f849eefb8ba227d4852c460f6
change-id: 20260916-b4-enic-sriov-v2-vf-receive-control-b5c40bdae5b9
Best regards,
--
Satish Kharat <satishkh@xxxxxxxxx>