app/testpmd: fix build without drivers
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
--- app/test-pmd/cmdline.c | 1 + 1 file changed, 1 insertion(+)
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);#ifdef RTE_NET_IXGBE if (ret == -ENOTSUP )
Signature · 1 line
2.34.1
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 usedFixes 4cfe399f6550 ("net/bnxt: support to set VF rxmode")Signed-off-by Thomas Monjalon <[email protected]>--- app/test-pmd/cmdline.c | 1 + 1 file changed, 1 insertion(+)app/test-pmd/cmdline.c +0
-0
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?
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 usedFixes 4cfe399f6550 ("net/bnxt: support to set VF rxmode")Signed-off-by Thomas Monjalon <[email protected]>--- app/test-pmd/cmdline.c | 1 + 1 file changed, 1 insertion(+)app/test-pmd/cmdline.c +0
-0@@ -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
-0RTE_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.
Ajit Khaparde
Acked-byQuoted 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 usedFixes 4cfe399f6550 ("net/bnxt: support to set VF rxmode")Signed-off-by Thomas Monjalon <[email protected]>--- app/test-pmd/cmdline.c | 1 + 1 file changed, 1 insertion(+)app/test-pmd/cmdline.c +0
-0app/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
Acked-by Bruce Richardson <[email protected]>
Thanks
Ferruh Yigit
AppliedQuoted 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 usedFixes 4cfe399f6550 ("net/bnxt: support to set VF rxmode")Signed-off-by Thomas Monjalon <[email protected]>--- app/test-pmd/cmdline.c | 1 + 1 file changed, 1 insertion(+)app/test-pmd/cmdline.c +0
-0app/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
Acked-by Bruce Richardson <[email protected]>Thanks
Acked-by Ajit Khaparde <[email protected]>
Able to reproduce with clang.
Applied to dpdk-next-net/main, thanks.