net/ice: init dvm mode for parser

Message ID 20230526192125.3210774-1-qi.z.zhang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series net/ice: init dvm mode for parser |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS

Commit Message

Qi Zhang May 26, 2023, 7:21 p.m. UTC
  Double Vlan mode need to be configured for parser
Otherwise parser result will not be consistent with hardware.

Fixes: 531d2555c8a6 ("net/ice: refactor parser usage")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_generic_flow.c | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Zhichao Zeng May 29, 2023, 2:10 a.m. UTC | #1
> -----Original Message-----
> From: Qi Zhang <qi.z.zhang@intel.com>
> Sent: Saturday, May 27, 2023 3:21 AM
> To: Guo, Junfeng <junfeng.guo@intel.com>
> Cc: Yang, Qiming <qiming.yang@intel.com>; dev@dpdk.org; Zhang, Qi Z
> <qi.z.zhang@intel.com>; stable@dpdk.org
> Subject: [PATCH] net/ice: init dvm mode for parser
> 
> Double Vlan mode need to be configured for parser Otherwise parser result
> will not be consistent with hardware.
> 
> Fixes: 531d2555c8a6 ("net/ice: refactor parser usage")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
>  drivers/net/ice/ice_generic_flow.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/net/ice/ice_generic_flow.c
> b/drivers/net/ice/ice_generic_flow.c
> index 86a32f8cb1..ed3075d555 100644
> --- a/drivers/net/ice/ice_generic_flow.c
> +++ b/drivers/net/ice/ice_generic_flow.c

Verified and passed.

Tested-by: Zhichao Zeng <zhichaox.zeng@intel.com>
  
Qi Zhang May 29, 2023, 2:32 a.m. UTC | #2
> -----Original Message-----
> From: Zeng, ZhichaoX <zhichaox.zeng@intel.com>
> Sent: Monday, May 29, 2023 10:11 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Guo, Junfeng
> <junfeng.guo@intel.com>
> Cc: Yang, Qiming <qiming.yang@intel.com>; dev@dpdk.org; Zhang, Qi Z
> <qi.z.zhang@intel.com>; stable@dpdk.org
> Subject: RE: [PATCH] net/ice: init dvm mode for parser
> 
> 
> 
> > -----Original Message-----
> > From: Qi Zhang <qi.z.zhang@intel.com>
> > Sent: Saturday, May 27, 2023 3:21 AM
> > To: Guo, Junfeng <junfeng.guo@intel.com>
> > Cc: Yang, Qiming <qiming.yang@intel.com>; dev@dpdk.org; Zhang, Qi Z
> > <qi.z.zhang@intel.com>; stable@dpdk.org
> > Subject: [PATCH] net/ice: init dvm mode for parser
> >
> > Double Vlan mode need to be configured for parser Otherwise parser
> > result will not be consistent with hardware.
> >
> > Fixes: 531d2555c8a6 ("net/ice: refactor parser usage")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> > ---
> >  drivers/net/ice/ice_generic_flow.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/net/ice/ice_generic_flow.c
> > b/drivers/net/ice/ice_generic_flow.c
> > index 86a32f8cb1..ed3075d555 100644
> > --- a/drivers/net/ice/ice_generic_flow.c
> > +++ b/drivers/net/ice/ice_generic_flow.c
> 
> Verified and passed.
> 
> Tested-by: Zhichao Zeng <zhichaox.zeng@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index 86a32f8cb1..ed3075d555 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -1836,6 +1836,11 @@  ice_flow_init(struct ice_adapter *ad)
 	if (ice_parser_create(&ad->hw, &ad->psr) != ICE_SUCCESS)
 		PMD_INIT_LOG(WARNING, "Failed to initialize DDP parser, raw packet filter will not be supported");
 
+	if (ice_is_dvm_ena(&ad->hw))
+		ice_parser_dvm_set(ad->psr, true);
+	else
+		ice_parser_dvm_set(ad->psr, false);
+
 	RTE_TAILQ_FOREACH_SAFE(engine, &engine_list, node, temp) {
 		if (engine->init == NULL) {
 			PMD_INIT_LOG(ERR, "Invalid engine type (%d)",