[ovs-dev] [PATCH v4] netdev-dpdk: Add link speed to get_status().

Stokes, Ian ian.stokes at intel.com
Fri Nov 2 11:52:19 UTC 2018


> On 02.11.2018 13:45, Ian Stokes wrote:
> > Report the link speed of the device in netdev_dpdk_get_status()
> > function.
> >
> > Link speed is already reported as part of the netdev_get_features()
> > function. However only link speeds defined in the OpenFlow specs are
> > supported so speeds such as 25 Gbps etc. are not shown. The link speed
> > for the device is available in Mbps in rte_eth_link.
> > This commit converts the link speed for a given dpdk device to an easy
> > to read string and reports it in get_status().
> >
> > Suggested-by: Flavio Leitner <fbl at sysclose.org>
> > Signed-off-by: Ian Stokes <ian.stokes at intel.com>
> > ---
> 
> This version looks OK to me. One possible simplification is not to copy
> the full rte_eth_link structure.
> Like:
>     uint32_t speed;
>     <...>
>     speed = dev->link.link_speed;
>     <...>
>     smap_add(args, "link_speed", netdev_dpdk_link_speed_to_str__(speed));
> 

Ya that would make sense, we don’t use anything like duplex from the link so the uint32 will be quicker again. I can make this change on commit.

> or even:
> 
>     const char *speed;
>     <...>
>     speed = netdev_dpdk_link_speed_to_str__(dev->link.link_speed);
>     <...>
>     smap_add(args, "link_speed", speed);
> 
> Anyway, any version (current or any of above) looks good to me.
> 
> Acked-by: Ilya Maximets <i.maximets at samsung.com>

Thanks Ilya. Do you have any more comments on patch 1 of the series. I've submitted a v2 with the changes you requested. I'd like to get both in today's pull request if you get a chance to look at it.

https://mail.openvswitch.org/pipermail/ovs-dev/2018-November/353526.html

Thanks
Ian


More information about the dev mailing list