All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pravin Shelar <pravin.ovn@gmail.com>
To: Jonas Bonn <jonas@norrbonn.se>
Cc: Jakub Kicinski <kuba@kernel.org>,
	Harald Welte <laforge@gnumonks.org>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	Pravin B Shelar <pbshelar@fb.com>,
	Pablo Neira Ayuso <pablo@netfilter.org>
Subject: Re: [RFC PATCH 15/16] gtp: add ability to send GTP controls headers
Date: Mon, 1 Feb 2021 22:56:12 -0800	[thread overview]
Message-ID: <CAOrHB_D101x6H3U1e0gUZZd5-VqmPMbaczPwJY1GA=6LXGafDw@mail.gmail.com> (raw)
In-Reply-To: <03621476-ed9b-a186-3b9a-774c703c207a@norrbonn.se>

On Mon, Feb 1, 2021 at 9:24 PM Jonas Bonn <jonas@norrbonn.se> wrote:
>
> Hi Jakub,
>
> On 01/02/2021 21:44, Jakub Kicinski wrote:
> > On Sat, 30 Jan 2021 12:05:40 -0800 Pravin Shelar wrote:
> >> On Sat, Jan 30, 2021 at 10:44 AM Jakub Kicinski <kuba@kernel.org> wrote:
> >>> On Fri, 29 Jan 2021 22:59:06 -0800 Pravin Shelar wrote:
> >>>> On Fri, Jan 29, 2021 at 6:08 AM Jonas Bonn <jonas@norrbonn.se> wrote:
> >>>> Following are the reasons for extracting the header and populating metadata.
> >>>> 1. That is the design used by other tunneling protocols
> >>>> implementations for handling optional headers. We need to have a
> >>>> consistent model across all tunnel devices for upper layers.
> >>>
> >>> Could you clarify with some examples? This does not match intuition,
> >>> I must be missing something.
> >>
> >> You can look at geneve_rx() or vxlan_rcv() that extracts optional
> >> headers in ip_tunnel_info opts.
> >
> > Okay, I got confused what Jonas was inquiring about. I thought that the
> > extension headers were not pulled, rather than not parsed. Copying them
> > as-is to info->opts is right, thanks!
> >
>
> No, you're not confused.  The extension headers are not being pulled in
> the current patchset.
>
> Incoming packet:
>
> ---------------------------------------------------------------------
> | flags | type | len | TEID | N-PDU | SEQ | Ext | EXT.Hdr | IP | ...
> ---------------------------------------------------------------------
> <--------- GTP header ------<<Optional GTP elements>>-----><- Pkt --->
>
> The "collect metadata" path of the patchset copies 'flags' and 'type' to
> info->opts, but leaves the following:
>
> -----------------------------------------
> | N-PDU | SEQ | Ext | EXT.Hdr | IP | ...
> -----------------------------------------
> <--------- GTP header -------><- Pkt --->
>
> So it's leaving _half_ the header and making it a requirement that there
> be further intelligence down the line that can handle this.  This is far
> from intuitive.
>

The patch supports Echo, Echo response and End marker packet.
Issue with pulling the entire extension header is that it would result
in zero length skb, such packets can not be passed on to the upper
layer. That is the reason I kept the extension header in skb and added
indication in tunnel metadata that it is not a IP packet. so that
upper layer can process the packet.
IP packet without an extension header would be handled in a fast path
without any special handling.

Obviously In case of PDU session container extension header GTP driver
would need to process the entire extension header in the module. This
way we can handle these user data packets in fastpath.
I can make changes to use the same method for all extension headers if needed.

  reply	other threads:[~2021-02-02  6:57 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-23 19:59 [RFC PATCH 00/16] GTP: flow based Jonas Bonn
2021-01-23 19:59 ` [RFC PATCH 01/16] Revert "GTP: add support for flow based tunneling API" Jonas Bonn
2021-01-24 16:34   ` Harald Welte
2021-01-23 19:59 ` [RFC PATCH 02/16] gtp: set initial MTU Jonas Bonn
2021-01-23 19:59 ` [RFC PATCH 03/16] gtp: include role in link info Jonas Bonn
2021-01-23 19:59 ` [RFC PATCH 04/16] gtp: really check namespaces before xmit Jonas Bonn
2021-01-23 19:59 ` [RFC PATCH 05/16] gtp: drop unnecessary call to skb_dst_drop Jonas Bonn
2021-01-24 16:48   ` Harald Welte
2021-01-23 19:59 ` [RFC PATCH 06/16] gtp: set device type Jonas Bonn
2021-01-23 19:59 ` [RFC PATCH 07/16] gtp: rework IPv4 functionality Jonas Bonn
2021-01-23 19:59 ` [RFC PATCH 08/16] gtp: set dev features to enable GSO Jonas Bonn
2021-01-23 19:59 ` [RFC PATCH 09/16] gtp: support GRO Jonas Bonn
2021-01-23 19:59 ` [RFC PATCH 10/16] gtp: refactor check_ms back into version specific handlers Jonas Bonn
2021-01-23 19:59 ` [RFC PATCH 11/16] gtp: drop duplicated assignment Jonas Bonn
2021-01-23 19:59 ` [RFC PATCH 12/16] gtp: update rx_length_errors for abnormally short packets Jonas Bonn
2021-01-24 16:50   ` Harald Welte
2021-01-23 19:59 ` [RFC PATCH 13/16] gtp: set skb protocol after pulling headers Jonas Bonn
2021-01-23 19:59 ` [RFC PATCH 14/16] gtp: add support for flow based tunneling Jonas Bonn
2021-01-24 14:27   ` Jonas Bonn
2021-01-24 15:11   ` Jonas Bonn
2021-01-25  8:12   ` Jonas Bonn
2021-01-25  8:47   ` Jonas Bonn
2021-02-06 18:04   ` Jonas Bonn
2021-02-07 17:56     ` Pravin Shelar
2021-01-23 19:59 ` [RFC PATCH 15/16] gtp: add ability to send GTP controls headers Jonas Bonn
2021-01-24 14:21   ` Jonas Bonn
2021-01-25 17:41     ` Harald Welte
2021-01-28 21:29       ` Pravin Shelar
2021-01-28 21:29     ` Pravin Shelar
     [not found]       ` <9b9476d2-186f-e749-f17d-d191c30347e4@norrbonn.se>
2021-01-30  6:59         ` Pravin Shelar
2021-01-30 18:44           ` Jakub Kicinski
2021-01-30 20:05             ` Pravin Shelar
2021-02-01 20:44               ` Jakub Kicinski
2021-02-02  5:24                 ` Jonas Bonn
2021-02-02  6:56                   ` Pravin Shelar [this message]
2021-02-02  8:03                     ` Jonas Bonn
2021-02-02 22:54                       ` Pravin Shelar
2021-01-23 19:59 ` [RFC PATCH 16/16] gtp: add netlink support for setting up flow based tunnels Jonas Bonn
2021-01-24 17:42 ` [RFC PATCH 00/16] GTP: flow based Pravin Shelar

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='CAOrHB_D101x6H3U1e0gUZZd5-VqmPMbaczPwJY1GA=6LXGafDw@mail.gmail.com' \
    --to=pravin.ovn@gmail.com \
    --cc=jonas@norrbonn.se \
    --cc=kuba@kernel.org \
    --cc=laforge@gnumonks.org \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=pbshelar@fb.com \
    /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.