net/enic: fix the filter type used for flow API
PATCH 1/1 net/enic: fix the filter type used for flow API
The filter type (struct filter_v2.type) should always be set to FILTER_DPDK_1, when advanced filtering is enabled in firmware. Otherwise, for some old firmware versions, the driver sets it to FILTER_USNIC_IP, and attempts to install filters fail. This behavior matches that of the now-removed flow director implementation (enic_clsf.c).
--- drivers/net/enic/enic_flow.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/enic/enic_flow.c +2 -0
@@ -1598,6 +1598,8 @@ enic_flow_parse(struct rte_eth_dev *dev,return -rte_errno; } enic_filter->type = enic->flow_filter_mode; +if (enic->adv_filters) + enic_filter->type =FILTER_DPDK_1 ; ret =enic_copy_filter (pattern, enic_filter_cap, enic, enic_filter, error);return ret;
Signature · 1 line
2.26.2
Ferruh Yigit
AppliedQuoted 7 lines · Hyong Youb Kim
The filter type (struct filter_v2.type) should always be set to
FILTER_DPDK_1, when advanced filtering is enabled in firmware. Otherwise, for some old firmware versions, the driver sets it toFILTER_USNIC_IP, and attempts to install filters fail. This behavior matches that of the now-removed flow director implementation (enic_clsf.c).
Quoted 5 lines
Fixes 26faa126d87e ("net/enic: flow API for NICs with advanced filters disabled")Signed-off-by Hyong Youb Kim <[email protected]>Reviewed-by John Daley <[email protected]>
Applied to dpdk-next-net/main, thanks.