Skip to content

Commit 123703b

Browse files
net/fm10k: fix null packet prepare function
As per recent change by the following commit: commit 066f3d9 ("ethdev: remove callback checks from fast path") framework unconditionally invokes dev->tx_pkt_prepare. Ensure dev->tx_pkt_prepare is not NULL when vector or simple TX paths are selected, by assigning rte_eth_tx_pkt_prepare_dummy. This aligns with expectations with above mentioned commit. Fixes: 9b134aa ("net/fm10k: add Tx preparation") Cc: [email protected] Signed-off-by: Bruce Richardson <[email protected]>
1 parent 79e55eb commit 123703b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/intel/fm10k/fm10k_ethdev.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2955,7 +2955,7 @@ fm10k_set_tx_function(struct rte_eth_dev *dev)
29552955
} else {
29562956
PMD_INIT_LOG(DEBUG, "Use vector Tx func");
29572957
dev->tx_pkt_burst = fm10k_xmit_pkts_vec;
2958-
dev->tx_pkt_prepare = NULL;
2958+
dev->tx_pkt_prepare = rte_eth_tx_pkt_prepare_dummy;
29592959
}
29602960
return;
29612961
}
@@ -2979,7 +2979,7 @@ fm10k_set_tx_function(struct rte_eth_dev *dev)
29792979
fm10k_txq_vec_setup(txq);
29802980
}
29812981
dev->tx_pkt_burst = fm10k_xmit_pkts_vec;
2982-
dev->tx_pkt_prepare = NULL;
2982+
dev->tx_pkt_prepare = rte_eth_tx_pkt_prepare_dummy;
29832983
} else {
29842984
dev->tx_pkt_burst = fm10k_xmit_pkts;
29852985
dev->tx_pkt_prepare = fm10k_prep_pkts;

0 commit comments

Comments
 (0)