[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56BA2D6D.6090408@cogentembedded.com>
Date: Tue, 9 Feb 2016 21:18:21 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: David Wragg <david@...ve.works>, netdev@...r.kernel.org,
dev@...nvswitch.org
Cc: Jesse Gross <jesse@...nel.org>, David Miller <davem@...emloft.net>,
Hannes Frederic Sowa <hannes@...essinduktion.org>,
Thomas Graf <tgraf@...g.ch>,
Roopa Prabhu <roopa@...ulusnetworks.com>
Subject: Re: [PATCH net v2 2/3] geneve: Relax MTU constraints
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@...ve.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
Powered by blists - more mailing lists