[v3] net/ice: fix secondary process Rx offload path
Checks
Commit Message
Secondary process depends on the vector offload flag to select right
Rx offload path. This patch adds a variable in share memory to store
the vector offload flag that can be directly read by secondary process.
Fixes: 808a17b3c1e6 ("net/ice: add Rx AVX512 offload path")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---
v3: Modify the patch according to comment.
---
drivers/net/ice/ice_ethdev.h | 1 +
drivers/net/ice/ice_rxtx.c | 10 ++++++----
2 files changed, 7 insertions(+), 4 deletions(-)
Comments
> -----Original Message-----
> From: Alvin Zhang <alvinx.zhang@intel.com>
> Sent: Tuesday, November 16, 2021 10:32 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Rong, Leyi <leyi.rong@intel.com>
> Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>;
> stable@dpdk.org
> Subject: [PATCH v3] net/ice: fix secondary process Rx offload path
>
> Secondary process depends on the vector offload flag to select right Rx
> offload path. This patch adds a variable in share memory to store the vector
> offload flag that can be directly read by secondary process.
>
> Fixes: 808a17b3c1e6 ("net/ice: add Rx AVX512 offload path")
> Cc: stable@dpdk.org
>
> Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Tested-by: Qin Sun <qinx.sun@intel.com>
> -----Original Message-----
> From: Sun, QinX <qinx.sun@intel.com>
> Sent: Tuesday, November 16, 2021 11:09 AM
> To: Zhang, AlvinX <alvinx.zhang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Rong, Leyi <leyi.rong@intel.com>
> Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>; stable@dpdk.org
> Subject: RE: [PATCH v3] net/ice: fix secondary process Rx offload path
>
> > -----Original Message-----
> > From: Alvin Zhang <alvinx.zhang@intel.com>
> > Sent: Tuesday, November 16, 2021 10:32 AM
> > To: Zhang, Qi Z <qi.z.zhang@intel.com>; Rong, Leyi
> > <leyi.rong@intel.com>
> > Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>;
> > stable@dpdk.org
> > Subject: [PATCH v3] net/ice: fix secondary process Rx offload path
> >
> > Secondary process depends on the vector offload flag to select right
> > Rx offload path. This patch adds a variable in share memory to store
> > the vector offload flag that can be directly read by secondary process.
> >
> > Fixes: 808a17b3c1e6 ("net/ice: add Rx AVX512 offload path")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
>
> Tested-by: Qin Sun <qinx.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
>
>
@@ -538,6 +538,7 @@ struct ice_adapter {
bool rx_use_avx512;
bool tx_use_avx2;
bool tx_use_avx512;
+ bool rx_vec_offload_support;
#endif
};
@@ -3180,6 +3180,8 @@
rx_check_ret = ice_rx_vec_dev_check(dev);
if (ad->ptp_ena)
rx_check_ret = -1;
+ ad->rx_vec_offload_support =
+ (rx_check_ret == ICE_VECTOR_OFFLOAD_PATH);
if (rx_check_ret >= 0 && ad->rx_bulk_alloc_allowed &&
rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) {
ad->rx_vec_allowed = true;
@@ -3215,7 +3217,7 @@
if (dev->data->scattered_rx) {
if (ad->rx_use_avx512) {
#ifdef CC_AVX512_SUPPORT
- if (rx_check_ret == ICE_VECTOR_OFFLOAD_PATH) {
+ if (ad->rx_vec_offload_support) {
PMD_DRV_LOG(NOTICE,
"Using AVX512 OFFLOAD Vector Scattered Rx (port %d).",
dev->data->port_id);
@@ -3230,7 +3232,7 @@
}
#endif
} else if (ad->rx_use_avx2) {
- if (rx_check_ret == ICE_VECTOR_OFFLOAD_PATH) {
+ if (ad->rx_vec_offload_support) {
PMD_DRV_LOG(NOTICE,
"Using AVX2 OFFLOAD Vector Scattered Rx (port %d).",
dev->data->port_id);
@@ -3252,7 +3254,7 @@
} else {
if (ad->rx_use_avx512) {
#ifdef CC_AVX512_SUPPORT
- if (rx_check_ret == ICE_VECTOR_OFFLOAD_PATH) {
+ if (ad->rx_vec_offload_support) {
PMD_DRV_LOG(NOTICE,
"Using AVX512 OFFLOAD Vector Rx (port %d).",
dev->data->port_id);
@@ -3267,7 +3269,7 @@
}
#endif
} else if (ad->rx_use_avx2) {
- if (rx_check_ret == ICE_VECTOR_OFFLOAD_PATH) {
+ if (ad->rx_vec_offload_support) {
PMD_DRV_LOG(NOTICE,
"Using AVX2 OFFLOAD Vector Rx (port %d).",
dev->data->port_id);