From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Andreas Schultz <aschultz@tpip.net>
Cc: Harald Welte <laforge@gnumonks.org>,
osmocom-net-gprs@lists.osmocom.org,
netdev <netdev@vger.kernel.org>,
Lionel Gauthier <Lionel.Gauthier@eurecom.fr>
Subject: Re: [PATCH net-next 2/4] gtp: add genl cmd to enable GTP encapsulation on UDP socket
Date: Tue, 14 Mar 2017 12:43:30 +0100 [thread overview]
Message-ID: <20170314114330.GB2992@salvia> (raw)
In-Reply-To: <20170314112548.24027-3-aschultz@tpip.net>
On Tue, Mar 14, 2017 at 12:25:46PM +0100, Andreas Schultz wrote:
> @@ -1254,6 +1293,8 @@ static struct nla_policy gtp_genl_policy[GTPA_MAX + 1] = {
> [GTPA_NET_NS_FD] = { .type = NLA_U32, },
> [GTPA_I_TEI] = { .type = NLA_U32, },
> [GTPA_O_TEI] = { .type = NLA_U32, },
> + [GTPA_PDP_HASHSIZE] = { .type = NLA_U32, },
This per PDP hashsize attribute clearly doesn't belong here.
Moreover, we now have a rhashtable implementation, so we hopefully we
can get rid of this. It should be very easy to convert this to use
rhashtable, and it is very much desiderable.
> + [GTPA_FD] = { .type = NLA_U32, },
This new atttribute has nothing to do with the PDP context.
And enum gtp_attrs *only* describe a PDP context. Adding more
attributes there to mix semantics is not the way to go.
You likely have to inaugurate a new enum. This gtp_attrs enum only
related to the PDP description.
Why not add some interface to attach more sockets to the gtp device
globally? So still the gtp device is the top-level structure. Then add
a netlink attribute to specify to what VRF this tunnel belongs to,
instead of implicitly using the socket to achieve this.
Another possibility is to explicitly have an interface to add
new/delete VRFs, attach sockets to them.
In general, I'm still not convinced this is the right design for this.
next prev parent reply other threads:[~2017-03-14 11:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-14 11:25 [PATCH net-next 0/4] gtp: support multiple APN's per GTP endpoint Andreas Schultz
2017-03-14 11:25 ` [PATCH net-next 1/4] gtp: move TEID hash to per socket structure Andreas Schultz
2017-03-14 11:33 ` Pablo Neira Ayuso
2017-03-14 12:32 ` Andreas Schultz
2017-03-14 11:25 ` [PATCH net-next 2/4] gtp: add genl cmd to enable GTP encapsulation on UDP socket Andreas Schultz
2017-03-14 11:43 ` Pablo Neira Ayuso [this message]
2017-03-14 12:28 ` Andreas Schultz
2017-03-14 13:39 ` Pablo Neira Ayuso
2017-03-14 11:25 ` [PATCH net-next 3/4] gtp: add support to select a GTP socket during PDP context creation Andreas Schultz
2017-03-14 11:25 ` [PATCH net-next 4/4] Extend Kernel GTP-U tunneling documentation Andreas Schultz
2017-03-14 11:45 ` [PATCH net-next 0/4] gtp: support multiple APN's per GTP endpoint Pablo Neira Ayuso
2017-03-14 12:42 ` Andreas Schultz
2017-03-14 13:42 ` Pablo Neira Ayuso
2017-03-14 13:52 ` Harald Welte
2017-03-14 18:32 ` David Miller
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=20170314114330.GB2992@salvia \
--to=pablo@netfilter.org \
--cc=Lionel.Gauthier@eurecom.fr \
--cc=aschultz@tpip.net \
--cc=laforge@gnumonks.org \
--cc=netdev@vger.kernel.org \
--cc=osmocom-net-gprs@lists.osmocom.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).