All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vmxnet3: Use correct minimum MTU value
@ 2017-10-17 14:33 Mohammed Gamal
  2017-10-18  7:15 ` Andrew Lunn
  2017-10-20  6:15 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Mohammed Gamal @ 2017-10-17 14:33 UTC (permalink / raw)
  To: netdev, skhare, pv-drivers
  Cc: linux-kernel, cavery, otubo, vkuznets, Mohammed Gamal

Currently the vmxnet3 driver has a minimum MTU value of 60. Which
goes against the RFC791 spec which specifies it at 68.

Setting MTU to values between 60 <= MTU <= 67 causes the network
interface to lose its IP, and it fails to restart.

This sets the minimum value to ETH_MIN_MTU (68) which is compatible
with is according to spec.

Reported-by: Bo Yang <boyang@redhat.com>
Signed-off-by: Mohammed Gamal <mgamal@redhat.com>
---
 drivers/net/vmxnet3/vmxnet3_defs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_defs.h b/drivers/net/vmxnet3/vmxnet3_defs.h
index c3a3164..4ad905a 100644
--- a/drivers/net/vmxnet3/vmxnet3_defs.h
+++ b/drivers/net/vmxnet3/vmxnet3_defs.h
@@ -749,7 +749,7 @@ struct Vmxnet3_DriverShared {
 	((vfTable[vid >> 5] & (1 << (vid & 31))) != 0)
 
 #define VMXNET3_MAX_MTU     9000
-#define VMXNET3_MIN_MTU     60
+#define VMXNET3_MIN_MTU     ETH_MIN_MTU
 
 #define VMXNET3_LINK_UP         (10000 << 16 | 1)    /* 10 Gbps, up */
 #define VMXNET3_LINK_DOWN       0
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] vmxnet3: Use correct minimum MTU value
  2017-10-17 14:33 [PATCH] vmxnet3: Use correct minimum MTU value Mohammed Gamal
@ 2017-10-18  7:15 ` Andrew Lunn
  2017-10-20  6:15 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2017-10-18  7:15 UTC (permalink / raw)
  To: Mohammed Gamal
  Cc: netdev, skhare, pv-drivers, linux-kernel, cavery, otubo, vkuznets

On Tue, Oct 17, 2017 at 04:33:43PM +0200, Mohammed Gamal wrote:
> Currently the vmxnet3 driver has a minimum MTU value of 60. Which
> goes against the RFC791 spec which specifies it at 68.
> 
> Setting MTU to values between 60 <= MTU <= 67 causes the network
> interface to lose its IP, and it fails to restart.
> 
> This sets the minimum value to ETH_MIN_MTU (68) which is compatible
> with is according to spec.

Hi Mohammed

I'm not sure this is actually correct. Yes, IP sets a minimum of 68,
and the IP address will be removed if you set a smaller MTU. But the
interface should still usable for other protocols. It can still send
and receive frames.

Is the hardware happy to send 60 byte frames?

       Andrew

> 
> Reported-by: Bo Yang <boyang@redhat.com>
> Signed-off-by: Mohammed Gamal <mgamal@redhat.com>
> ---
>  drivers/net/vmxnet3/vmxnet3_defs.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/vmxnet3/vmxnet3_defs.h b/drivers/net/vmxnet3/vmxnet3_defs.h
> index c3a3164..4ad905a 100644
> --- a/drivers/net/vmxnet3/vmxnet3_defs.h
> +++ b/drivers/net/vmxnet3/vmxnet3_defs.h
> @@ -749,7 +749,7 @@ struct Vmxnet3_DriverShared {
>  	((vfTable[vid >> 5] & (1 << (vid & 31))) != 0)
>  
>  #define VMXNET3_MAX_MTU     9000
> -#define VMXNET3_MIN_MTU     60
> +#define VMXNET3_MIN_MTU     ETH_MIN_MTU
>  
>  #define VMXNET3_LINK_UP         (10000 << 16 | 1)    /* 10 Gbps, up */
>  #define VMXNET3_LINK_DOWN       0
> -- 
> 1.8.3.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] vmxnet3: Use correct minimum MTU value
  2017-10-17 14:33 [PATCH] vmxnet3: Use correct minimum MTU value Mohammed Gamal
  2017-10-18  7:15 ` Andrew Lunn
@ 2017-10-20  6:15 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-10-20  6:15 UTC (permalink / raw)
  To: mgamal; +Cc: netdev, skhare, pv-drivers, linux-kernel, cavery, otubo, vkuznets

From: Mohammed Gamal <mgamal@redhat.com>
Date: Tue, 17 Oct 2017 16:33:43 +0200

> Currently the vmxnet3 driver has a minimum MTU value of 60. Which
> goes against the RFC791 spec which specifies it at 68.
> 
> Setting MTU to values between 60 <= MTU <= 67 causes the network
> interface to lose its IP, and it fails to restart.
> 
> This sets the minimum value to ETH_MIN_MTU (68) which is compatible
> with is according to spec.
> 
> Reported-by: Bo Yang <boyang@redhat.com>
> Signed-off-by: Mohammed Gamal <mgamal@redhat.com>

There are protocols other than IPv4, and as Andrew mentioned
the ipv4 stack does the right thing by disabling ipv4 on
an interface when the MTU is too small.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-20  6:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-17 14:33 [PATCH] vmxnet3: Use correct minimum MTU value Mohammed Gamal
2017-10-18  7:15 ` Andrew Lunn
2017-10-20  6:15 ` David Miller

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.