[v4,11/20] net/bnxt: fix clang compiler warnings
Checks
Commit Message
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(-)
Comments
On 11/3/2021 12:52 AM, Ajit Khaparde wrote:
> 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
Hi Ajit,
Is above Fixes commit correct? It is from v20.05.
As far as I can see the error comes from:
Fixes: bdf4a3c6316b ("net/bnxt: support tunnel offload")
if that is correct, stable tag is not needed.
>
> Bugzilla ID: 821
Can you please move the tag above 'Fixes' line?
> 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>
<...>
@@ -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 -