From: James Chapman <jchapman@katalix.com>
To: "R. Parameswaran" <parameswaran.r7@gmail.com>
Cc: kleptog@svana.org, netdev@vger.kernel.org, davem@redhat.com,
linux-kernel@vger.kernel.org, nprachan@brocade.com,
rshearma@brocade.com, dfawcus@brocade.com,
stephen@networkplumber.org, acme@redhat.com,
lboccass@brocade.com, bhong@brocade.com
Subject: Re: [PATCH net v2] L2TP:Adjust intf MTU,factor underlay L3,overlay L2
Date: Tue, 4 Oct 2016 08:53:14 +0100 [thread overview]
Message-ID: <149288c4-a352-ae30-ad3a-91d1edfa4bce@katalix.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1610031954330.2198@duvvury48.eng.vyatta.net>
On 04/10/16 04:12, R. Parameswaran wrote:
>
> Hi James,
>
> Please see inline, thanks for the reply:
>
> On Sat, 1 Oct 2016, James Chapman wrote:
>
>> On 30/09/16 03:39, R. Parameswaran wrote:
>>>>> + /* Adjust MTU, factor overhead - underlay L3 hdr, overlay L2 hdr*/
>>>>> + if (tunnel->sock->sk_family == AF_INET)
>>>>> + overhead += (ETH_HLEN + sizeof(struct iphdr));
>>>>> + else if (tunnel->sock->sk_family == AF_INET6)
>>>>> + overhead += (ETH_HLEN + sizeof(struct ipv6hdr));
>>>> What about options in the IP header? If certain options are set on the
>>>> socket, the IP header may be larger.
>>>>
>>> Thanks for the reply - It looks like IP options can only be
>>> enabled through setsockopt on an application's socket (if there's any
>>> other way to turn on IP options, please let me know - didn't see any
>>> sysctl setting for transmit). This scenario would come
>>> into picture when an application opens a raw IP or UDP socket such that it
>>> routes into the L2TP logical interface.
>> No. An L2TP daemon (userspace) will open a socket for each tunnel that
>> it creates. Control and data packets use the same socket, which is the
>> socket used by this code. It may set any options on its sockets. L2TP
>> tunnel sockets can be created either by an L2TP daemon (managed tunnels)
>> or by ip l2tp commands (unmanaged tunnels).
>>
> One Q I have is whether it would be sufficient to solve this for the
> common case (i.e no IP options) and have an expectation that the
> administrator will explicitly provision the mtu using the 'ip link ...
> mtu' command when dealing with infrequent occurences like IP options?
>
> But looking at the code, it looks to be possible to pick up whether
> options are enabled and how long the options are, from the ip_options struct
> embedded in the tunnel socket. If you want me to, I can repost the patch
> with this change (will need a few days) - please let me know if this is
> what you had in mind.
>
>
Yes, that's what I had in mind. But my preference would be that this
would be a new function in the ip core, for use by any encap protocol,
where appropriate.
next prev parent reply other threads:[~2016-10-04 7:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 20:52 R. Parameswaran
2016-09-27 7:31 ` David Miller
2016-09-27 19:17 ` R. Parameswaran
2016-09-28 7:48 ` David Miller
2016-09-29 2:36 ` R. Parameswaran
2016-09-29 12:21 ` Jiri Benc
2016-09-29 15:39 ` James Chapman
2016-09-29 15:18 ` James Chapman
2016-09-30 2:39 ` R. Parameswaran
2016-10-01 16:50 ` James Chapman
2016-10-04 3:12 ` R. Parameswaran
2016-10-04 7:53 ` James Chapman [this message]
[not found] ` <CAGeBGG7AS1JZYHC6T5_H6vY4wfptUtPzO=+kdCcUzJGXA0m6_A@mail.gmail.com>
2016-10-11 7:47 ` James Chapman
2016-10-17 4:05 ` [RFC PATCH v3 1/2] " R. Parameswaran
2016-10-17 5:20 ` [RFC PATCH v3 2/2] " R. Parameswaran
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=149288c4-a352-ae30-ad3a-91d1edfa4bce@katalix.com \
--to=jchapman@katalix.com \
--cc=acme@redhat.com \
--cc=bhong@brocade.com \
--cc=davem@redhat.com \
--cc=dfawcus@brocade.com \
--cc=kleptog@svana.org \
--cc=lboccass@brocade.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nprachan@brocade.com \
--cc=parameswaran.r7@gmail.com \
--cc=rshearma@brocade.com \
--cc=stephen@networkplumber.org \
/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®