> -----Original Message-----
> From: Yang, Qiming <qiming.y...@intel.com>
> Sent: Sunday, June 25, 2023 4:23 PM
> To: Zhang, Qi Z <qi.z.zh...@intel.com>; dev@dpdk.org
> Cc: Yang, Qiming <qiming.y...@intel.com>; sta...@dpdk.org
> Subject: [PATCH] net/ice: fix VLAN mode parser
> 
> Parser will not be ctreated if raw packet filter is not support.
> This patch add NULL pointer check for parser structure when VLAN mode
> configure.
> 
> Fixes: 6e753d777ffc ("net/ice: initialize parser for double VLAN")
> Cc: sta...@dpdk.org
> 
> Signed-off-by: Qiming Yang <qiming.y...@intel.com>

Acked-by: Qi Zhang <qi.z.zh...@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
> ---
>  drivers/net/ice/ice_generic_flow.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ice/ice_generic_flow.c
> b/drivers/net/ice/ice_generic_flow.c
> index ed3075d555..91bf1d6fcb 100644
> --- a/drivers/net/ice/ice_generic_flow.c
> +++ b/drivers/net/ice/ice_generic_flow.c
> @@ -1836,10 +1836,12 @@ 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);
> +     if (ad->psr) {
> +             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) {
> --
> 2.25.1

Reply via email to