Skip to contentSkip to conversation

app/testpmd: fix build without drivers

PATCH Applied Thomas Monjalon 4 participants 5 messages Feb 25, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/testpmd: fix build without drivers

When ixgbe and bnxt are disabled, compilation was failing:

app/test-pmd/cmdline.c:9396:11: error:
variable 'vf_rxmode' set but not used

Fixes 4cfe399f6550 ("net/bnxt: support to set VF rxmode")
---
 app/test-pmd/cmdline.c | 1 +
 1 file changed, 1 insertion(+)
app/test-pmd/cmdline.c +1 -0
index b4ba8da2b0..7ab0575e64 100644
@@ -9409,6 +9409,7 @@ cmd_set_vf_rxmode_parsed(void *parsed_result,
 	}
 
 	RTE_SET_USED(is_on);
+	RTE_SET_USED(vf_rxmode);
 
 #ifdef RTE_NET_IXGBE
 	if (ret == -ENOTSUP)
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw
Quoted 18 lines · Thomas Monjalon

When ixgbe and bnxt are disabled, compilation was failing:

app/test-pmd/cmdline.c:9396:11: error:
variable 'vf_rxmode' set but not used

Fixes 4cfe399f6550 ("net/bnxt: support to set VF rxmode")
---
 app/test-pmd/cmdline.c | 1 +
 1 file changed, 1 insertion(+)
app/test-pmd/cmdline.c +0 -0
index b4ba8da2b0..7ab0575e64 100644

app/test-pmd/cmdline.c cmd_set_vf_rxmode_parsed(void *parsed_result, · line 9413

Quoted 5 lines
app/test-pmd/cmdline.c +1 -0
@@ -9409,6 +9409,7 @@ cmd_set_vf_rxmode_parsed(void *parsed_result,
 	}
 
 	RTE_SET_USED(is_on);
+	RTE_SET_USED(vf_rxmode);
 

Checking the code, I see the issue and the fix looks correct. However, doing some basic builds disabling the relevant drivers, and all drivers, in fact, I fail to reproduce the actual error message. Does this error only occur at lower optimization levels, or only using clang or similar?

#2 lore raw

25/02/2022 16:50, Bruce Richardson:

Quoted 21 lines · Thomas Monjalon
Quoted 20 lines

When ixgbe and bnxt are disabled, compilation was failing:

app/test-pmd/cmdline.c:9396:11: error:
variable 'vf_rxmode' set but not used

Fixes 4cfe399f6550 ("net/bnxt: support to set VF rxmode")
---
 app/test-pmd/cmdline.c | 1 +
 1 file changed, 1 insertion(+)
app/test-pmd/cmdline.c +0 -0
index b4ba8da2b0..7ab0575e64 100644
@@ -9409,6 +9409,7 @@ cmd_set_vf_rxmode_parsed(void *parsed_result,
 	}
 
Quoted 7 lines

app/test-pmd/cmdline.c cmd_set_vf_rxmode_parsed(void *parsed_result, · line 9413

Quoted 3 lines
app/test-pmd/cmdline.c +1 -0
 	RTE_SET_USED(is_on);
+	RTE_SET_USED(vf_rxmode);
 

Checking the code, I see the issue and the fix looks correct. However, doing some basic builds disabling the relevant drivers, and all drivers, in fact, I fail to reproduce the actual error message. Does this error only occur at lower optimization levels, or only using clang or similar?

I don't remember, probably clang only.

Acked-by
#3 lore raw
In reply to Bruce Richardson
Quoted 30 lines · Bruce Richardson
Quoted 18 lines · Thomas Monjalon

When ixgbe and bnxt are disabled, compilation was failing:

app/test-pmd/cmdline.c:9396:11: error:
variable 'vf_rxmode' set but not used

Fixes 4cfe399f6550 ("net/bnxt: support to set VF rxmode")
---
 app/test-pmd/cmdline.c | 1 +
 1 file changed, 1 insertion(+)
app/test-pmd/cmdline.c +0 -0
index b4ba8da2b0..7ab0575e64 100644

app/test-pmd/cmdline.c cmd_set_vf_rxmode_parsed(void *parsed_result, · line 9413

Quoted 5 lines
app/test-pmd/cmdline.c +1 -0
@@ -9409,6 +9409,7 @@ cmd_set_vf_rxmode_parsed(void *parsed_result,
      }
 
      RTE_SET_USED(is_on);
+     RTE_SET_USED(vf_rxmode);
 

Checking the code, I see the issue and the fix looks correct. However, doing some basic builds disabling the relevant drivers, and all drivers, in fact, I fail to reproduce the actual error message. Does this error only occur at lower optimization levels, or only using clang or similar?

Quoted 1 line

Thanks

Applied
#4 lore raw
Quoted 32 lines · Ajit Khaparde
Quoted 30 lines · Bruce Richardson
Quoted 18 lines · Thomas Monjalon

When ixgbe and bnxt are disabled, compilation was failing:

app/test-pmd/cmdline.c:9396:11: error:
variable 'vf_rxmode' set but not used

Fixes 4cfe399f6550 ("net/bnxt: support to set VF rxmode")
---
  app/test-pmd/cmdline.c | 1 +
  1 file changed, 1 insertion(+)
app/test-pmd/cmdline.c +0 -0
index b4ba8da2b0..7ab0575e64 100644

app/test-pmd/cmdline.c cmd_set_vf_rxmode_parsed(void *parsed_result, · line 9413

Quoted 5 lines
app/test-pmd/cmdline.c +1 -0
@@ -9409,6 +9409,7 @@ cmd_set_vf_rxmode_parsed(void *parsed_result,
       }
 
       RTE_SET_USED(is_on);
+     RTE_SET_USED(vf_rxmode);
 

Checking the code, I see the issue and the fix looks correct. However, doing some basic builds disabling the relevant drivers, and all drivers, in fact, I fail to reproduce the actual error message. Does this error only occur at lower optimization levels, or only using clang or similar?

Quoted 4 lines
Quoted 1 line

Thanks

Able to reproduce with clang.

Applied to dpdk-next-net/main, thanks.