From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com,
Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>,
Somnath Kotur <somnath.kotur@broadcom.com>
Subject: [dpdk-dev] [PATCH 2/2] net/bnxt: fix check for null spec and mask
Date: Tue, 19 Nov 2019 20:29:07 -0800 [thread overview]
Message-ID: <20191120042907.1030-2-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20191120042907.1030-1-ajit.khaparde@broadcom.com>
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@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@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)
next prev parent reply other threads:[~2019-11-20 4:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-20 4:29 [dpdk-dev] [PATCH 1/2] doc: update bnxt feature list Ajit Khaparde
2019-11-20 4:29 ` Ajit Khaparde [this message]
2019-11-20 5:01 ` [dpdk-dev] [PATCH 2/2] net/bnxt: fix check for null spec and mask Ajit Khaparde
2019-11-20 5:02 ` [dpdk-dev] [PATCH 1/2] doc: update bnxt feature list Ajit Khaparde
2019-11-20 9:41 ` Ferruh Yigit
2019-11-20 16:55 ` Ajit Khaparde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191120042907.1030-2-ajit.khaparde@broadcom.com \
--to=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=santosh.rastapur@broadcom.com \
--cc=somnath.kotur@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).