All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: David Wragg <david@weave.works>,
	netdev@vger.kernel.org, dev@openvswitch.org
Cc: Jesse Gross <jesse@kernel.org>,
	David Miller <davem@davemloft.net>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>,
	Thomas Graf <tgraf@suug.ch>,
	Roopa Prabhu <roopa@cumulusnetworks.com>
Subject: Re: [PATCH net v2 2/3] geneve: Relax MTU constraints
Date: Tue, 9 Feb 2016 21:18:21 +0300	[thread overview]
Message-ID: <56BA2D6D.6090408@cogentembedded.com> (raw)
In-Reply-To: <1455036424-6403-3-git-send-email-david@weave.works>

On 02/09/2016 07:47 PM, David Wragg wrote:

> Allow the MTU of geneve devices to be set to large values, in order to
> exploit underlying networks with larger frame sizes.
>
> GENEVE does not have a fixed encapsulation overhead (an openvswitch
> rule can add variable length options), so there is no relevant maximum
> MTU to enforce.  A maximum of IP_MAX_MTU is used instead.
> Encapsulated packets that are too big for the underlying network will
> get dropped on the floor.
>
> Signed-off-by: David Wragg <david@weave.works>
> ---
>   drivers/net/geneve.c | 12 +++++++++++-
>   1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
> index 0b14ac3..05cef11 100644
> --- a/drivers/net/geneve.c
> +++ b/drivers/net/geneve.c
> @@ -1039,6 +1039,16 @@ static netdev_tx_t geneve_xmit(struct sk_buff *skb, struct net_device *dev)
>   	return geneve_xmit_skb(skb, dev, info);
>   }
>
> +static int geneve_change_mtu(struct net_device *dev, int new_mtu)
> +{
> +	/* GENEVE overhead is not fixed, so we can't enforce a more
> +	   precise max MTU. */

    The networking code formats comments:

/* Like
  * this.
  */

> +	if (new_mtu < 68 || new_mtu > IP_MAX_MTU)
> +		return -EINVAL;
> +	dev->mtu = new_mtu;
> +	return 0;
> +}
> +
>   static int geneve_fill_metadata_dst(struct net_device *dev, struct sk_buff *skb)
>   {
>   	struct ip_tunnel_info *info = skb_tunnel_info(skb);
[...]

MBR, Sergei

  reply	other threads:[~2016-02-09 18:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 16:47 [PATCH net v2 0/3] Set a large MTU on ovs-created tunnel devices David Wragg
2016-02-09 16:47 ` [PATCH net v2 1/3] vxlan: Relax the MTU constraints David Wragg
     [not found] ` <1455036424-6403-1-git-send-email-david-1SEAoVOfG6VEzL6FDj/jAg@public.gmane.org>
2016-02-09 16:47   ` [PATCH net v2 2/3] geneve: Relax " David Wragg
2016-02-09 18:18     ` Sergei Shtylyov [this message]
     [not found]       ` <56BA2D6D.6090408-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-02-09 18:22         ` David Wragg
2016-02-10  7:40     ` Tom Herbert
2016-02-10 11:41       ` David Wragg
2016-02-10 11:59         ` Jesse Gross
2016-02-10 14:21           ` Tom Herbert
     [not found]             ` <CALx6S36kvXJUZM8_vEmF8L3bxnRiBh98Rs0wAd-HGBJ9Yyde_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-02-10 14:52               ` Jesse Gross
2016-02-16 12:33                 ` David Wragg
2016-02-16 16:44                   ` Tom Herbert
2016-02-18 16:54                     ` David Wragg
2016-02-18 20:07                       ` David Miller
     [not found]                       ` <86bn7e2c3t.fsf-1SEAoVOfG6VEzL6FDj/jAg@public.gmane.org>
2016-02-19  2:11                         ` Tom Herbert
2016-02-09 16:47 ` [PATCH net v2 3/3] vxlan, gre, geneve: Set a large MTU on ovs-created tunnel devices David Wragg

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=56BA2D6D.6090408@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=davem@davemloft.net \
    --cc=david@weave.works \
    --cc=dev@openvswitch.org \
    --cc=hannes@stressinduktion.org \
    --cc=jesse@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=roopa@cumulusnetworks.com \
    --cc=tgraf@suug.ch \
    /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.