mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next v4 0/6] enic: add V2 VF receive control over MBOX
@ 2026-11-30 13:58 Satish Kharat
  2026-11-30 13:58 ` [PATCH net-next v4 1/6] net: add netif_rx_mode_schedule_update() Satish Kharat
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Satish Kharat @ 2026-11-30 13:58 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Simon Horman, Willem de Bruijn
  Cc: netdev, linux-kernel, Sesidhar Baddela, Aravind Dhanasekaran,
	Reese Faucette, Satish Kharat

An ENIC V2 VF relies on the PF to program its station address and receive
filters. Add VF mailbox support for the station address, secondary address
lists and packet-filter modes. Serialize VF requests around the single
expected reply slot. Unsolicited PF notifications retain their own path.

Patch 1 adds a netdev helper for starting a new bounded receive-mode retry
sequence. Patch 2 serializes VF request/reply ownership. Patches 3 and 4
recover after uncertain mailbox state and validate configuration replies.
Patches 5 and 6 handle station/admin MAC policy and receive-mode replay.

Net-next includes both prerequisite fixes.

- b3ae89a2e167 ("enic: retain admin-channel DMA until queues stop")
- 65230b3ffd75 ("enic: require DEVCMD2 and set the V2 VF mailbox source")

The six patches prepare the VF side. The in-tree V2 PF enable path remains
dormant until a later series supplies the PF mailbox and cleanup contracts
and registers sriov_configure. The VF expects a compatible PF. Queue-error
recovery still uses VF SOFT_RESET with that PF's command permission. VF
soft-reset failure detaches the device. The direct ERR_EBADSTATE handling
mentioned in the v3 reply belongs to a separate PF setup/teardown path.
Ordinary VF stop requests deletion of the tracked station address while
the VF is registered. Firmware readback covered the tested administrative
MAC changes while the VF was closed and on the subsequent open.

A coherent request-wide MAC error relies on the PF rejecting the request
before it applies operations. Per-entry failures use detailed replies;
lost or indeterminate replies require reconnect. A rejected station ADD
can cause a PF to skip earlier station DELETEs at precheck. The secondary
filter batch has no station flag, and an unexpected skipped secondary
DELETE still requires reconnect. The earlier uniform spoof-check denial
test does not establish fairness for arbitrary per-entry policy denials.

Hardware validation

- With a compatible PF, the final VF reopened after down/up and adopted a
  changed PF-assigned MAC while preserving its probe-time perm_addr.
  Firmware readback confirmed secondary unicast and multicast filters were
  added and removed while the station entry stayed installed. Bidirectional
  ICMP completed without packet loss.
- Earlier hardware A/B tests recovered one valid exact-filter entry at
  each tested unicast and multicast capacity boundary by excluding the
  all-zero address. Switching between fixed and delegated MAC policy
  preserved perm_addr and reported SET and RANDOM, respectively.
- Earlier full-stack PF/VF tests covered VFIO passthrough, VF recreation,
  module reload, ring resizing, and bidirectional ICMP, TCP and UDP,
  including jumbo traffic. In separate tests, three pairings using the
  historical async driver passed traffic and lost lockdep coverage after
  warnings from that driver.
- Earlier instrumented hardware tests showed that a queued mailbox
  recovery skipped HANG_NOTIFY and reset once a normal reopen had
  cleared the fault. After an injected failure following CMD_ENABLE,
  the unwind cleared pending RX completions. The VF reopened on the same
  rings and traffic resumed. An injected QP_DISABLE error still allowed
  VF reopen and traffic once both admin queues had stopped.

LLM assisted with implementation, review, draft wording and
test tooling. Sashiko findings were used in v4 review and triage.

Changes in v4
- Name the first callers of netif_rx_mode_schedule_update().
- Extend devcmd_lock coverage to generic hang-reset and soft-reset
  start and status commands. Explain the compatible-PF requirement
  for V2 VF soft reset.
- Carry the mailbox recovery reason in a dedicated work item. Only genuine
  Tx watchdog work sends HANG_NOTIFY. After successful recovery, queue
  another pass only if reconnect or poisoned-send state is still pending.
- Clarify the handling of malformed existing replies and notifications and
  the conservative reconnect for an errno-style packet-filter failure.
- Apply pending PF policy before station installation and, after a clean
  policy rejection, refresh and retry once if the selected address changes.
  Record probe-time perm_addr while preserving RANDOM/SET assignment.
- Exclude zero and wrong-list-class addresses from requested counts and
  exact-filter operations. The PF keeps one entry per MAC. Keep counter
  inconsistency errors sticky when processing later ADD results.
- Link to v3: https://patch.msgid.link/20261118-b4-enic-sriov-v2-vf-receive-control-v3-0-2cb25677aa8c@cisco.com

Changes in v3
- Depend on the two admin/source fixes from net v7. Keep generic datapath
  DMA quarantine outside this series.
- Preserve admin DMA until queue stop is confirmed, keep VF registration
  and datapath lifecycle balanced, and authenticate PF completions from CQ
  metadata. Bound recovery after failed handshakes.
- Reserve 31 secondary UC slots because the PF counts the station in the
  same 32-entry table. Replay receive mode after a datapath rebuild.
- Link to v2: https://patch.msgid.link/20260929-b4-enic-sriov-v2-vf-receive-control-v2-0-5962c10061b2@cisco.com

Changes in v2
- Bound reconnect, respect a cached administrative MAC while closed and
  reconcile receive mode in one asynchronous callback.
- Link to v1: https://patch.msgid.link/20260921-b4-enic-sriov-v2-vf-receive-control-v1-0-67a0a6e08d43@cisco.com

Link: https://lore.kernel.org/netdev/20261109-b4-enic-dma-vf-index-net-generic-first-v1-20261010-v7-0-30ca6f467673@cisco.com/
Signed-off-by: Satish Kharat <satishkh@cisco.com>
---
Satish Kharat (6):
      net: add netif_rx_mode_schedule_update()
      enic: serialize V2 VF mailbox requests
      enic: recover V2 VF mailbox after request failure
      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   |   39 +-
 drivers/net/ethernet/cisco/enic/enic_dev.c     |   11 +
 drivers/net/ethernet/cisco/enic/enic_dev.h     |    1 +
 drivers/net/ethernet/cisco/enic/enic_ethtool.c |    5 +
 drivers/net/ethernet/cisco/enic/enic_main.c    | 1729 ++++++++++++++++++++++--
 drivers/net/ethernet/cisco/enic/enic_mbox.c    |  751 +++++++++-
 drivers/net/ethernet/cisco/enic/enic_mbox.h    |   84 ++
 drivers/net/ethernet/cisco/enic/enic_rq.c      |   11 +-
 drivers/net/ethernet/cisco/enic/vnic_dev.c     |   21 +-
 drivers/net/ethernet/cisco/enic/vnic_dev.h     |    2 +
 include/linux/netdevice.h                      |    1 +
 net/core/dev_addr_lists.c                      |   21 +
 13 files changed, 2597 insertions(+), 137 deletions(-)
---
base-commit: d6816d9a93b66a12bf01e10037e377f3333ad6cc
change-id: 20260916-b4-enic-sriov-v2-vf-receive-control-b5c40bdae5b9

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


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

end of thread, other threads:[~2026-12-01 14:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30 13:58 [PATCH net-next v4 0/6] enic: add V2 VF receive control over MBOX Satish Kharat
2026-11-30 13:58 ` [PATCH net-next v4 1/6] net: add netif_rx_mode_schedule_update() Satish Kharat
2026-11-30 13:58 ` [PATCH net-next v4 2/6] enic: serialize V2 VF mailbox requests Satish Kharat
2026-12-01 14:04   ` netdev-bot+sashiko
2026-11-30 13:58 ` [PATCH net-next v4 3/6] enic: recover V2 VF mailbox after request failure Satish Kharat
2026-12-01 14:04   ` netdev-bot+sashiko
2026-11-30 13:58 ` [PATCH net-next v4 4/6] enic: validate V2 VF configuration replies Satish Kharat
2026-12-01 14:04   ` netdev-bot+sashiko
2026-11-30 13:58 ` [PATCH net-next v4 5/6] enic: manage V2 VF station and administrative MAC Satish Kharat
2026-12-01 14:04   ` netdev-bot+sashiko
2026-11-30 13:58 ` [PATCH net-next v4 6/6] enic: configure V2 VF receive mode over mailbox Satish Kharat
2026-12-01 14:04   ` 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®