DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Q about testpmd and link speed settings
@ 2020-11-25 20:55 Andrew Boyer
  2020-12-09 19:32 ` Andrew Boyer
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Boyer @ 2020-11-25 20:55 UTC (permalink / raw)
  To: dev

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;
 }




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-09 19:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25 20:55 [dpdk-dev] Q about testpmd and link speed settings Andrew Boyer
2020-12-09 19:32 ` Andrew Boyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).