diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-22 15:58:00 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-22 15:58:00 -1000 |
| commit | 734bef548a96e8774d6eef5dfa2026c6edc4e80b (patch) | |
| tree | ce2520b2602ce3b82f9842490d21836f9838d441 /include/net/mana | |
| parent | 864c07de0c7dcbca58b61625dfa2e461ae63b242 (diff) | |
| parent | 1a2c35c49cc7c6be860038b8442b52424a8f123c (diff) | |
Merge tag 'net-next-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next
Pull networking updates from Paolo Abeni:
"This includes a significant number of low-priority fixes - especially
in the NIC drivers area - that we deferred from the last few RCs in
the previous cycle, which can't be easily outlined in the synopsis
below.
Core & protocols:
- Continue the work on removing rtnl_lock dependencies:
- per-netns ARP and ND neighbour tables, with the default settings
now configurable per netns (inheritance from init_net is
controlled by the new net.core.neigh_inherit_init_net sysctl)
- RCU-protected configuration and rtnl_lock-less fill_info() for
hsr, netkit, sit, vlan and vxlan devices
- per-netns device unregistration for ip tunnel and gre devices
- use the netdev instance lock instead of rtnl_lock when reading
speed and duplex via sysfs
- batch the flushing of uncached routes at device unregistration
time, relieving rtnl_lock contention on netns dismantle.
- Add hardware pacing offload support, admin-controlled via a new
rtnetlink attribute, with sch_fq integration (implemented in idpf).
- Re-segment BIG TCP GSO packets into GSO packets fitting the egress
device limits instead of plain MSS-sized segments, improving
throughput for mixed BIG TCP / non-BIG TCP paths by up to 70%.
- Generate RSS keys that spread flows over all the RX queues; the
previous random keys could leave some queues unused.
- Optimize the bridge VLAN forwarding paths: cache the port-VLAN in
fdb entries and consider only VLAN members when flooding, for ~10%
more Mpps in the fdb forwarding path.
- A few TCP/IP performance improvements aimed at efficient cache
usage and reducing contention.
- Add the TCP ROCCET congestion control, a CUBIC variant aimed at
avoiding bufferbloat in cellular networks.
- Continue the conversion of getsockopt callbacks to sockopt_t.
- Add an ethtool command to list the front-facing ports of an
interface, including SFP cages and modules, using the phy_port
representation.
- Enable BIG TCP support for bareudp tunnels.
- Remove the IPV6_ADDRFORM socket option and disallow buggy TCP state
transitions (listen() + shutdown() + connect() and connect() +
connect(AF_UNSPEC) + listen()).
- Remove most BUG_ON()s from core packet processing, replacing them
with error paths.
Wireless:
- Latency improvements, including lockless station get/dump and
beacon updates, plus RTNL reduction and locking cleanups.
- Infrastructure for non-station TX/RX with MLO.
- NAN (Wi-Fi Aware) Instant Communication support and other NAN
improvements.
- Control frame Integrity Protocol (CIP) and protected TWT support.
- Improvements for AP regulatory checks.
Netfilter:
- Disable br_netfilter in user namespaces and schedule it for removal
in 2027.
- Restrict the raw table in nft_compat to the specific family, hook
and priority.
- Prepare the flowtable for mixed IPv4-over-IPv6 tunneling (and vice
versa).
- Use GFP_KERNEL_ACCOUNT for most netfilter allocations, for better
integration with memcg.
- Allow discovering conntrack zone filtering support in ctnetlink
dumps, and fix nfnetlink_hook handling of large dumps.
Deletions:
- Move the LLC type 2 sockets out of tree. There are no known users
and the code attracts a never-ending stream of LLM-driven fixes.
Device drivers:
- New drivers:
- Meta Platforms NIC (mpnic), the second-generation NIC from Meta
- initial skeleton of the Nebula-matrix NICs driver (nbl)
- X-Powers AC200/AC300 Fast Ethernet PHYs
- Ethernet high-speed NICs:
- Intel:
- i40e: XDP metadata support for RX hash and VLAN tag
- ice: expose the E825 TSPLL state via the DPLL subsystem
- nVidia/Mellanox:
- move the data direct infrastructure from IB to core, in
preparation for netdev support.
- reduce the memory used per offloaded TC rule
- Meta (fbnic):
- support large io_uring zero-copy RX buffers
- Microsoft vNIC (mana):
- add BQL support
- Ethernet NICs consumer, and embedded:
- Airoha:
- LRO offload support
- Cadence (macb):
- context swapping for ringparam and MTU changes, avoiding
buffer loss under memory pressure
- Mucse (rnpgbe):
- TX/RX and link status support
- NXP (enetc):
- SR-IOV improvements and VF support for ENETC v4
- Qualcomm (ppe):
- IPQ5424 support
- Realtek PCI (r8169):
- phylink support
- RSS support for RTL8127
- Renesas (ravb):
- gPTP support for R-Car Gen4
- Synopsys (stmmac):
- XDP multi-buffer support on the TX side
- tc mqprio hw queue priority offload
- support for RK3568 SGMII, Allwinner H616 EMAC1, UltraRISC
DP1000 and Qualcomm sa8255p
- Ethernet switches:
- Mediatek (mt7530):
- fast age and change conduit support
- Microchip (ksz):
- support for KSZ8995XA/KS8995XA
- Microchip (lan966x):
- PCIe FDMA support, ~20x throughput increase in PCIe endpoint
- Microchip (sparx5):
- Time Aware Shaper (taprio) offload
- Motorcomm (yt921x):
- LED and SerDes PCS support
- Realtek (rtl8365mb):
- EEE support
- Ethernet PHYs:
- Broadcom:
- enable jumbo frames on BCM54xx
- Realtek:
- support for RTL8261CE_CG and RTL8261D_VM
- MDIO support for RTL838x and RTL839x
- WiFi drivers:
- Broadcom (brcmfmac):
- FT/OKC roaming offload
- Intel (iwlwifi):
- UHR sniffer support
- support for newer UEFI/BIOS tables
- MediaTek (mt76):
- mt7925 NAN improvements
- offchannel/scan improvements and MLO fixes
- Morse Micro (mm81x):
- monitor mode support
- Qualcomm (ath12k):
- IPQ5332 platform infrastructure
- Realtek (rtw88):
- RTL8723BS support
- SDIO TX performance improvements
- Realtek (rtw89):
- P2P_DEVICE support
- BT-coex updates for RTL8922D
- Bluetooth:
- move H:4 reassembly into the Bluetooth core
- add generic support for vendor packets
- MGMT: add security level changed event
- Bluetooth drivers:
- btusb: support Bulk Serialization Mode
- Intel: support Draco and Titan Lake, allow unsigned firmware
- Mediatek: MT7928 support
- Qualcomm: QCC2072 support
- Broadcom: Synaptics 4384 support"
* tag 'net-next-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2126 commits)
Bluetooth: btusb: disable by default Qualcomm multi-subsystem
tipc: fix broadcast sender hang on last acker departure
tipc: fix use-after-free of broadcast reception link at node release
r8169: clear TX LPI on RTL8168h at link up after phylink conversion
tun: Require CAP_NET_ADMIN to attach to an ownerless device
net/sched/sch_cake: drop dead nla_nest_end() error check
net/sched/sch_cake: widen buffer_used to u64
net/sched/sch_cake: reduce parent backlog when clearing a tin
net/sched/sch_cake: serialize reconfiguration with the datapath
tg3: Add Datto SIRIS 5 1U Server to restart AER quirk table
net/mlx5e: Stop asserting for RTNL when closing channels
net: shrink the payload-only part of skb dataref to one bit
net: wwan: iosm: validate msg_head before indexing msg_ring
net: bgmac: rate limit RX error messages
selftests: net: veth: test XDP_TX to a peer with GRO enabled
veth: schedule the peer's NAPI after XDP_TX when only GRO is enabled
pppoe: delete session hash entries by pointer match
net: lan969x: don't disable hardirqs in fdma tx clear
net: sparx5/lan969x: do not clobber the PSFP cycle timer update period
net: lan969x: fix DSM calendar for empty taxis
...
Diffstat (limited to 'include/net/mana')
| -rw-r--r-- | include/net/mana/gdma.h | 106 | ||||
| -rw-r--r-- | include/net/mana/hw_channel.h | 8 | ||||
| -rw-r--r-- | include/net/mana/mana.h | 2 |
3 files changed, 104 insertions, 12 deletions
diff --git a/include/net/mana/gdma.h b/include/net/mana/gdma.h index 2a28fcaa637d..0b52582118e8 100644 --- a/include/net/mana/gdma.h +++ b/include/net/mana/gdma.h @@ -427,14 +427,74 @@ enum gdma_context_flags { GC_IN_SERVICE = 1, }; +struct gdma_context; + +/** + * struct gdma_bus_ops - transport-specific operations + * + * Lets the bus-agnostic GDMA core drive PCI and CDX devices without + * testing configuration symbols. Each bus driver installs its own + * instance in gdma_context.bus_ops at probe time. + * + * @bus_name: Bus token used to build the per-vector IRQ names. + * @adev_prefix: Prefix used for auxiliary-device match names. + * @msix_can_alloc_dyn: True if the bus can allocate MSI-X vectors after + * probe time. Buses that size their vector pool at probe and cannot + * grow it later leave this NULL. + * @msix_virq: Return the Linux IRQ number backing an MSI vector, or + * -EINVAL if the vector has not been allocated yet. + * @msix_alloc_at: Allocate an MSI vector on demand and return its IRQ + * number, updating @msi with the index actually assigned. Buses that + * allocate their whole pool up front leave this NULL. + * @msix_free: Release a vector obtained from @msix_alloc_at. Only needed + * by buses that implement @msix_alloc_at. + * @msix_vec_count: Return the number of entries in the device MSI-X table, + * used to clamp the vector count the core asks for. Buses that cannot + * report a table size leave this NULL and the clamp is skipped. + * @setup_hwc_irqs: Set up the interrupts the hardware channel needs before + * it is created. + * @setup_remaining_irqs: Set up the remaining interrupts once the device + * resource limits are known. + * @remove_irqs: Release the interrupts set up by @setup_hwc_irqs and + * @setup_remaining_irqs. + * @dev_reset: Reset the device using the bus-level reset mechanism. + * @schedule_serv_work: Queue device servicing or recovery. Buses without + * a servicing path leave this NULL. + * @drv_cap_flags1: Extra capability bits this transport can honour, OR'ed + * into GDMA_DRV_CAP_FLAGS1 when the driver version is negotiated. + */ +struct gdma_bus_ops { + const char *bus_name; + const char *adev_prefix; + bool (*msix_can_alloc_dyn)(struct gdma_context *gc); + int (*msix_virq)(struct gdma_context *gc, int msi); + int (*msix_alloc_at)(struct gdma_context *gc, int *msi); + void (*msix_free)(struct gdma_context *gc, int msi, int irq); + int (*msix_vec_count)(struct gdma_context *gc); + int (*setup_hwc_irqs)(struct gdma_context *gc); + int (*setup_remaining_irqs)(struct gdma_context *gc); + void (*remove_irqs)(struct gdma_context *gc); + int (*dev_reset)(struct gdma_context *gc); + int (*schedule_serv_work)(struct gdma_context *gc, + enum gdma_eqe_type type); + u64 drv_cap_flags1; +}; + struct gdma_context { struct device *dev; struct dentry *mana_pci_debugfs; + /* Transport-specific operations, installed by the bus driver */ + const struct gdma_bus_ops *bus_ops; + /* Hardware max number of queues */ unsigned int max_num_queues; /* Per-vPort max number of queues */ unsigned int max_num_queues_vport; + /* Number of vPorts reported by the device, capped at + * MAX_PORTS_IN_MANA_DEV + */ + u16 num_ports; unsigned int max_num_msix; unsigned int num_msix_usable; struct xarray irq_contexts; @@ -534,6 +594,10 @@ ssize_t mana_gd_read_ring(struct gdma_queue *q, char __user *buf, int mana_schedule_serv_work(struct gdma_context *gc, enum gdma_eqe_type type); +int mana_gd_alloc_service_wq(struct gdma_context *gc); + +void mana_gd_free_service_wq(struct gdma_context *gc); + void mana_gd_ring_dim(struct gdma_queue *cq, u32 mod_usec, bool mod_usec_vld, u32 mod_comps, bool mod_comps_vld); @@ -628,6 +692,8 @@ struct gdma_eqe { #define MANA_PF2_DEVICE_ID 0x00C1 #define MANA_VF_DEVICE_ID 0x00BA +#define MANA_CDX_DEVICE_ID 0x00C2 + struct gdma_posted_wqe_info { u32 wqe_size_in_bu; /* Unmasked WQE start offset in GDMA basic units. */ @@ -694,21 +760,28 @@ enum { /* Driver supports non-contiguous queue buffers */ #define GDMA_DRV_CAP_FLAG_1_NON_CONTIGUOUS_BUFFERS BIT(30) +/* Capabilities in the PCI-only group below rely on dynamic MSI-X allocation + * and on the servicing and reset paths reached through + * mana_schedule_serv_work(). Transports that provide neither leave + * gdma_bus_ops.drv_cap_flags1 unset so the group is not advertised. + */ +#define GDMA_DRV_CAP_FLAGS1_PCI \ + (GDMA_DRV_CAP_FLAG_1_DYNAMIC_IRQ_ALLOC_SUPPORT | \ + GDMA_DRV_CAP_FLAG_1_SELF_RESET_ON_EQE | \ + GDMA_DRV_CAP_FLAG_1_HANDLE_RECONFIG_EQE | \ + GDMA_DRV_CAP_FLAG_1_PROBE_RECOVERY | \ + GDMA_DRV_CAP_FLAG_1_HWC_TIMEOUT_RECOVERY) + #define GDMA_DRV_CAP_FLAGS1 \ (GDMA_DRV_CAP_FLAG_1_EQ_SHARING_MULTI_VPORT | \ GDMA_DRV_CAP_FLAG_1_NAPI_WKDONE_FIX | \ GDMA_DRV_CAP_FLAG_1_HWC_TIMEOUT_RECONFIG | \ GDMA_DRV_CAP_FLAG_1_VARIABLE_INDIRECTION_TABLE_SUPPORT | \ GDMA_DRV_CAP_FLAG_1_DEV_LIST_HOLES_SUP | \ - GDMA_DRV_CAP_FLAG_1_DYNAMIC_IRQ_ALLOC_SUPPORT | \ - GDMA_DRV_CAP_FLAG_1_SELF_RESET_ON_EQE | \ - GDMA_DRV_CAP_FLAG_1_HANDLE_RECONFIG_EQE | \ GDMA_DRV_CAP_FLAG_1_HW_VPORT_LINK_AWARE | \ GDMA_DRV_CAP_FLAG_1_PERIODIC_STATS_QUERY | \ GDMA_DRV_CAP_FLAG_1_SKB_LINEARIZE | \ - GDMA_DRV_CAP_FLAG_1_PROBE_RECOVERY | \ GDMA_DRV_CAP_FLAG_1_HANDLE_STALL_SQ_RECOVERY | \ - GDMA_DRV_CAP_FLAG_1_HWC_TIMEOUT_RECOVERY | \ GDMA_DRV_CAP_FLAG_1_EQ_MSI_UNSHARE_MULTI_VPORT | \ GDMA_DRV_CAP_FLAG_1_DYN_INTERRUPT_MODERATION | \ GDMA_DRV_CAP_FLAG_1_NON_CONTIGUOUS_BUFFERS) @@ -1052,7 +1125,24 @@ struct gdma_destroy_dm_resp { struct gdma_resp_hdr hdr; }; /* HW Data */ -int mana_gd_verify_vf_version(struct pci_dev *pdev); +int mana_gd_verify_vf_version(struct gdma_context *gc); +int mana_gd_query_max_resources(struct gdma_context *gc); +int mana_gd_setup(struct gdma_context *gc); +void mana_gd_cleanup(struct gdma_context *gc); +int mana_gd_detect_devices(struct gdma_context *gc); +int mana_gd_init_registers(struct gdma_context *gc); +irqreturn_t mana_gd_intr(int irq, void *arg); +void mana_gd_process_eq_events(void *arg); + +static inline u32 mana_gd_r32(struct gdma_context *g, u64 offset) +{ + return readl(g->bar0_va + offset); +} + +static inline u64 mana_gd_r64(struct gdma_context *g, u64 offset) +{ + return readq(g->bar0_va + offset); +} int mana_gd_register_device(struct gdma_dev *gd); int mana_gd_deregister_device(struct gdma_dev *gd); @@ -1087,8 +1177,6 @@ void mana_unregister_debugfs(void); int mana_rdma_service_event(struct gdma_context *gc, enum gdma_service_type event); -int mana_gd_suspend(struct pci_dev *pdev, pm_message_t state); -int mana_gd_resume(struct pci_dev *pdev); bool mana_need_log(struct gdma_context *gc, int err); @@ -1099,4 +1187,6 @@ void mana_gd_put_gic(struct gdma_context *gc, bool use_msi_bitmap, int msi); int mana_gd_query_device_cfg(struct gdma_context *gc, u32 proto_major_ver, u32 proto_minor_ver, u32 proto_micro_ver, u16 *max_num_vports, u8 *bm_hostmode); +int mana_gd_dev_reset(struct gdma_context *gc); + #endif /* _GDMA_H */ diff --git a/include/net/mana/hw_channel.h b/include/net/mana/hw_channel.h index 16feb39616c1..1ab2d66c891e 100644 --- a/include/net/mana/hw_channel.h +++ b/include/net/mana/hw_channel.h @@ -20,8 +20,8 @@ #define HWC_INIT_DATA_MAX_NUM_CQS 7 #define HWC_INIT_DATA_PDID 8 #define HWC_INIT_DATA_GPA_MKEY 9 -#define HWC_INIT_DATA_PF_DEST_RQ_ID 10 -#define HWC_INIT_DATA_PF_DEST_CQ_ID 11 +#define HWC_INIT_DATA_DEST_RQ_ID 10 +#define HWC_INIT_DATA_DEST_CQ_ID 11 #define HWC_DATA_CFG_HWC_TIMEOUT 1 #define HWC_DATA_HW_LINK_CONNECT 2 @@ -195,8 +195,8 @@ struct hw_channel_context { struct semaphore sema; struct gdma_resource inflight_msg_res; - u32 pf_dest_vrq_id; - u32 pf_dest_vrcq_id; + u32 dest_vrq_id; + u32 dest_vrcq_id; u32 hwc_timeout; struct hwc_caller_ctx *caller_ctx; diff --git a/include/net/mana/mana.h b/include/net/mana/mana.h index 8c3dc9d0b299..e1fa9131c490 100644 --- a/include/net/mana/mana.h +++ b/include/net/mana/mana.h @@ -672,6 +672,8 @@ struct mana_port_context { u32 steer_cqe_coalescing; }; +netdev_tx_t __mana_start_xmit(struct sk_buff *skb, struct net_device *ndev, + bool xdp); netdev_tx_t mana_start_xmit(struct sk_buff *skb, struct net_device *ndev); int mana_config_rss(struct mana_port_context *ac, enum TRI_STATE rx, bool update_hash, bool update_tab); |
