[ipxe-devel] About the RX_BUF_SIZE issue of virtio-net
Stefan Hajnoczi
stefanha at redhat.com
Tue Mar 29 11:07:53 UTC 2016
On Mon, Mar 28, 2016 at 06:20:41AM -0600, Lin Ma wrote:
> We know that RX_BUF_SIZE is assigned the value 1522 in src/drivers/net/virtio-net.c.
>
> I'd like to know that is it ok if I write a patch to change the value from 1522 to IEEE80211_MAX_FRAME_LEN(2352)?
> If the answer is negative, Would you please tell me why?
>
> I got an bug report about this, During a pxe guest installation, after loading kernel, if sending jumbo frame packets, say
> 'ping -i0.5 -M do -s 8972 $GUEST_IP' from host, The guest installation will hang, So I want to increase the rx buffer
> size of virtio-net to avoid this overflow. That's why I ask this question.
The virtio-net specification says:
If the VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6 or
VIRTIO_NET_F_GUEST_UFO features are used, the maximum incoming packet
will be to 65550 bytes long (the maximum size of a TCP or UDP packet,
plus the 14 byte ethernet header), otherwise 1514 bytes. The 12-byte
struct virtio_net_hdr is prepended to this, making for 65562 or 1526
bytes.
iPXE doesn't use the segmentation/fragmentation offload features so it
sticks to the small 1526 byte size. (I haven't checked if the 1522 vs
1526 difference is legitimate or a bug.)
Although it probably wouldn't hurt to increase the rx buffer size to
around IEEE80211_MAX_FRAME_LEN, I do wonder why this particular constant
would be the true maximum value. 802.11 can use up to 7935 byte frames.
Michael Tsirkin: Can you comment on virtio-net jumbo frame usage? Is it
common? Which number is a popular frame size limit?
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20160329/702c4df0/attachment.sig>
More information about the ipxe-devel
mailing list