Thread (26 messages) 26 messages, 2 authors, 14d ago

Re: [PATCH net-next v4 14/15] ixd: add the core initialization

From: Larysa Zaremba <hidden>
Date: 2026-07-13 18:14:12
Also in: linux-doc
Subsystem: intel ethernet drivers, networking drivers, the rest · Maintainers: Tony Nguyen, Przemek Kitszel, Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

Sashiko expressed concerns with virtchnl version handling in ixd. I think it is 
fine as-is, but here is how it can be addressed:

commit 736215457094a287aa8f40af322e0bc7ab94dddc
Author: Larysa Zaremba [off-list ref]
Date:   Mon Jul 13 15:44:55 2026 +0200

    fixup! ixd: add the core initialization
diff --git a/drivers/net/ethernet/intel/ixd/ixd_virtchnl.c b/drivers/net/ethernet/intel/ixd/ixd_virtchnl.c
index 66049d1b1d15..5b04769443b9 100644
--- a/drivers/net/ethernet/intel/ixd/ixd_virtchnl.c
+++ b/drivers/net/ethernet/intel/ixd/ixd_virtchnl.c
@@ -120,8 +120,11 @@ static int ixd_handle_vc_ver(struct ixd_adapter *adapter, void *recv_buff,
                return -EBADMSG;

        recv_ver = recv_buff;
-       if (le32_to_cpu(need_ver.major) > le32_to_cpu(recv_ver->major))
+       if (le32_to_cpu(need_ver.major) != le32_to_cpu(recv_ver->major))
                return -EOPNOTSUPP;
+       if (le32_to_cpu(recv_ver->minor) != le32_to_cpu(need_ver.minor))
+               dev_warn(ixd_to_dev(adapter),
+                        "Virtchnl minor version does not match, proceed with caution\n");

        adapter->vc_ver.major = le32_to_cpu(recv_ver->major);
        adapter->vc_ver.minor = le32_to_cpu(recv_ver->minor);
Everything else:

[...]
quoted
+	libie_ctlq_xn_shutdown(adapter->xnm);
+	ixd_trigger_reset(adapter);
+	ixd_deinit_dflt_mbx(adapter);
Could this sequence trigger a race condition causing PCIe AER fatal errors?
The hardware reset is triggered here before the mailbox polling task
(mbx_task) is canceled inside ixd_deinit_dflt_mbx().
If mbx_task runs concurrently with or immediately after the reset trigger,
it might access MMIO doorbell registers while the device is actively in a
global reset.
Not an issue with available HW

[...]
quoted
 	ixd_trigger_reset(adapter);
 	ixd_deinit_dflt_mbx(adapter);
Similarly to ixd_init_task(), does triggering the reset before
ixd_deinit_dflt_mbx() here risk the mbx_task touching MMIO during reset?
Perhaps the newly added polling task should be canceled before the hardware
reset is triggered?
This is not an issue with available HW, and consistent with existing idpf flow.

[...]
quoted
+static int ixd_req_vc_caps(struct ixd_adapter *adapter)
+{
+	const struct ixd_ctlq_req req = {
+		.opcode = VIRTCHNL2_OP_GET_CAPS,
+		.send_size = sizeof(struct virtchnl2_get_capabilities),
+		.ctx = NULL,
+		.send_buff_init = NULL,
+		.recv_process = ixd_handle_caps,
+	};
+
+	return ixd_ctlq_do_req(adapter, &req);
+}
Because send_buff_init is NULL, will the driver send an all-zero request
payload for capabilities and resources?
Requesting 0 max vectors and 0 RX queues might cause the Control Plane to
respond with only the default mailbox vector, starving the driver of
interrupts for its networking queues.
We do not currently have any queues

[...]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help