netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Schultz <aschultz@tpip.net>
To: pablo <pablo@netfilter.org>
Cc: Jonas Bonn <jonas@southpole.se>, laforge <laforge@gnumonks.org>,
	netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH 1/1] gtp: support SGSN-side tunnels
Date: Mon, 13 Feb 2017 12:52:09 +0100 (CET)	[thread overview]
Message-ID: <1384904207.69904.1486986729381.JavaMail.zimbra@tpip.net> (raw)
In-Reply-To: <20170213111640.GA1458@salvia>

Hi,

----- On Feb 13, 2017, at 12:16 PM, pablo pablo@netfilter.org wrote:

> On Mon, Feb 13, 2017 at 10:25:19AM +0100, Andreas Schultz wrote:
>> Hi,
>> 
>> I'm a bit late to comment, but maybe you can consider an additional
>> change for v2...
>> 
>> ----- On Feb 3, 2017, at 10:12 AM, Jonas Bonn jonas@southpole.se wrote:
>> 
>> > The GTP-tunnel driver is explicitly GGSN-side as it searches for PDP
>> > contexts based on the incoming packets _destination_ address.  If we
>> > want to write an SGSN, then we want to be idenityfing PDP contexts
>> > based on _source_ address.
>> > 
>> > This patch adds a "flags" argument at GTP-link creation time to specify
>> > whether we are on the GGSN or SGSN side of the tunnel; this flag is then
>> > used to determine which part of the IP packet to use in determining
>> > the PDP context.
>> > 
>> > Signed-off-by: Jonas Bonn <jonas@southpole.se>
>> > ---
>> > 
>> > drivers/net/gtp.c            | 43 ++++++++++++++++++++++++++++++++-----------
>> > include/uapi/linux/gtp.h     |  2 +-
>> > include/uapi/linux/if_link.h |  5 +++++
>> > 3 files changed, 38 insertions(+), 12 deletions(-)
>> > 
>> > diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
>> > index 50349a9..1bbac69 100644
>> > --- a/drivers/net/gtp.c
>> > +++ b/drivers/net/gtp.c
>> > @@ -72,6 +72,7 @@ struct gtp_dev {
>> > 	struct net		*net;
>> > 	struct net_device	*dev;
>> > 
>> > +	unsigned int		flags;
>> 
>> This should IMHO not go into the gtp_dev, the right place
>> is the PDP context.
> 
> So you want to allow mixed configurations where some PDP ctx may be in
> SGSN mode while others in GGSN.
> 
> This doesn't make any sense to me. On top of this, don't forget this
> is just for testing, so I don't see any valid usecase for such a fine
> grain thing.

You are right, running such a configuration does not make sense.
However, when I wrote this the PDP context looked like the most
sensible palace to me.

Anyhow, thinking about this again, I think that integrating that flag
in a rewrite of the validation logic in the Rx path make more sense.
Currently we validate the MS as soon as we have found the PDP context.
This should be delayed a bit and the validation should happen after
pulling the GTP header and right before injecting the payload into
the net device. The flag would then indeed go into the gtp_dev.

Andreas

  reply	other threads:[~2017-02-13 11:52 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-03  9:12 [PATCH 1/1] gtp: support SGSN-side tunnels Jonas Bonn
2017-02-06 11:08 ` Pablo Neira Ayuso
2017-02-06 13:33   ` Jonas Bonn
2017-02-06 14:16     ` Harald Welte
2017-02-06 18:15       ` Pablo Neira Ayuso
2017-02-06 17:27     ` Andreas Schultz
2017-02-06 17:56     ` Pablo Neira Ayuso
2017-02-06 17:25   ` Andreas Schultz
2017-02-06 13:44 ` Harald Welte
2017-02-13  9:25 ` Andreas Schultz
2017-02-13 11:16   ` Pablo Neira Ayuso
2017-02-13 11:52     ` Andreas Schultz [this message]
2017-02-13 14:23       ` Harald Welte
2017-03-15 16:39 ` Harald Welte
2017-03-15 17:23   ` Pablo Neira Ayuso
2017-03-15 19:10     ` Harald Welte
2017-03-15 19:27       ` Harald Welte
2017-03-15 21:42       ` Pablo Neira Ayuso
2017-03-21 15:11   ` Jonas Bonn
2017-03-21 15:04 ` [PATCH v2 1/2] gtp: rename SGSN netlink attribute Jonas Bonn
2017-03-21 15:04   ` [PATCH v2 2/2] gtp: support SGSN-side tunnels Jonas Bonn
2017-03-21 15:07   ` [PATCH v2 1/2] gtp: rename SGSN netlink attribute Pablo Neira Ayuso
2017-03-21 15:10     ` Jonas Bonn
2017-03-21 15:15       ` Pablo Neira Ayuso
2017-03-23 21:16   ` David Miller
2017-03-23 21:28     ` Pablo Neira Ayuso

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=1384904207.69904.1486986729381.JavaMail.zimbra@tpip.net \
    --to=aschultz@tpip.net \
    --cc=jonas@southpole.se \
    --cc=laforge@gnumonks.org \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.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;
as well as URLs for NNTP newsgroup(s).