Skip to content

Commit fcf2271

Browse files
cloftusbruce-richardson
authored andcommitted
net/iavf: fix txq flags setting after Tx path selection
Ensure the txq flags "use_ctx" and "use_vec_entry" are set/unset properly after tx path selection. Prior to this commit these flags were only configured if a vector path was chosen. Fix this by making their configuration unconditional. Also simplify how the "use_vec_entry" flag is set by removing the dedicated function that sets the flag in favour of just setting it inline. Fixes: ebcfb03 ("net/iavf: use common Tx path selection infrastructure") Signed-off-by: Ciara Loftus <ciara.loftus@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
1 parent d371497 commit fcf2271

File tree

3 files changed

+8
-17
lines changed

3 files changed

+8
-17
lines changed

drivers/net/intel/iavf/iavf_rxtx.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3871,6 +3871,7 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
38713871
#ifdef RTE_ARCH_X86
38723872
struct ci_tx_queue *txq;
38733873
int i;
3874+
const struct ci_tx_path_features *selected_features;
38743875
#endif
38753876
struct ci_tx_path_features req_features = {
38763877
.tx_offloads = dev->data->dev_conf.txmode.offloads,
@@ -3905,15 +3906,13 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
39053906

39063907
out:
39073908
#ifdef RTE_ARCH_X86
3908-
if (iavf_tx_path_infos[adapter->tx_func_type].features.simd_width != 0) {
3909-
for (i = 0; i < dev->data->nb_tx_queues; i++) {
3910-
txq = dev->data->tx_queues[i];
3911-
if (!txq)
3912-
continue;
3913-
iavf_txq_vec_setup(txq);
3914-
txq->use_ctx =
3915-
iavf_tx_path_infos[adapter->tx_func_type].features.ctx_desc;
3916-
}
3909+
selected_features = &iavf_tx_path_infos[adapter->tx_func_type].features;
3910+
for (i = 0; i < dev->data->nb_tx_queues; i++) {
3911+
txq = dev->data->tx_queues[i];
3912+
if (!txq)
3913+
continue;
3914+
txq->use_ctx = selected_features->ctx_desc;
3915+
txq->use_vec_entry = selected_features->simd_width >= RTE_VECT_SIMD_128;
39173916
}
39183917
#endif
39193918

drivers/net/intel/iavf/iavf_rxtx.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,6 @@ int iavf_get_monitor_addr(void *rx_queue, struct rte_power_monitor_cond *pmc);
592592
int iavf_rx_vec_dev_check(struct rte_eth_dev *dev);
593593
int iavf_tx_vec_dev_check(struct rte_eth_dev *dev);
594594
int iavf_rxq_vec_setup(struct ci_rx_queue *rxq);
595-
int iavf_txq_vec_setup(struct ci_tx_queue *txq);
596595
uint16_t iavf_recv_pkts_vec_avx512(void *rx_queue, struct rte_mbuf **rx_pkts,
597596
uint16_t nb_pkts);
598597
uint16_t iavf_recv_pkts_vec_avx512_offload(void *rx_queue,

drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,13 +1800,6 @@ iavf_xmit_pkts_vec_avx2_offload(void *tx_queue, struct rte_mbuf **tx_pkts,
18001800
return iavf_xmit_pkts_vec_avx2_common(tx_queue, tx_pkts, nb_pkts, true);
18011801
}
18021802

1803-
int __rte_cold
1804-
iavf_txq_vec_setup(struct ci_tx_queue *txq)
1805-
{
1806-
txq->use_vec_entry = true;
1807-
return 0;
1808-
}
1809-
18101803
void __rte_cold
18111804
iavf_rx_queue_release_mbufs_vec(struct ci_rx_queue *rxq)
18121805
{

0 commit comments

Comments
 (0)