From: Stephen Hemminger <stephen@networkplumber.org>
To: souvikdey33 <sodey@sonusnet.com>
Cc: <huawei.xie@intel.com>, <yuanhan.liu@linux.intel.com>, <dev@dpdk.org>
Subject: Re: [PATCH v1] add mtu set in virtio
Date: Sat, 27 Aug 2016 17:15:41 -0700 [thread overview]
Message-ID: <20160827171541.5f6b17c2@xeon-e3> (raw)
In-Reply-To: <20160827005428.16556-1-sodey@sonusnet.com>
On Fri, 26 Aug 2016 20:54:28 -0400
souvikdey33 <sodey@sonusnet.com> wrote:
> This functionality is required mostly in the cloud infrastructure.
> For example, if we use gre or vxlan network between compute and
> controller, then we should not use 1500 mtu in the guest as with
> encapsulation the sixe of the packet will be more and will get
> dropped in the infrastructure. So, in that case we should honor
> the mtu size sent by the dhcp server and configure the same on
> the virtual interfaces in the guest. This will also keep a
> consistent mtu through out the infrastructure.
>
> souvikdey33 (1):
> Signed-off-by: Souvik Dey <sodey@sonusnet.com>
>
> drivers/net/virtio/virtio_ethdev.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
Thanks for the patch, it is a good step forward but it looks
like more code is needed to do this safely. At a minimum,
need to check that MTU is not greater than VIRTIO_MAX_RX_PKTLEN.
And error return should be negative errno not -1.
Something like:
if (mtu < VIRTIO_MIN_MTU || mtu > VIRTIO_MAX_RX_PKTLEN)
return -EINVAL;
Looking at Linux driver, it allows MTU of up to 64K, yet DPDK
only allows 9728. That should probably be fixed.
next prev parent reply other threads:[~2016-08-28 0:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-27 0:54 [PATCH v1] add mtu set in virtio souvikdey33
2016-08-28 0:15 ` Stephen Hemminger [this message]
2016-08-28 22:43 ` Dey, Souvik
2016-08-29 19:33 ` Stephen Hemminger
2016-08-29 22:49 ` Dey, Souvik
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=20160827171541.5f6b17c2@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=huawei.xie@intel.com \
--cc=sodey@sonusnet.com \
--cc=yuanhan.liu@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.