[dpdk-dev] [PATCH v8 2/5] net/virtio: add link speed devarg

Thomas Monjalon thomas at monjalon.net
Thu Apr 2 19:33:42 CEST 2020


02/04/2020 11:18, Ivan Dyukov:
> Hello Thomas,
> 
> 01.04.2020 13:57, Thomas Monjalon пишет:
> > 30/03/2020 09:57, Ivan Dyukov:
> >> Some applications like pktgen use link speed to calculate
> >> transmission rate. It limits outcome traffic to hardcoded 10G.
> >>
> >> This patch adds speed devarg which allows to configure
> >> link speed of virtio device.
> > Is it really a good idea to fake such information?
> > Shouldn't it be managed differently in the application instead?
> >
> >
> >
> This is main stream of net devices. Device provides speed to 
> application. Application calculates the packet rate. In case of virtio, 
> speed is not limited by device. It could be specified by user. This 
> patch just gives this posibility to user.

The other possibility is to return 0 meaning unknown speed.
I don't see why this information should be saved in the driver space.
The user can give this information to the application,
it would look more correct to me.
Note: the application is controlling the devargs passed to the driver,
so it can intercept such information.

I understand it is easier to have the speed info at the same place
in all cases. But it avoids differentiating what is a reliable info,
and what is user-provided info.




More information about the dev mailing list