[Intel-wired-lan][PATCH net v2 1/3] idpf: do not enable XDP if queue based scheduling is not supported
From: Joshua Hay <hidden>
Date: 2026-06-02 17:09:36
Also in:
intel-wired-lan
Subsystem:
intel ethernet drivers, networking drivers, the rest, xdp (express data path) · Maintainers:
Tony Nguyen, Przemek Kitszel, Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds, Alexei Starovoitov, Daniel Borkmann, David S. Miller, Jesper Dangaard Brouer, John Fastabend
The current XDP implementation uses queue based scheduling for its TxQs.
If the FW does not advertise support for queue based scheduling, do not
enable XDP. Add the missing capability check at the start of the XDP
configuration. This will temporarily break XDP while a flow based
implementation is worked on, as well as while FWs with queue based by
default are rolled out.
Fixes: 705457e7211f ("idpf: implement XDP_SETUP_PROG in ndo_bpf for splitq")
Signed-off-by: Joshua Hay <redacted>
Reviewed-by: Aleksandr Loktionov <redacted>
Reviewed-by: Madhu Chittim <redacted>
---
v1->v2: use local extack to use pass either properly initialized
xdp->extack or NULL to netlink macro.
---
drivers/net/ethernet/intel/idpf/xdp.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/ethernet/intel/idpf/xdp.c b/drivers/net/ethernet/intel/idpf/xdp.c
index cbccd4546768..ecec7db4ebc0 100644
--- a/drivers/net/ethernet/intel/idpf/xdp.c
+++ b/drivers/net/ethernet/intel/idpf/xdp.c
@@ -510,6 +510,16 @@ int idpf_xdp(struct net_device *dev, struct netdev_bpf *xdp)
if (!idpf_is_queue_model_split(vport->dflt_qv_rsrc.txq_model))
goto notsupp;
+ if (!idpf_is_cap_ena(vport->adapter, IDPF_OTHER_CAPS,
+ VIRTCHNL2_CAP_SPLITQ_QSCHED)) {
+ struct netlink_ext_ack *extack = xdp->command == XDP_SETUP_PROG ?
+ xdp->extack : NULL;
+
+ NL_SET_ERR_MSG_MOD(extack,
+ "Device does not support requested XDP Tx scheduling mode");
+ goto notsupp;
+ }
+
switch (xdp->command) {
case XDP_SETUP_PROG:
ret = idpf_xdp_setup_prog(vport, xdp);--
2.39.2