From: Jason Wang <jasowang@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, linux-kernel@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org, netdev@vger.kernel.org
Subject: Re: [PATCH] virtio_net: enable big packets for large MTU values
Date: Thu, 30 Mar 2017 12:03:36 +0800 [thread overview]
Message-ID: <5304103e-5a0b-230b-6bd0-1b33ab546889@redhat.com> (raw)
In-Reply-To: <1490791079-22108-1-git-send-email-mst@redhat.com>
On 2017年03月29日 20:38, Michael S. Tsirkin wrote:
> If one enables e.g. jumbo frames without mergeable
> buffers, packets won't fit in 1500 byte buffers
> we use. Switch to big packet mode instead.
> TODO: make sizing more exact, possibly extend small
> packet mode to use larger pages.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> drivers/net/virtio_net.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index e0fb3707..9dc31dc 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -2428,6 +2428,10 @@ static int virtnet_probe(struct virtio_device *vdev)
> dev->mtu = mtu;
> dev->max_mtu = mtu;
> }
> +
> + /* TODO: size buffers correctly in this case. */
> + if (dev->mtu > ETH_DATA_LEN)
> + vi->big_packets = true;
> }
>
> if (vi->any_header_sg)
Ok, I think maybe we should fail the probe of small buffer in this case
and decrease the max_mtu to ETH_DATA_LEN if small buffer is used (since
user are allowed to increase the mtu).
Thanks
prev parent reply other threads:[~2017-03-30 4:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-29 12:38 Michael S. Tsirkin
2017-03-29 16:13 ` Michael S. Tsirkin
2017-03-30 4:03 ` Jason Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5304103e-5a0b-230b-6bd0-1b33ab546889@redhat.com \
--to=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®