From: Eduardo Otubo <otubo@redhat.com>
To: Mohammed Gamal <mgamal@redhat.com>
Cc: netdev@vger.kernel.org, xen-devel@lists.xenproject.org,
paul.durrant@citrix.com, wei.liu2@citrix.com,
linux-kernel@vger.kernel.org, vkuznets@redhat.com,
cavery@redhat.com, cheshi@redhat.com
Subject: Re: [PATCH] xen-netfront, xen-netback: Use correct minimum MTU values
Date: Mon, 16 Oct 2017 16:43:34 +0200 [thread overview]
Message-ID: <20171016144334.GA2996@vader> (raw)
In-Reply-To: <1508160032-21689-1-git-send-email-mgamal@redhat.com>
On Mon, Oct 16, 2017 at 03:20:32PM +0200, Mohammed Gamal wrote:
> RFC791 specifies the minimum MTU to be 68, while xen-net{front|back}
> drivers use a minimum value of 0.
>
> When set MTU to 0~67 with xen_net{front|back} driver, the network
> will become unreachable immediately, the guest can no longer be pinged.
>
> xen_net{front|back} should not allow the user to set this value which causes
> network problems.
>
> Reported-by: Chen Shi <cheshi@redhat.com>
> Signed-off-by: Mohammed Gamal <mgamal@redhat.com>
> ---
> drivers/net/xen-netback/interface.c | 2 +-
> drivers/net/xen-netfront.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
> index ee8ed9da..4491ca5 100644
> --- a/drivers/net/xen-netback/interface.c
> +++ b/drivers/net/xen-netback/interface.c
> @@ -486,7 +486,7 @@ struct xenvif *xenvif_alloc(struct device *parent, domid_t domid,
>
> dev->tx_queue_len = XENVIF_QUEUE_LENGTH;
>
> - dev->min_mtu = 0;
> + dev->min_mtu = ETH_MIN_MTU;
> dev->max_mtu = ETH_MAX_MTU - VLAN_ETH_HLEN;
>
> /*
> diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
> index 523387e..8b8689c 100644
> --- a/drivers/net/xen-netfront.c
> +++ b/drivers/net/xen-netfront.c
> @@ -1316,7 +1316,7 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev)
> netdev->features |= netdev->hw_features;
>
> netdev->ethtool_ops = &xennet_ethtool_ops;
> - netdev->min_mtu = 0;
> + netdev->min_mtu = ETH_MIN_MTU;
> netdev->max_mtu = XEN_NETIF_MAX_TX_SIZE;
> SET_NETDEV_DEV(netdev, &dev->dev);
>
> --
> 1.8.3.1
>
Acked-by: Eduardo Otubo <otubo@redhat.com>
--
Eduardo Otubo
Senior Software Engineer @ RedHat
next prev parent reply other threads:[~2017-10-16 14:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-16 13:20 [PATCH] xen-netfront, xen-netback: Use correct minimum MTU values Mohammed Gamal
2017-10-16 14:43 ` Eduardo Otubo [this message]
2017-10-16 14:43 ` Eduardo Otubo
2017-10-16 15:05 ` Wei Liu
2017-10-16 15:05 ` Wei Liu
2017-10-16 20:19 ` Boris Ostrovsky
2017-10-16 20:19 ` Boris Ostrovsky
2017-10-16 20:22 ` David Miller
2017-10-16 20:22 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2017-10-16 13:20 Mohammed Gamal
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=20171016144334.GA2996@vader \
--to=otubo@redhat.com \
--cc=cavery@redhat.com \
--cc=cheshi@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgamal@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=paul.durrant@citrix.com \
--cc=vkuznets@redhat.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.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 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.