[PATCH v2 1/3] net/intel: prevent selection of a null Tx burst function

Ciara Loftus ciara.loftus at intel.com
Tue Dec 16 11:35:02 CET 2025


Depending on the underlying architecture and CPU flags available, a
different set of Tx paths may be defined by a driver using the common
path selection infrastructure. However the Tx path selection function
iterates through the entire array of potential Tx paths, regardless of
whether they are available for selection by that platform. This could
result in a null Tx burst function being selected. Fix this by
discarding paths with a null Tx burst function from selection.

Fixes: 336374d8454c ("net/intel: introduce infrastructure for Tx path selection")

Signed-off-by: Ciara Loftus <ciara.loftus at intel.com>
---
 drivers/net/intel/common/tx.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/intel/common/tx.h b/drivers/net/intel/common/tx.h
index 24fcfbe225..b259d98904 100644
--- a/drivers/net/intel/common/tx.h
+++ b/drivers/net/intel/common/tx.h
@@ -307,6 +307,10 @@ ci_tx_path_select(const struct ci_tx_path_features *req_features,
 	for (unsigned int i = 0; i < num_paths; i++) {
 		const struct ci_tx_path_features *path_features = &infos[i].features;
 
+		/* Do not select a path with a NULL pkt_burst function. */
+		if (infos[i].pkt_burst == NULL)
+			continue;
+
 		/* Do not select a disabled tx path. */
 		if (path_features->disabled)
 			continue;
-- 
2.43.0



More information about the dev mailing list