net/ice: ensure correct vector flag after reconfiguration
PATCH 1/1 net/ice: ensure correct vector flag after reconfiguration
After configuring the Tx path to be used, the ice driver sets the tx_vec_allowed flag if a vector path is chosen. However, on reconfiguration, the flag is not cleared if a scalar path is chosen, leading to crashes on driver shutdown as the wrong cleanup function would be used in that case. Fix issue, by always setting the flag to true or false explicitly.
--- drivers/net/intel/ice/ice_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/intel/ice/ice_rxtx.c +2 -2
@@ -3721,8 +3721,8 @@ ice_set_tx_function(struct rte_eth_dev *dev) ICE_TX_DEFAULT); out: -if (ice_tx_path_infos[ad->tx_func_type].features.simd_width >=RTE_VECT_SIMD_256 ) - ad->tx_vec_allowed = true; + ad->tx_vec_allowed = + (ice_tx_path_infos[ad->tx_func_type].features.simd_width >=RTE_VECT_SIMD_256 ); dev->tx_pkt_burst = mbuf_check ? ice_xmit_pkts_check : ice_tx_path_infos[ad->tx_func_type].pkt_burst;
Signature · 1 line
2.51.0
Quoted 9 lines
Subject: [PATCH] net/ice: ensure correct vector flag after reconfiguration
After configuring the Tx path to be used, the ice driver sets the
tx_vec_allowedflag if a vector path is chosen. However, on reconfiguration, the flag is not cleared if a scalar path is chosen, leading to crashes on driver shutdown as the wrong cleanup function would be used in that case. Fix issue, by always setting the flag to true or false explicitly.
Quoted 3 lines
Fixes d3206e40c435 ("net/ice: use common Tx path selection infrastructure")Signed-off-by Bruce Richardson <[email protected]>
Thanks for catching this Bruce.
Quoted 24 lines
--- drivers/net/intel/ice/ice_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/intel/ice/ice_rxtx.c +2
-2@@ -3721,8 +3721,8 @@ ice_set_tx_function(struct rte_eth_dev *dev) ICE_TX_DEFAULT); out: -if (ice_tx_path_infos[ad->tx_func_type].features.simd_width >= RTE_VECT_SIMD_256) - ad->tx_vec_allowed = true; + ad->tx_vec_allowed = + (ice_tx_path_infos[ad->tx_func_type].features.simd_width >=RTE_VECT_SIMD_256 );drivers/net/intel/ice/ice_rxtx.c +0
-0dev->tx_pkt_burst = mbuf_check ? ice_xmit_pkts_check : ice_tx_path_infos[ad-Quoted 1 line
tx_func_type].pkt_burst;
--
2.51.0
Quoted 9 lines · Ciara
Quoted 9 lines
Subject: [PATCH] net/ice: ensure correct vector flag after reconfiguration
After configuring the Tx path to be used, the ice driver sets the
tx_vec_allowedflag if a vector path is chosen. However, on reconfiguration, the flag is not cleared if a scalar path is chosen, leading to crashes on driver shutdown as the wrong cleanup function would be used in that case. Fix issue, by always setting the flag to true or false explicitly.
Quoted 8 lines
Quoted 3 lines
Fixes d3206e40c435 ("net/ice: use common Tx path selection infrastructure")Signed-off-by Bruce Richardson <[email protected]>Thanks for catching this Bruce.
Acked-by Ciara Loftus <[email protected]>
Squashed to original commit on next-net-intel-tree