mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Haiyang Zhang <haiyangz@microsoft.com>
To: David Miller <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	KY Srinivasan <kys@microsoft.com>,
	"olaf@aepfle.de" <olaf@aepfle.de>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"driverdev-devel@linuxdriverproject.org" 
	<driverdev-devel@linuxdriverproject.org>
Subject: RE: [PATCH net-next] hyperv: Add processing of MTU reduced by the host
Date: Wed, 12 Nov 2014 20:02:11 +0000	[thread overview]
Message-ID: <ecc2fd8e646147fabb30d3120c889431@DFM-DB3MBX15-06.exchange.corp.microsoft.com> (raw)
In-Reply-To: <20141112.144640.703336197189868183.davem@davemloft.net>



> -----Original Message-----
> From: David Miller [mailto:davem@davemloft.net]
> Sent: Wednesday, November 12, 2014 2:47 PM
> To: Haiyang Zhang
> Cc: netdev@vger.kernel.org; KY Srinivasan; olaf@aepfle.de;
> jasowang@redhat.com; linux-kernel@vger.kernel.org; driverdev-
> devel@linuxdriverproject.org
> Subject: Re: [PATCH net-next] hyperv: Add processing of MTU reduced by
> the host
> 
> From: Haiyang Zhang <haiyangz@microsoft.com>
> 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


  reply	other threads:[~2014-11-12 20:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-11 23:27 Haiyang Zhang
2014-11-12 19:46 ` David Miller
2014-11-12 20:02   ` Haiyang Zhang [this message]
2014-11-12 20:04     ` David Miller
2014-11-12 20:31       ` Haiyang Zhang

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=ecc2fd8e646147fabb30d3120c889431@DFM-DB3MBX15-06.exchange.corp.microsoft.com \
    --to=haiyangz@microsoft.com \
    --cc=davem@davemloft.net \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=jasowang@redhat.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olaf@aepfle.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®