]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/mlx5/mlx5_flow_dv.c
net/mlx5: fix VLAN flow action with wildcard VLAN item
[dpdk.git] / drivers / net / mlx5 / mlx5_flow_dv.c
index fd002f3c57365556edc3cab5bddd97ea121c6ea5..71da5fbefe2f27d7655398c0598cebce63d39be8 100644 (file)
@@ -1881,6 +1881,9 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
                const struct rte_flow_item_vlan *vlan_m = items->mask;
                const struct rte_flow_item_vlan *vlan_v = items->spec;
 
+               /* If VLAN item in pattern doesn't contain data, return here. */
+               if (!vlan_v)
+                       return;
                if (!vlan_m)
                        vlan_m = &nic_mask;
                /* Only full match values are accepted */