diff mbox series

Q about testpmd and link speed settings

Message ID F041DE53-0ABF-4A0A-974A-16167967ABD5@pensando.io (mailing list archive)
State Not Applicable, archived
Headers show
Series Q about testpmd and link speed settings | expand

Checks

Context Check Description
ci/Intel-compilation fail apply issues

Commit Message

Andrew Boyer Nov. 25, 2020, 8:55 p.m. UTC
Almost every PMD seems to do something like this (igb in this example):

	autoneg = (*speeds & ETH_LINK_SPEED_FIXED) == 0;

But testpmd’s parse_and_check_speed_duplex() doesn’t ever set the FIXED bit. It either sets AUTONEG (0) or the bit for one of the individual speeds.

Thus when I run a testpmd command like this:

	testpmd> port config all speed 100000 duplex full

The PMD gets a speed setting in eth_dev->data->dev_conf->link_speeds, but it doesn’t have the FIXED bit set.

The patch below corrects this behavior for me. For some reason it breaks the testpmd link_bonding_autotest though - does anyone with an understanding of the internals of the unit tests care to take a look at why?

	+ TestCase [51] : test_tlb_verify_promiscuous_enable_disable succeeded
	+ TestCase [52] : test_tlb_verify_slave_link_status_change_failover failed
	Port 8 must be stopped to allow configuration
	+ TestCase [53] : test_alb_change_mac_in_reply_sent failed
	Port 8 must be stopped to allow configuration
	+ TestCase [54] : test_alb_reply_from_client failed
	Port 8 must be stopped to allow configuration
	+ TestCase [55] : test_alb_receive_vlan_reply failed
	Port 8 must be stopped to allow configuration
	+ TestCase [56] : test_alb_ipv4_tx failed 

Does this sound reasonable or am I way off track?

Thank you,
Andrew

Comments

Andrew Boyer Dec. 9, 2020, 7:32 p.m. UTC | #1
Any replies to this? Am I understanding the API correctly?

-Andrew

> On Nov 25, 2020, at 3:55 PM, Andrew Boyer <aboyer@pensando.io> wrote:
> 
> Almost every PMD seems to do something like this (igb in this example):
> 
> 	autoneg = (*speeds & ETH_LINK_SPEED_FIXED) == 0;
> 
> But testpmd’s parse_and_check_speed_duplex() doesn’t ever set the FIXED bit. It either sets AUTONEG (0) or the bit for one of the individual speeds.
> 
> Thus when I run a testpmd command like this:
> 
> 	testpmd> port config all speed 100000 duplex full
> 
> The PMD gets a speed setting in eth_dev->data->dev_conf->link_speeds, but it doesn’t have the FIXED bit set.
> 
> The patch below corrects this behavior for me. For some reason it breaks the testpmd link_bonding_autotest though - does anyone with an understanding of the internals of the unit tests care to take a look at why?
> 
> 	+ TestCase [51] : test_tlb_verify_promiscuous_enable_disable succeeded
> 	+ TestCase [52] : test_tlb_verify_slave_link_status_change_failover failed
> 	Port 8 must be stopped to allow configuration
> 	+ TestCase [53] : test_alb_change_mac_in_reply_sent failed
> 	Port 8 must be stopped to allow configuration
> 	+ TestCase [54] : test_alb_reply_from_client failed
> 	Port 8 must be stopped to allow configuration
> 	+ TestCase [55] : test_alb_receive_vlan_reply failed
> 	Port 8 must be stopped to allow configuration
> 	+ TestCase [56] : test_alb_ipv4_tx failed 
> 
> Does this sound reasonable or am I way off track?
> 
> Thank you,
> Andrew
> 
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index a037a55c6a..075804b8b5 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -1627,6 +1627,9 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
>                }
>        }
> 
> +       if (*speed != ETH_LINK_SPEED_AUTONEG)
> +               *speed |= ETH_LINK_SPEED_FIXED;
> +
>        return 0;
> }
> 
> 
>
diff mbox series

Patch

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index a037a55c6a..075804b8b5 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1627,6 +1627,9 @@  parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
                }
        }
 
+       if (*speed != ETH_LINK_SPEED_AUTONEG)
+               *speed |= ETH_LINK_SPEED_FIXED;
+
        return 0;
 }