From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: Shahaji Bhosle <sbhosle@broadcom.com>,
stable@dpdk.org,
Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Subject: [dpdk-stable] [PATCH v4 11/20] net/bnxt: fix clang compiler warnings
Date: Tue, 2 Nov 2021 17:52:42 -0700 [thread overview]
Message-ID: <20211103005251.25524-12-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20211103005251.25524-1-ajit.khaparde@broadcom.com>
[-- Attachment #1: Type: text/plain, Size: 1959 bytes --]
From: Shahaji Bhosle <sbhosle@broadcom.com>
Typecast flow_item type, action_item type and the ENUMs to uint32_t
before comparing.
Fixes: 53a0d4f7663 ("net/bnxt: support flow API item parsing")
Cc: stable@dpdk.org
Bugzilla ID: 821
Signed-off-by: Shahaji Bhosle <sbhosle@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
index 605c29223c..d21c088d59 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
@@ -137,10 +137,10 @@ bnxt_ulp_rte_parser_hdr_parse(const struct rte_flow_item pattern[],
/* Parse all the items in the pattern */
while (item && item->type != RTE_FLOW_ITEM_TYPE_END) {
- if (item->type >= (uint32_t)
+ if (item->type >= (typeof(item->type))
BNXT_RTE_FLOW_ITEM_TYPE_END) {
if (item->type >=
- (uint32_t)BNXT_RTE_FLOW_ITEM_TYPE_LAST)
+ (typeof(item->type))BNXT_RTE_FLOW_ITEM_TYPE_LAST)
goto hdr_parser_error;
/* get the header information */
hdr_info = &ulp_vendor_hdr_info[item->type -
@@ -186,9 +186,9 @@ bnxt_ulp_rte_parser_act_parse(const struct rte_flow_action actions[],
/* Parse all the items in the pattern */
while (action_item && action_item->type != RTE_FLOW_ACTION_TYPE_END) {
if (action_item->type >=
- (uint32_t)BNXT_RTE_FLOW_ACTION_TYPE_END) {
+ (typeof(action_item->type))BNXT_RTE_FLOW_ACTION_TYPE_END) {
if (action_item->type >=
- (uint32_t)BNXT_RTE_FLOW_ACTION_TYPE_LAST)
+ (typeof(action_item->type))BNXT_RTE_FLOW_ACTION_TYPE_LAST)
goto act_parser_error;
/* get the header information from bnxt actinfo table */
hdr_info = &ulp_vendor_act_info[action_item->type -
--
2.30.1 (Apple Git-130)
next prev parent reply other threads:[~2021-11-03 0:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20211102040556.7840-1-venkatkumar.duvvuru@broadcom.com>
[not found] ` <20211103005251.25524-1-ajit.khaparde@broadcom.com>
2021-11-03 0:52 ` [dpdk-stable] [PATCH v4 03/20] net/bnxt: fix out of bounds issue in hash list Ajit Khaparde
2021-11-03 0:52 ` Ajit Khaparde [this message]
2021-11-03 13:24 ` [dpdk-stable] [dpdk-dev] [PATCH v4 11/20] net/bnxt: fix clang compiler warnings Ferruh Yigit
[not found] ` <20211104215846.58672-1-ajit.khaparde@broadcom.com>
2021-11-04 21:58 ` [dpdk-stable] [PATCH v5 03/22] net/bnxt: fix out of bounds issue in hash list 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=20211103005251.25524-12-ajit.khaparde@broadcom.com \
--to=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=sbhosle@broadcom.com \
--cc=stable@dpdk.org \
--cc=venkatkumar.duvvuru@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).