From 5889248ce94faffc71005c671b960effef3f9fab Mon Sep 17 00:00:00 2001 From: Ajit Khaparde Date: Fri, 27 Oct 2017 10:53:34 -0500 Subject: [PATCH] net/bnxt: fix flow director filter Set the filter_type before we match a new filter against existing filters. Otherwise we are missing the existing filters. Fixes: 2d64da097aa0 ("net/bnxt: support FDIR") Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 10735f6a8a..61801c25d6 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -2407,6 +2407,7 @@ bnxt_fdir_filter(struct rte_eth_dev *dev, ret = bnxt_parse_fdir_filter(bp, fdir, filter); if (ret != 0) goto free_filter; + filter->filter_type = HWRM_CFA_NTUPLE_FILTER; match = bnxt_match_fdir(bp, filter); if (match != NULL && filter_op == RTE_ETH_FILTER_ADD) { @@ -2427,7 +2428,6 @@ bnxt_fdir_filter(struct rte_eth_dev *dev, STAILQ_FIRST(&bp->ff_pool[fdir->action.rx_queue]); if (filter_op == RTE_ETH_FILTER_ADD) { - filter->filter_type = HWRM_CFA_NTUPLE_FILTER; ret = bnxt_hwrm_set_ntuple_filter(bp, filter->dst_id, filter); -- 2.20.1