DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/enic: fix the filter type used for flow API
@ 2021-02-02  0:24 Hyong Youb Kim
  2021-02-02 12:57 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Hyong Youb Kim @ 2021-02-02  0:24 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Hyong Youb Kim, stable, John Daley

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 <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_flow.c | 2 ++
 1 file changed, 2 insertions(+)

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;
-- 
2.26.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/enic: fix the filter type used for flow API
  2021-02-02  0:24 [dpdk-dev] [PATCH] net/enic: fix the filter type used for flow API Hyong Youb Kim
@ 2021-02-02 12:57 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2021-02-02 12:57 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: dev, stable, John Daley

On 2/2/2021 12:24 AM, Hyong Youb Kim wrote:
> 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 <hyonkim@cisco.com>
> Reviewed-by: John Daley <johndale@cisco.com>

Applied to dpdk-next-net/main, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-02 12:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-02  0:24 [dpdk-dev] [PATCH] net/enic: fix the filter type used for flow API Hyong Youb Kim
2021-02-02 12:57 ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).