From: Hyong Youb Kim Date: Tue, 2 Feb 2021 00:24:23 +0000 (-0800) Subject: net/enic: fix filter type used for flow API X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d700f0d0d7074c76a94c0278315acb86f9ea30ba;p=dpdk.git net/enic: fix 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). Fixes: 26faa126d87e ("net/enic: flow API for NICs with advanced filters disabled") Cc: stable@dpdk.org Signed-off-by: Hyong Youb Kim Reviewed-by: John Daley --- diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c index 97ee7509ce..7eb06f889e 100644 --- a/drivers/net/enic/enic_flow.c +++ b/drivers/net/enic/enic_flow.c @@ -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;