From: Ajit Khaparde Date: Mon, 8 Jan 2018 20:24:33 +0000 (-0800) Subject: net/bnxt: remove addition of a temporary filter X-Git-Tag: spdx-start~370 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2aafbe01504ccf12ca9953f8550f251041aa0e90;p=dpdk.git net/bnxt: remove addition of a temporary filter filter1 which is used to just get the l2 filter FW id and not used later was unnecessarily being inserted into a list and was not being freed after it's use was done. Fix it by not doing the list insertion and releasing it back to the free filter pool. Signed-off-by: Somnath Kotur Signed-off-by: Ajit Khaparde --- diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c index 65d30fb38f..2c9b7c78d4 100644 --- a/drivers/net/bnxt/bnxt_filter.c +++ b/drivers/net/bnxt/bnxt_filter.c @@ -806,7 +806,6 @@ bnxt_get_l2_filter(struct bnxt *bp, struct bnxt_filter_info *nf, bnxt_free_filter(bp, filter1); return NULL; } - STAILQ_INSERT_TAIL(&vnic->filter, filter1, next); return filter1; } @@ -957,7 +956,11 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev, goto ret; } -//done: + if (filter1) { + bnxt_free_filter(bp, filter1); + filter1->fw_l2_filter_id = -1; + } + act = nxt_non_void_action(++act); if (act->type != RTE_FLOW_ACTION_TYPE_END) { rte_flow_error_set(error, EINVAL,