Any replies to this? Am I understanding the API correctly? -Andrew
> On Nov 25, 2020, at 3:55 PM, Andrew Boyer <[email protected]> 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; > } > > >

