[dpdk-dev] [PATCH 2/2] net/bnxt: fix check for null spec and mask
Ajit Khaparde
ajit.khaparde at broadcom.com
Wed Nov 20 05:29:07 CET 2019
bnxt_validate_and_parse_flow_type already has protocol specific NULL
checks for rte_flow_item spec and mask and take actions accordingly.
A check at the top of the loop is redundant and is preventing the
protocol specific checks from being executed.
Fixes: b7e01f386059 ("net/bnxt: handle cleanup if flow creation fails")
Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
---
drivers/net/bnxt/bnxt_flow.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 5af571448..76e9584da 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -177,14 +177,6 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
return -rte_errno;
}
- if (!item->spec || !item->mask) {
- rte_flow_error_set(error, EINVAL,
- RTE_FLOW_ERROR_TYPE_ITEM,
- item,
- "spec/mask is NULL");
- return -rte_errno;
- }
-
switch (item->type) {
case RTE_FLOW_ITEM_TYPE_ANY:
inner =
--
2.21.0 (Apple Git-122.2)
More information about the dev
mailing list