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

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ipxe-devel mailing list
ipxe-devel@lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel

Reply via email to