On 09/07/2016 05:25 AM, Yuanhan Liu wrote: > On Tue, Aug 30, 2016 at 09:57:39AM +0200, Maxime Coquelin wrote: >> Hi Souvik, >> >> On 08/30/2016 01:02 AM, souvikdey33 wrote: >>> Signed-off-by: Souvik Dey <sodey at sonusnet.com> >>> >>> Fixes: 1fb8e8896ca8 ("Signed-off-by: Souvik Dey <sodey at sonusnet.com>") >>> Reviewed-by: Stephen Hemminger <stephen at networkplumber.org> >>> >>> Virtio interfaces should also support setting of mtu, as in case of cloud >>> it is expected to have the consistent mtu across the infrastructure that >>> the dhcp server sends and not hardcoded to 1500(default). >>> --- >>> drivers/net/virtio/virtio_ethdev.c | 12 ++++++++++++ >>> 1 file changed, 12 insertions(+) >> >> FYI, there are some on-going changes in the VIRTIO specification >> so that the VHOST interface exposes its MTU to its VIRTIO peer. >> It may also be used as an alternative of what you patch achieves. >> >> I am working on its implementation in Qemu/DPDK, our goal being to >> reduce performance drops for small packets with Rx mergeable buffers >> feature enabled. > > Mind to educate me a bit on how that works?
Of course. Basically, this is a way to advise the MTU we want in the guest. In the guest, if GRO is not enabled: - In case of Kernel virtio-net, it could be used to size the SKBs at the expected MTU. If possible, we could disable Rx mergeable buffers. - In case of virtio PMD, if the MTU advised by host is lower than the pre-allocated mbuf size for the receive queue, then we should not need mergeable buffers. Does that sound reasonnable? Do I miss something? Thanks, Maxime