Skip to contentSkip to conversation

net/bnxt: fix compilation error on Redhat 8

PATCH In review Thierry Herbelot 5 participants 5 messages Sep 18, 2020 – Sep 20, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/bnxt: fix compilation error on Redhat 8

.../drivers/net/bnxt/tf_ulp/ulp_def_rules.c: In function ‘bnxt_ulp_destroy_df_rules’:
.../dpdk/drivers/net/bnxt/tf_ulp/ulp_def_rules.c:425:28: error:
comparison is always true due to limited range of data type [-Werror=type-limits]

  for (port_id = 0; port_id < RTE_MAX_ETHPORTS; port_id++) {
                            ^
Fixes 769de16872ab9 ('net/bnxt: fix port default rule create/destroy')
Cc Ajit Khaparde <[email protected]>
Cc Somnath Kotur <[email protected]>
---
 drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bnxt/tf_ulp/ulp_def_rules.c +1 -1
index 9fb1a028ff66..ff5aed3d74c4 100644
@@ -397,7 +397,7 @@ void
 bnxt_ulp_destroy_df_rules(struct bnxt *bp, bool global)
 {
 	struct bnxt_ulp_df_rule_info *info;
-	uint8_t port_id;
+	uint16_t port_id;
 
 	if (!BNXT_TRUFLOW_EN(bp) ||
 	    BNXT_ETH_DEV_IS_REPRESENTOR(bp->eth_dev))
Signature · 1 line
2.27.0
Acked-by on v1 1/1
#1 lore raw
Quoted 30 lines · Thierry Herbelot

.../drivers/net/bnxt/tf_ulp/ulp_def_rules.c: In function ‘bnxt_ulp_destroy_df_rules’:
.../dpdk/drivers/net/bnxt/tf_ulp/ulp_def_rules.c:425:28: error:
comparison is always true due to limited range of data type [-Werror=type-limits]

  for (port_id = 0; port_id < RTE_MAX_ETHPORTS; port_id++) {
                            ^
Fixes 769de16872ab9 ('net/bnxt: fix port default rule create/destroy')
Cc Ajit Khaparde <[email protected]>
Cc Somnath Kotur <[email protected]>
---
 drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bnxt/tf_ulp/ulp_def_rules.c +1 -2
index 9fb1a028ff66..ff5aed3d74c4 100644
@@ -397,7 +397,7 @@ void
 bnxt_ulp_destroy_df_rules(struct bnxt *bp, bool global)
 {
        struct bnxt_ulp_df_rule_info *info;
-       uint8_t port_id;
+       uint16_t port_id;
 
        if (!BNXT_TRUFLOW_EN(bp) ||
            BNXT_ETH_DEV_IS_REPRESENTOR(bp->eth_dev))
--
Quoted 2 lines

2.27.0

#2 lore raw
Quoted 30 lines · Somnath Kotur
Quoted 27 lines · Thierry Herbelot

.../drivers/net/bnxt/tf_ulp/ulp_def_rules.c: In function ‘bnxt_ulp_destroy_df_rules’:
.../dpdk/drivers/net/bnxt/tf_ulp/ulp_def_rules.c:425:28: error:
comparison is always true due to limited range of data type [-Werror=type-limits]

  for (port_id = 0; port_id < RTE_MAX_ETHPORTS; port_id++) {
                            ^
Fixes 769de16872ab9 ('net/bnxt: fix port default rule create/destroy')
Cc Ajit Khaparde <[email protected]>
Cc Somnath Kotur <[email protected]>
---
 drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bnxt/tf_ulp/ulp_def_rules.c +1 -1
index 9fb1a028ff66..ff5aed3d74c4 100644
@@ -397,7 +397,7 @@ void
 bnxt_ulp_destroy_df_rules(struct bnxt *bp, bool global)
 {
        struct bnxt_ulp_df_rule_info *info;
-       uint8_t port_id;
+       uint16_t port_id;
 
Quoted 7 lines
Quoted 5 lines
drivers/net/bnxt/tf_ulp/ulp_def_rules.c +0 -1
        if (!BNXT_TRUFLOW_EN(bp) ||
            BNXT_ETH_DEV_IS_REPRESENTOR(bp->eth_dev))
--

2.27.0

This patch rang a bell.
There is the exact same patch proposed by Xia with a comment, so I guess Xia is still working on it?
https://patchwork.dpdk.org/patch/75177/#117201

Signature · 1 line
David Marchand
#3 lore raw

::snip::

Quoted 6 lines
Quoted 1 line

This patch rang a bell.
There is the exact same patch proposed by Xia with a comment, so I guess Xia is still working on it?
https://patchwork.dpdk.org/patch/75177/#117201

Xia,
Will you submit the changes that Thomas asked for? Otherwise I will apply the bnxt patch and you can work on the rest.

Thanks
Ajit

#4 lore raw

Hi, David & Ajit

Yes, I will submit a patch to change all eth port id to uint16_t this week as I promised. Is this ok for you?

Thanks,
Chenbo

Quoted 23 lines

-----Original Message-----
From: Ajit Khaparde <[email protected]>
Sent: Saturday, September 19, 2020 12:16 AM
To: David Marchand <[email protected]>
Cc: Somnath Kotur <[email protected]>; Thierry Herbelot <[email protected]>; Xia, Chenbo <[email protected]>; dev <[email protected]>; Thomas Monjalon <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/bnxt: fix compilation error on Redhat 8

::snip::

Quoted 6 lines
Quoted 1 line

This patch rang a bell.
There is the exact same patch proposed by Xia with a comment, so I guess Xia is still working on it?
https://patchwork.dpdk.org/patch/75177/#117201

Xia,
Will you submit the changes that Thomas asked for? Otherwise I will apply the bnxt patch and you can work on the rest.

Thanks
Ajit