[PATCH 1/1] net/sfc: drop redundant null check from IPv4 flow item parse

Ivan Malov ivan.malov at arknetworks.am
Fri Jul 14 00:40:02 CEST 2023


Such check is already done at an earlier point, in
sfc_flow_parse_pattern(), so remove it from IPv4
item parser. Doing so should fix Coverity issue.

Coverity issue: 395526
Fixes: f79ce621e963 ("net/sfc: support IPv4 fragment matching in transfer rules")
Cc: stable at dpdk.org

Signed-off-by: Ivan Malov <ivan.malov at arknetworks.am>
---
 drivers/net/sfc/sfc_mae.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index 63f6536243..60a54fd425 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -2331,7 +2331,7 @@ sfc_mae_rule_parse_item_ipv4(const struct rte_flow_item *item,
 	if (ctx_mae->match_spec != ctx_mae->match_spec_action)
 		supp_mask.hdr.fragment_offset = 0;
 
-	if (item != NULL && item->last != NULL) {
+	if (item->last != NULL) {
 		last = item->last;
 		item_dup.last = NULL;
 	}
-- 
2.17.1



More information about the stable mailing list