Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Oct 2016 18:17:54 -0700
From:      Lohith Bellad <lohithbsd@gmail.com>
To:        freebsd-net@freebsd.org, bryanv@FreeBSD.org
Subject:   Problem with Virtio using JUMBO frame config.
Message-ID:  <F90A6D7D-D013-4936-A7FB-39B5C98CC739@gmail.com>

next in thread | raw e-mail | index | archive | help
Hi All,

I want to use Virtio with JUMBO frame support without TSOv4, TSOv6 and =
GSO.

Looks like without TSOv4, TSOv6 and GSO. The max number of segments =
allowed for scatter gather operations is 4.=20

But, if TSOv4, TSOv6 or GSO feature is enabled, max segments for scatter =
gather is set to 64.

sys/dev/virtio/network/if_vtnet.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D
if (virtio_with_feature(dev, VIRTIO_NET_F_GSO) ||
    virtio_with_feature(dev, VIRTIO_NET_F_HOST_TSO4) ||
    virtio_with_feature(dev, VIRTIO_NET_F_HOST_TSO6))
        sc->vtnet_tx_nsegs =3D VTNET_MAX_TX_SEGS; <=3D=3D 64
else
        sc->vtnet_tx_nsegs =3D VTNET_MIN_TX_SEGS; <=3D=3D 4

In my case since I don=E2=80=99t have TSOv4, TSOv6 or GSO enabled, so =
max segments is 4.
And if I try to send PING echo with size 18000 or more (results into 3 =
frames), driver is failing to send it. PING with size less than 15000 =
works always.

Using dtrace and vtnet sysctls found that, in my case scatter gather =
segments are more than 4 and thats why EFBIG error is returned by =
sglist_append_mbuf().

Also, vtnet defrag failed stats are increasing,
dev.vtnet.4.tx_defragged: 111443
dev.vtnet.4.tx_defrag_failed: 7917

These changes were done in following commit
https://svnweb.freebsd.org/base?view=3Drevision&revision=3D261394

So, is JUMBO frame support allowed only with TSO support or am I missing =
something.

Any help is appreciated.

Thanks,
Lohith




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F90A6D7D-D013-4936-A7FB-39B5C98CC739>