RE: [PATCH net-next] hyperv: Add processing of MTU reduced by the host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: David Miller [mailto:davem@xxxxxxxxxxxxx]
> Sent: Wednesday, November 12, 2014 2:47 PM
> To: Haiyang Zhang
> Cc: netdev@xxxxxxxxxxxxxxx; KY Srinivasan; olaf@xxxxxxxxx;
> jasowang@xxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; driverdev-
> devel@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH net-next] hyperv: Add processing of MTU reduced by
> the host
> 
> From: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
> Date: Tue, 11 Nov 2014 15:27:52 -0800
> 
> > -	if (mtu < 68 || mtu > limit)
> > +	if (mtu < ETH_DATA_LEN || mtu > limit)
> >  		return -EINVAL;
> 
> This is not correct.
> 
> The test is against the minimally supported MTU, which should
> be 68 not ETH_DATA_LEN which is 1500.

The Hyper-V host doesn't support MTU below 1500. If we try setting MTU to a 
value < 1500, the host will use 1500 automatically and return 1500 in the 
RNDIS_OID_GEN_MAXIMUM_FRAME_SIZE query and guest will also use it. That's 
why I set the lower limit to ETH_DATA_LEN.

Are you suggesting that we keep the 68 as the lower limit, and let the host 
auto-reset it to 1500 when we trying to set an MTU < 1500?

Thanks,
- Haiyang

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux