app/testpmd: fix start index for showing FEC array
Checks
Commit Message
From: Karra Satwik <kaara.satwik@chelsio.com>
Start from index 0 when going through the FEC array. This will allow
"off" to get printed for RTE_ETH_FEC_NOFEC mode.
Fixes: b19da32e3151 ("app/testpmd: add FEC command")
Cc: stable@dpdk.org
Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
app/test-pmd/config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
在 2020/12/21 6:47, Rahul Lakkireddy 写道:
> From: Karra Satwik <kaara.satwik@chelsio.com>
>
> Start from index 0 when going through the FEC array. This will allow
> "off" to get printed for RTE_ETH_FEC_NOFEC mode.
>
> Fixes: b19da32e3151 ("app/testpmd: add FEC command")
> Cc: stable@dpdk.org
>
> Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
> ---
> app/test-pmd/config.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> index 3f6c8642b..a6a5baa4e 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -3701,7 +3701,7 @@ show_fec_capability(unsigned int num, struct rte_eth_fec_capa *speed_fec_capa)
> printf("%s : ",
> rte_eth_link_speed_to_str(speed_fec_capa[i].speed));
>
> - for (j = RTE_ETH_FEC_AUTO; j < RTE_DIM(fec_mode_name); j++) {
> + for (j = 0; j < RTE_DIM(fec_mode_name); j++) {
As RTE_ETH_FEC_NOFEC is mode which every device has, so we think it
should not be regarged as "capabilities".
Thanks.
> if (RTE_ETH_FEC_MODE_TO_CAPA(j) &
> speed_fec_capa[i].capa)
> printf("%s ", fec_mode_name[j].name);
>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
> -----Original Message-----
> From: stable <stable-bounces@dpdk.org> On Behalf Of Rahul Lakkireddy
> Sent: Monday, December 21, 2020 06:47
> To: dev@dpdk.org
> Cc: kaara.satwik@chelsio.com; stable@dpdk.org
> Subject: [dpdk-stable] [PATCH] app/testpmd: fix start index for showing FEC
> array
>
> From: Karra Satwik <kaara.satwik@chelsio.com>
>
> Start from index 0 when going through the FEC array. This will allow "off" to get
> printed for RTE_ETH_FEC_NOFEC mode.
>
> Fixes: b19da32e3151 ("app/testpmd: add FEC command")
> Cc: stable@dpdk.org
>
> Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
> ---
> app/test-pmd/config.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index
> 3f6c8642b..a6a5baa4e 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -3701,7 +3701,7 @@ show_fec_capability(unsigned int num, struct
> rte_eth_fec_capa *speed_fec_capa)
> printf("%s : ",
> rte_eth_link_speed_to_str(speed_fec_capa[i].speed));
>
> - for (j = RTE_ETH_FEC_AUTO; j < RTE_DIM(fec_mode_name);
> j++) {
> + for (j = 0; j < RTE_DIM(fec_mode_name); j++) {
> if (RTE_ETH_FEC_MODE_TO_CAPA(j) &
> speed_fec_capa[i].capa)
> printf("%s ", fec_mode_name[j].name);
> --
> 2.24.0
On Monday, December 12/21/20, 2020 at 17:07:21 +0800, Min Hu (Connor) wrote:
>
>
> 在 2020/12/21 6:47, Rahul Lakkireddy 写道:
> >From: Karra Satwik <kaara.satwik@chelsio.com>
> >
> >Start from index 0 when going through the FEC array. This will allow
> >"off" to get printed for RTE_ETH_FEC_NOFEC mode.
> >
> >Fixes: b19da32e3151 ("app/testpmd: add FEC command")
> >Cc: stable@dpdk.org
> >
> >Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
> >Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
> >---
> > app/test-pmd/config.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> >index 3f6c8642b..a6a5baa4e 100644
> >--- a/app/test-pmd/config.c
> >+++ b/app/test-pmd/config.c
> >@@ -3701,7 +3701,7 @@ show_fec_capability(unsigned int num, struct rte_eth_fec_capa *speed_fec_capa)
> > printf("%s : ",
> > rte_eth_link_speed_to_str(speed_fec_capa[i].speed));
> >- for (j = RTE_ETH_FEC_AUTO; j < RTE_DIM(fec_mode_name); j++) {
> >+ for (j = 0; j < RTE_DIM(fec_mode_name); j++) {
>
> As RTE_ETH_FEC_NOFEC is mode which every device has, so we think it
> should not be regarged as "capabilities".
> Thanks.
>
We had gotten several requests asking if device supported turning
FEC "off" because it was not listed in capabilities. Hence, the
motiviation for this patch to explicitly show that "off" is
supported.
> > if (RTE_ETH_FEC_MODE_TO_CAPA(j) &
> > speed_fec_capa[i].capa)
> > printf("%s ", fec_mode_name[j].name);
> >
+dev@dpdk.org which seems to have been dropped by accident.
On Friday, December 12/25/20, 2020 at 09:03:43 +0800, Min Hu (Connor) wrote:
>
>
> 在 2020/12/24 19:25, Rahul Lakkireddy 写道:
> >On Thursday, December 12/24/20, 2020 at 17:36:27 +0800, Min Hu (Connor) wrote:
> >>
> >>
> >>在 2020/12/23 20:31, Rahul Lakkireddy 写道:
> >>>On Monday, December 12/21/20, 2020 at 17:07:21 +0800, Min Hu (Connor) wrote:
> >>>>
> >>>>
> >>>>在 2020/12/21 6:47, Rahul Lakkireddy 写道:
> >>>>>From: Karra Satwik <kaara.satwik@chelsio.com>
> >>>>>
> >>>>>Start from index 0 when going through the FEC array. This will allow
> >>>>>"off" to get printed for RTE_ETH_FEC_NOFEC mode.
> >>>>>
> >>>>>Fixes: b19da32e3151 ("app/testpmd: add FEC command")
> >>>>>Cc: stable@dpdk.org
> >>>>>
> >>>>>Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
> >>>>>Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
> >>>>>---
> >>>>> app/test-pmd/config.c | 2 +-
> >>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>>
> >>>>>diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> >>>>>index 3f6c8642b..a6a5baa4e 100644
> >>>>>--- a/app/test-pmd/config.c
> >>>>>+++ b/app/test-pmd/config.c
> >>>>>@@ -3701,7 +3701,7 @@ show_fec_capability(unsigned int num, struct rte_eth_fec_capa *speed_fec_capa)
> >>>>> printf("%s : ",
> >>>>> rte_eth_link_speed_to_str(speed_fec_capa[i].speed));
> >>>>>- for (j = RTE_ETH_FEC_AUTO; j < RTE_DIM(fec_mode_name); j++) {
> >>>>>+ for (j = 0; j < RTE_DIM(fec_mode_name); j++) {
> >>>>
> >>>>As RTE_ETH_FEC_NOFEC is mode which every device has, so we think it
> >>>>should not be regarged as "capabilities".
> >>>>Thanks.
> >>>>
> >>>
> >>>We had gotten several requests asking if device supported turning
> >>>FEC "off" because it was not listed in capabilities. Hence, the
> >>>motiviation for this patch to explicitly show that "off" is
> >>>supported.
> >>
> >>HI, we have referred to other netcard in kernel driver mode, it shows like
> >>this:
> >>
> >>[root@centos197-test_dpdk]$ethtool --show-fec eth9
> >>FEC parameters for eth9:
> >>Configured FEC encodings: Auto BaseR
> >>Active FEC encoding: Off
> >>
> >>Here, "Configured FEC encodings" means the capability it supports, it
> >>does not include "off", although it can be configured using "off".
> >>thanks.
> >>
> >
> >It is the same with our own card too using our kernel driver and
> >have gotten the same questions in the past with our kernel driver
> >too.
> >
> ># ethtool --show-fec enp2s0f4
> >FEC parameters for enp2s0f4:
> >Configured FEC encodings: Auto BaseR RS
> >Active FEC encoding: RS
> >
> >We don't have any strong opinion on this. We just wanted to let
> >testpmd show the 'off' caps since it's also an available option.
> >If the intention is confusing, then sure we will drop the patch.
> >Let us know your feedback.
> Hi, I've got your opinion, but I think the display about FEC in dpdk
> testpmd had better be in accordance with that in kernel ethtool.
> IF the two is different, it may confuse users, thanks.
> So, what about everybody? any opinion will be welcome.
>
> >
> >>
> >>
> >>>
> >>>
> >>>>> if (RTE_ETH_FEC_MODE_TO_CAPA(j) &
> >>>>> speed_fec_capa[i].capa)
> >>>>> printf("%s ", fec_mode_name[j].name);
> >>>>>
> >>>.
> >>>
> >.
> >
On 12/23/2020 6:07 AM, Li, Xiaoyun wrote:
>> -----Original Message-----
>> From: stable <stable-bounces@dpdk.org> On Behalf Of Rahul Lakkireddy
>> Sent: Monday, December 21, 2020 06:47
>> To: dev@dpdk.org
>> Cc: kaara.satwik@chelsio.com; stable@dpdk.org
>> Subject: [dpdk-stable] [PATCH] app/testpmd: fix start index for showing FEC
>> array
>>
>> From: Karra Satwik <kaara.satwik@chelsio.com>
>>
>> Start from index 0 when going through the FEC array. This will allow "off" to get
>> printed for RTE_ETH_FEC_NOFEC mode.
>>
>> Fixes: b19da32e3151 ("app/testpmd: add FEC command")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
>> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
>
> Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Applied to dpdk-next-net/main, thanks.
@@ -3701,7 +3701,7 @@ show_fec_capability(unsigned int num, struct rte_eth_fec_capa *speed_fec_capa)
printf("%s : ",
rte_eth_link_speed_to_str(speed_fec_capa[i].speed));
- for (j = RTE_ETH_FEC_AUTO; j < RTE_DIM(fec_mode_name); j++) {
+ for (j = 0; j < RTE_DIM(fec_mode_name); j++) {
if (RTE_ETH_FEC_MODE_TO_CAPA(j) &
speed_fec_capa[i].capa)
printf("%s ", fec_mode_name[j].name);