* [PATCH] xen-netfront, xen-netback: Use correct minimum MTU values
@ 2017-10-16 13:20 Mohammed Gamal
2017-10-16 14:43 ` Eduardo Otubo
2017-10-16 15:05 ` Wei Liu
0 siblings, 2 replies; 5+ messages in thread
From: Mohammed Gamal @ 2017-10-16 13:20 UTC (permalink / raw)
To: netdev, xen-devel, paul.durrant, wei.liu2
Cc: linux-kernel, vkuznets, otubo, cavery, cheshi, Mohammed Gamal
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] xen-netfront, xen-netback: Use correct minimum MTU values
2017-10-16 13:20 [PATCH] xen-netfront, xen-netback: Use correct minimum MTU values Mohammed Gamal
@ 2017-10-16 14:43 ` Eduardo Otubo
2017-10-16 15:05 ` Wei Liu
1 sibling, 0 replies; 5+ messages in thread
From: Eduardo Otubo @ 2017-10-16 14:43 UTC (permalink / raw)
To: Mohammed Gamal
Cc: netdev, xen-devel, paul.durrant, wei.liu2, linux-kernel, vkuznets,
cavery, cheshi
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xen-netfront, xen-netback: Use correct minimum MTU values
2017-10-16 13:20 [PATCH] xen-netfront, xen-netback: Use correct minimum MTU values Mohammed Gamal
2017-10-16 14:43 ` Eduardo Otubo
@ 2017-10-16 15:05 ` Wei Liu
2017-10-16 20:19 ` Boris Ostrovsky
1 sibling, 1 reply; 5+ messages in thread
From: Wei Liu @ 2017-10-16 15:05 UTC (permalink / raw)
To: Mohammed Gamal
Cc: otubo, Juergen Gross, wei.liu2, netdev, linux-kernel,
paul.durrant, cheshi, xen-devel, vkuznets, cavery,
Boris Ostrovsky
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>
Acked-by: Wei Liu <wei.liu2@citrix.com>
CC netfront maintainers
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xen-netfront, xen-netback: Use correct minimum MTU values
2017-10-16 15:05 ` Wei Liu
@ 2017-10-16 20:19 ` Boris Ostrovsky
2017-10-16 20:22 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Boris Ostrovsky @ 2017-10-16 20:19 UTC (permalink / raw)
To: Wei Liu, Mohammed Gamal
Cc: netdev, xen-devel, paul.durrant, linux-kernel, vkuznets, otubo,
cavery, cheshi, Juergen Gross
On 10/16/2017 11:05 AM, Wei Liu wrote:
> 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>
> Acked-by: Wei Liu <wei.liu2@citrix.com>
>
> CC netfront maintainers
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
I can take it via Xen tree unless there are objections.
-boris
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xen-netfront, xen-netback: Use correct minimum MTU values
2017-10-16 20:19 ` Boris Ostrovsky
@ 2017-10-16 20:22 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2017-10-16 20:22 UTC (permalink / raw)
To: boris.ostrovsky
Cc: wei.liu2, mgamal, netdev, xen-devel, paul.durrant, linux-kernel,
vkuznets, otubo, cavery, cheshi, jgross
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Date: Mon, 16 Oct 2017 16:19:07 -0400
> On 10/16/2017 11:05 AM, Wei Liu wrote:
>> 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>
>> Acked-by: Wei Liu <wei.liu2@citrix.com>
>>
>> CC netfront maintainers
>
>
> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>
> I can take it via Xen tree unless there are objections.
No problem on my end.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-10-16 20:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-16 13:20 [PATCH] xen-netfront, xen-netback: Use correct minimum MTU values Mohammed Gamal
2017-10-16 14:43 ` Eduardo Otubo
2017-10-16 15:05 ` Wei Liu
2017-10-16 20:19 ` Boris Ostrovsky
2017-10-16 20:22 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).