Re: [PATCH net-next 09/14] gtp: Allow configuring GTP interface as standalone

2017-09-20 Thread Andreas Schultz
On 20/09/17 17:57, Tom Herbert wrote: On Wed, Sep 20, 2017 at 8:27 AM, Andreas Schultz wrote: On 19/09/17 02:38, Tom Herbert wrote: Add new configuration of GTP interfaces that allow specifying a port to listen on (as opposed to having to get sockets from a userspace control plane). This

Re: [PATCH net-next 03/14] gtp: Call common functions to get tunnel routes and add dst_cache

2017-09-20 Thread Andreas Schultz
On 19/09/17 14:09, Harald Welte wrote: Hi Dave, On Mon, Sep 18, 2017 at 09:17:51PM -0700, David Miller wrote: This and the new dst caching code ignores any source address selection done by ip_route_output_key() or the new tunnel route lookup helpers. Either source address selection should be

Re: [PATCH net-next 09/14] gtp: Allow configuring GTP interface as standalone

2017-09-20 Thread Andreas Schultz
On 19/09/17 02:38, Tom Herbert wrote: Add new configuration of GTP interfaces that allow specifying a port to listen on (as opposed to having to get sockets from a userspace control plane). This allows GTP interfaces to be configured and the data path tested without requiring a GTP-C daemon. Th

Re: [PATCH net-next 00/14] gtp: Additional feature support

2017-09-20 Thread Andreas Schultz
Hi Harald, On 20/09/17 01:19, Harald Welte wrote: Hi Tom, On Tue, Sep 19, 2017 at 08:59:28AM -0700, Tom Herbert wrote: On Tue, Sep 19, 2017 at 5:43 AM, Harald Welte wrote: On Mon, Sep 18, 2017 at 05:38:50PM -0700, Tom Herbert wrote: - IPv6 support see my detailed comments in other mail

Re: [PATCH net-next v1 1/3] gtp: refactor to support flow-based gtp encap and decap

2017-07-31 Thread Andreas Schultz
Hi Jiannan, - On Jul 13, 2017, at 2:44 AM, Jiannan Ouyang ouya...@fb.com wrote: [...] > -static int gtp_rx(struct pdp_ctx *pctx, struct sk_buff *skb, > - unsigned int hdrlen, unsigned int role) > +static int gtp_rx(struct gtp_dev *gtp, struct sk_buff *skb, > +

Re: [PATCH net-next 0/4] gtp: support multiple APN's per GTP endpoint

2017-03-14 Thread Andreas Schultz
- On Mar 14, 2017, at 12:45 PM, pablo pa...@netfilter.org wrote: > On Tue, Mar 14, 2017 at 12:25:44PM +0100, Andreas Schultz wrote: > [...] >> API impact: >> --- >> >> This is probably the most problematic part of this series... >> >> T

Re: [PATCH net-next 1/4] gtp: move TEID hash to per socket structure

2017-03-14 Thread Andreas Schultz
- On Mar 14, 2017, at 12:33 PM, pablo pa...@netfilter.org wrote: > On Tue, Mar 14, 2017 at 12:25:45PM +0100, Andreas Schultz wrote: >> @@ -275,9 +280,9 @@ static int gtp1u_udp_encap_recv(struct gtp_dev *gtp, >> struct >> sk_buff *skb) >> >> gtp1 =

Re: [PATCH net-next 2/4] gtp: add genl cmd to enable GTP encapsulation on UDP socket

2017-03-14 Thread Andreas Schultz
- On Mar 14, 2017, at 12:43 PM, pablo pa...@netfilter.org wrote: > 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]

[PATCH net-next 3/4] gtp: add support to select a GTP socket during PDP context creation

2017-03-14 Thread Andreas Schultz
encapsulation on it's sockets. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 79 +++ 1 file changed, 68 insertions(+), 11 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index c4cf1b9..afa043d 100644 --- a/drivers/net/

[PATCH net-next 1/4] gtp: move TEID hash to per socket structure

2017-03-14 Thread Andreas Schultz
interface has ensured that all information that is mandatory after this change is guranteed to be present. The only project that doesn't use libgtpnl (OpenAir-CN) is also populating all of those values. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c

[PATCH net-next 2/4] gtp: add genl cmd to enable GTP encapsulation on UDP socket

2017-03-14 Thread Andreas Schultz
Signed-off-by: Andreas Schultz --- drivers/net/gtp.c| 47 +++ include/uapi/linux/gtp.h | 4 2 files changed, 51 insertions(+) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index 66616f7..c4cf1b9 100644 --- a/drivers/net/gtp.c +++ b

[PATCH net-next 4/4] Extend Kernel GTP-U tunneling documentation

2017-03-14 Thread Andreas Schultz
* clarify specification references for v0/v1 * add section "APN vs. Network device" * add section "Local GTP-U entity and tunnel identification" Signed-off-by: Andreas Schultz Signed-off-by: Harald Welte --- Documentation/networking/gtp.txt | 103 +++

[PATCH net-next 0/4] gtp: support multiple APN's per GTP endpoint

2017-03-14 Thread Andreas Schultz
ace has ensured that all information that is mandatory after this change is guaranteed to be present. The only project that doesn't use libgtpnl (OpenAir-CN) is also populating all of those values. The API change will therefore not break any existing userspace applications. -- Andreas Sc

Re: [PATCH net-next v5 0/7] gtp: misc improvements

2017-03-13 Thread Andreas Schultz
Hi Pablo, - On Mar 13, 2017, at 5:48 PM, pablo pa...@netfilter.org wrote: > On Thu, Mar 09, 2017 at 05:42:55PM +0100, Andreas Schultz wrote: >> Hi Pablo, >> >> This is a resent of last series that missed the merge window. There >> are no changes compared to v4. &

[PATCH net-next v5 4/7] gtp: consolidate gtp socket rx path

2017-03-09 Thread Andreas Schultz
Add network device to gtp context in preparation for splitting the TEID from the network device. Use this to rework the socker rx path. Move the common RX part of v0 and v1 into a helper. Also move the final rx part into that helper as well. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c

[PATCH net-next v5 2/7] gtp: make GTP sockets in gtp_newlink optional

2017-03-09 Thread Andreas Schultz
network device. Till then, at least one of the sockets needs to be specified (either v0 or v1), the other is optional. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 148 -- 1 file changed, 78 insertions(+), 70 deletions(-) diff --git a

[PATCH net-next v5 5/7] gtp: unify genl_find_pdp and prepare for per socket lookup

2017-03-09 Thread Andreas Schultz
This unifies duplicate code into a helper. It also prepares the groundwork to add a lookup version that uses the socket to find attached pdp contexts. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 121 ++ 1 file changed, 50 insertions

[PATCH net-next v5 7/7] gtp: add socket to pdp context

2017-03-09 Thread Andreas Schultz
Having the socket present in context simplifies the sending logic. It also fixes the invalid assumption that we have to use the same sending socket for all client IP's on a specific gtp interface. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c

[PATCH net-next v5 1/7] gtp: switch from struct socket to struct sock for the GTP sockets

2017-03-09 Thread Andreas Schultz
-off-by: Andreas Schultz --- drivers/net/gtp.c | 42 +++--- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index 8969874..e1b5af3 100644 --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c @@ -66,8 +66,8

[PATCH net-next v5 6/7] gtp: consolidate pdp context destruction into helper

2017-03-09 Thread Andreas Schultz
Consolidate duplicate code into helper. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index bf4b352..d58f46f 100644 --- a/drivers/net/gtp.c +++ b/drivers

[PATCH net-next v5 0/7] gtp: misc improvements

2017-03-09 Thread Andreas Schultz
plain the goal of all these changes * incorporate review comments * switch from struct socket to struct sock Regards Andreas -- Andreas Schultz (7): gtp: switch from struct socket to struct sock for the GTP sockets gtp: make GTP sockets in gtp_newlink optional gtp: merge gtp_get_net and gtp

[PATCH net-next v5 3/7] gtp: merge gtp_get_net and gtp_genl_find_dev

2017-03-09 Thread Andreas Schultz
completely eliminated Once the TEID hash is moved into the GTP socket. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 146 ++ 1 file changed, 69 insertions(+), 77 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index

Re: [PATCH net-next] net/gtp: Add udp source port generation according to flow hash

2017-02-23 Thread Andreas Schultz
- On Feb 23, 2017, at 5:42 PM, pablo pa...@netfilter.org wrote: > On Thu, Feb 23, 2017 at 03:21:13PM +0100, Andreas Schultz wrote: >> - On Feb 23, 2017, at 2:49 PM, pablo pa...@netfilter.org wrote: > [...] >> > According to specs, section 4.4.2.3 Encapsul

Re: [PATCH net-next] net/gtp: Add udp source port generation according to flow hash

2017-02-23 Thread Andreas Schultz
- On Feb 23, 2017, at 2:49 PM, pablo pa...@netfilter.org wrote: > On Wed, Feb 22, 2017 at 01:47:17PM -0800, Tom Herbert wrote: >> On Wed, Feb 22, 2017 at 1:29 PM, Or Gerlitz wrote: >> > On Thu, Feb 16, 2017 at 11:58 PM, Andreas Schultz >> > wrote: >> >

Re: [PATCH net-next] net/gtp: Add udp source port generation according to flow hash

2017-02-23 Thread Andreas Schultz
Hi Tom, - On Feb 22, 2017, at 10:47 PM, Tom Herbert t...@herbertland.com wrote: > On Wed, Feb 22, 2017 at 1:29 PM, Or Gerlitz wrote: >> On Thu, Feb 16, 2017 at 11:58 PM, Andreas Schultz wrote: >>> Hi Or, >>> - On Feb 16, 2017, at 3:59 PM, Or Gerlitz

Re: [PATCH net-next v4 4/7] gtp: consolidate gtp socket rx path

2017-02-23 Thread Andreas Schultz
Hi Tom, - On Feb 22, 2017, at 6:41 PM, Tom Herbert t...@herbertland.com wrote: > On Tue, Feb 21, 2017 at 2:18 AM, Andreas Schultz wrote: >> Add network device to gtp context in preparation for splitting >> the TEID from the network device. >> >> Use this to rewo

Re: [PATCH net-next v3 1/8] gtp: add documentation

2017-02-22 Thread Andreas Schultz
Hi Harald, - On Feb 22, 2017, at 9:36 AM, laforge lafo...@gnumonks.org wrote: > Hi Andreas, > > thanks for your feedback. > > On Mon, Feb 20, 2017 at 06:28:07PM +0100, Andreas Schultz wrote: >> > Are you absolutely sure about this? >> >> Yes. It took

Re: [PATCH net-next v4 0/7] gtp: misc improvements

2017-02-21 Thread Andreas Schultz
Hi, In case anyone want's to have a look at the changes that I'm working on for follow up series can find them at: https://github.com/RoadRunnr/net-next/tree/gtp Regards Andreas - On Feb 21, 2017, at 11:18 AM, Andreas Schultz aschu...@tpip.net wrote: > Hi Pablo, > >

[PATCH net-next v4 2/7] gtp: make GTP sockets in gtp_newlink optional

2017-02-21 Thread Andreas Schultz
network device. Till then, at least one of the sockets needs to be specified (either v0 or v1), the other is optional. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 148 -- 1 file changed, 78 insertions(+), 70 deletions(-) diff --git a

[PATCH net-next v4 3/7] gtp: merge gtp_get_net and gtp_genl_find_dev

2017-02-21 Thread Andreas Schultz
completely eliminated Once the TEID hash is moved into the GTP socket. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 146 ++ 1 file changed, 69 insertions(+), 77 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index

[PATCH net-next v4 7/7] gtp: add socket to pdp context

2017-02-21 Thread Andreas Schultz
Having the socket present in context simplifies the sending logic. It also fixes the invalid assumption that we have to use the same sending socket for all client IP's on a specific gtp interface. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c

[PATCH net-next v4 6/7] gtp: consolidate pdp context destruction into helper

2017-02-21 Thread Andreas Schultz
Consolidate duplicate code into helper. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index f529d1e..b6aae68 100644 --- a/drivers/net/gtp.c +++ b/drivers

[PATCH net-next v4 5/7] gtp: unify genl_find_pdp and prepare for per socket lookup

2017-02-21 Thread Andreas Schultz
This unifies duplicate code into a helper. It also prepares the groundwork to add a lookup version that uses the socket to find attached pdp contexts. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 121 ++ 1 file changed, 50 insertions

[PATCH net-next v4 0/7] gtp: misc improvements

2017-02-21 Thread Andreas Schultz
ck Regards Andreas -- Andreas Schultz (7): gtp: switch from struct socket to struct sock for the GTP sockets gtp: make GTP sockets in gtp_newlink optional gtp: merge gtp_get_net and gtp_genl_find_dev gtp: consolidate gtp socket rx path gtp: unify genl_find_pdp and prepare for per socket l

[PATCH net-next v4 1/7] gtp: switch from struct socket to struct sock for the GTP sockets

2017-02-21 Thread Andreas Schultz
-off-by: Andreas Schultz --- drivers/net/gtp.c | 42 +++--- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index bda0c64..a8ce8c7 100644 --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c @@ -66,8 +66,8

[PATCH net-next v4 4/7] gtp: consolidate gtp socket rx path

2017-02-21 Thread Andreas Schultz
Add network device to gtp context in preparation for splitting the TEID from the network device. Use this to rework the socker rx path. Move the common RX part of v0 and v1 into a helper. Also move the final rx part into that helper as well. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c

Re: [PATCH net-next v3 1/8] gtp: add documentation

2017-02-20 Thread Andreas Schultz
Hi, - On Feb 20, 2017, at 5:15 PM, laforge lafo...@gnumonks.org wrote: > Hi Andreas, > > this is not really about the documentation, but it still makes sense to > discuss here as the issue is best described: > > On Mon, Feb 13, 2017 at 04:36:17PM +0100, Andreas Schultz wr

Re: [PATCH net-next] GTP: Add some basic documentation about drivers/net/gtp.c

2017-02-19 Thread Andreas Schultz
Harald Welte Acked-by: Andreas Schultz > --- > Documentation/networking/gtp.txt | 135 +++ > 1 file changed, 135 insertions(+) > create mode 100644 Documentation/networking/gtp.txt > > diff --git a/Documentation/networking/gtp.txt > b/Do

Re: RFC: unit tests for kernel GTP module

2017-02-17 Thread Andreas Schultz
Hi, - On Feb 16, 2017, at 11:08 PM, laforge lafo...@gnumonks.org wrote: > Dear GTP-interested folks, > > I would love to somehow get towards some degree of unit testing (or even > "continuous integration") for teh kernel GTP code. > > We currently have the original code in the kernel, we ha

Re: [PATCH net-next] net/gtp: Add udp source port generation according to flow hash

2017-02-16 Thread Andreas Schultz
Hi Or, - On Feb 16, 2017, at 3:59 PM, Or Gerlitz ogerl...@mellanox.com wrote: > Generate the source udp header according to the flow represented by > the packet we are encapsulating, as done for other udp tunnels. This > helps on the receiver side to apply RSS spreading. This might work for

Re: [PATCH net-next v3 0/8] gtp: misc improvements

2017-02-16 Thread Andreas Schultz
Hi Pablo, Harald, Do you have some time to look at the patches? Andreas - On Feb 13, 2017, at 4:36 PM, Andreas Schultz aschu...@tpip.net wrote: > Hi Pablo, > > This is v3 of the GTP improvements. > > This series lays the groundwork for removing the socket references

Re: [PATCH net-next v3 2/8] gtp: switch from struct socket to struct sock for the GTP sockets

2017-02-14 Thread Andreas Schultz
- On Feb 14, 2017, at 6:48 PM, David S. Miller da...@davemloft.net wrote: > From: Andreas Schultz > Date: Mon, 13 Feb 2017 16:36:18 +0100 > >> +if (gtp->sk0) { >> +udp_sk(gtp->sk0)->encap_type = 0; >> +rc

[PATCH net-next v3 8/8] gtp: add socket to pdp context

2017-02-13 Thread Andreas Schultz
Having the socket present in context simplifies the sending logic. It also fixes the invalid assumption that we have to use the same sending socket for all client IP's on a specific gtp interface. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c

[PATCH net-next v3 7/8] gtp: consolidate pdp context destruction into helper

2017-02-13 Thread Andreas Schultz
Consolidate duplicate code into helper. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index d3c384e..62f598b 100644 --- a/drivers/net/gtp.c +++ b/drivers

[PATCH net-next v3 5/8] gtp: consolidate gtp socket rx path

2017-02-13 Thread Andreas Schultz
Add network device to gtp context in preparation for splitting the TEID from the network device. Use this to rework the socker rx path. Move the common RX part of v0 and v1 into a helper. Also move the final rx part into that helper as well. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c

[PATCH net-next v3 0/8] gtp: misc improvements

2017-02-13 Thread Andreas Schultz
uct sock Regards Andreas -- Andreas Schultz (8): gtp: add documentation gtp: switch from struct socket to struct sock for the GTP sockets gtp: make GTP sockets in gtp_newlink optional gtp: merge gtp_get_net and gtp_genl_find_dev gtp: consolidate gtp socket rx path gtp: unify genl_find

[PATCH net-next v3 2/8] gtp: switch from struct socket to struct sock for the GTP sockets

2017-02-13 Thread Andreas Schultz
-off-by: Andreas Schultz --- drivers/net/gtp.c | 42 +++--- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index bda0c64..a8ce8c7 100644 --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c @@ -66,8 +66,8

[PATCH net-next v3 6/8] gtp: unify genl_find_pdp and prepare for per socket lookup

2017-02-13 Thread Andreas Schultz
This unifies duplicate code into a helper. It also prepares the groundwork to add a lookup version that uses the socket to find attache pdp contexts. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 124 +++--- 1 file changed, 53 insertions

[PATCH net-next v3 3/8] gtp: make GTP sockets in gtp_newlink optional

2017-02-13 Thread Andreas Schultz
network device. Till then, at least one of the sockets needs to be specified (either v0 or v1), the other is optional. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 149 +- 1 file changed, 79 insertions(+), 70 deletions(-) diff --git a

[PATCH net-next v3 4/8] gtp: merge gtp_get_net and gtp_genl_find_dev

2017-02-13 Thread Andreas Schultz
completely eliminated Once the TEID hash is moved into the GTP socket. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 147 ++ 1 file changed, 70 insertions(+), 77 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index

[PATCH net-next v3 1/8] gtp: add documentation

2017-02-13 Thread Andreas Schultz
The GTP-U implementation in not only driven by 3GPP TS 29.281, but also by the requirements of the 3GPP network entities that use it. This document tries to explain and clarify some design decision and their origins. Signed-off-by: Andreas Schultz --- Documentation/networking/gtp.txt | 112

Re: [PATCH net-next v2 4/6] gtp: consolidate pdp context destruction into helper

2017-02-13 Thread Andreas Schultz
- On Feb 6, 2017, at 2:58 PM, laforge lafo...@gnumonks.org wrote: > Hi Andreas, > > On Mon, Jan 30, 2017 at 05:37:11PM +0100, Andreas Schultz wrote: >> Consolidate duplicate code into helper. > > Makes complete sense. > > However: > >> +static vo

Re: [PATCH net-next v2 2/6] gtp: merge gtp_get_net and gtp_genl_find_dev

2017-02-13 Thread Andreas Schultz
- On Feb 6, 2017, at 2:55 PM, Harald Welte lafo...@netfilter.org wrote: > Hi Andreas, > > On Mon, Jan 30, 2017 at 05:37:09PM +0100, Andreas Schultz wrote: >> Both function are always used together with the final goal to >> get the gtp_dev. This simplifies the code by

Re: [PATCH 1/1] gtp: support SGSN-side tunnels

2017-02-13 Thread Andreas Schultz
Hi, - On Feb 13, 2017, at 12:16 PM, pablo pa...@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... >> >> -

Re: [PATCH 1/1] gtp: support SGSN-side tunnels

2017-02-13 Thread Andreas Schultz
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 jo...@southpole.se wrote: > The GTP-tunnel driver is explicitly GGSN-side as it searches for PDP > contexts based on the incoming packets _destination_ address.

Re: [PATCH 1/1] gtp: support SGSN-side tunnels

2017-02-06 Thread Andreas Schultz
Hi Jonas, Sorry, for later reply, I'm currently on vacation with almost no internet access. - On Feb 6, 2017, at 2:33 PM, Jonas Bonn jo...@southpole.se wrote: > Hi Pablo, > > On 02/06/2017 12:08 PM, Pablo Neira Ayuso wrote: >> Hi Jonas, >> >> On Fri, Feb 03, 2017 at 10:12:31AM +0100, Jonas

Re: [PATCH 1/1] gtp: support SGSN-side tunnels

2017-02-06 Thread Andreas Schultz
- On Feb 6, 2017, at 12:08 PM, pablo pa...@netfilter.org wrote: > Hi Jonas, > > On Fri, Feb 03, 2017 at 10:12:31AM +0100, Jonas Bonn 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 t

Re: [PATCH net-next v2 5/6] gtp: add socket to pdp context

2017-02-02 Thread Andreas Schultz
- On Feb 2, 2017, at 3:46 PM, pablo pa...@netfilter.org wrote: > On Thu, Feb 02, 2017 at 03:38:07PM +0100, Andreas Schultz wrote: >> >> >> - On Feb 2, 2017, at 3:28 PM, pablo pa...@netfilter.org wrote: >> >> > On Thu, Feb 02, 2017 at 03:12:55PM +0

Re: [PATCH net-next v2 5/6] gtp: add socket to pdp context

2017-02-02 Thread Andreas Schultz
- On Feb 2, 2017, at 3:28 PM, pablo pa...@netfilter.org wrote: > On Thu, Feb 02, 2017 at 03:12:55PM +0100, Andreas Schultz wrote: >> Hi, >> >> - On Feb 2, 2017, at 2:56 PM, pablo pa...@netfilter.org wrote: >> >> > On Mon, Jan 30, 2017 at 05:

Re: [PATCH net-next v2 1/6] gtp: make GTP sockets in gtp_newlink optional

2017-02-02 Thread Andreas Schultz
- On Feb 2, 2017, at 3:10 PM, pablo pa...@netfilter.org wrote: > On Mon, Jan 30, 2017 at 05:37:08PM +0100, Andreas Schultz wrote: >> Having both GTPv0-U and GTPv1-U is not always desirable. >> Fallback from GTPv1-U to GTPv0-U was depreciated from 3GPP >> Rel-

Re: [PATCH net-next v2 3/6] gtp: unify genl_find_pdp and prepare for per socket lookup

2017-02-02 Thread Andreas Schultz
- On Feb 2, 2017, at 3:19 PM, pablo pa...@netfilter.org wrote: > On Mon, Jan 30, 2017 at 05:37:10PM +0100, Andreas Schultz wrote: >> This unifies duplicate code into a helper. It also prepares the >> groundwork to add a lookup version that uses the socket to find >>

Re: [PATCH net-next v2 5/6] gtp: add socket to pdp context

2017-02-02 Thread Andreas Schultz
Hi, - On Feb 2, 2017, at 2:56 PM, pablo pa...@netfilter.org wrote: > On Mon, Jan 30, 2017 at 05:37:12PM +0100, Andreas Schultz wrote: >> Having the socket present in context simplifies the sending logic. >> It also fixes the invalid assumption that we have to use the same &g

[PATCH 3/6] gtp: unify genl_find_pdp and prepare for per socket lookup

2017-01-30 Thread Andreas Schultz
This unifies duplicate code into a helper. It also prepares the groundwork to add a lookup version that uses the socket to find attache pdp contexts. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 120 +++--- 1 file changed, 51 insertions

[PATCH 0/6] gtp: misc improvements

2017-01-30 Thread Andreas Schultz
removal of the socket references will break the 1:1 releation between GTP netdevice and GTP socket that prevents us to support multiple VRFs with overlaping IP addresse spaces attached to the same GTP socket (needed for multi APN support). Regards Andreas -- Andreas Schultz (6): gtp: make GTP

[PATCH 2/6] gtp: merge gtp_get_net and gtp_genl_find_dev

2017-01-30 Thread Andreas Schultz
completely eliminated Once the TEID hash is moved into the GTP socket. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 170 ++ 1 file changed, 81 insertions(+), 89 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index

[PATCH 1/6] gtp: make GTP sockets in gtp_newlink optional

2017-01-30 Thread Andreas Schultz
network device. Till then, at least one of the sockets needs to be specified (either v0 or v1), the other is optional. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 142 +- 1 file changed, 76 insertions(+), 66 deletions(-) diff --git a

[PATCH 4/6] gtp: consolidate pdp context destruction into helper

2017-01-30 Thread Andreas Schultz
Consolidate duplicate code into helper. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index 6b7a3c2..68c6c9b 100644 --- a/drivers/net/gtp.c +++ b/drivers

[PATCH net-next v2 1/6] gtp: make GTP sockets in gtp_newlink optional

2017-01-30 Thread Andreas Schultz
network device. Till then, at least one of the sockets needs to be specified (either v0 or v1), the other is optional. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 142 +- 1 file changed, 76 insertions(+), 66 deletions(-) diff --git a

[PATCH net-next v2 4/6] gtp: consolidate pdp context destruction into helper

2017-01-30 Thread Andreas Schultz
Consolidate duplicate code into helper. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index 6b7a3c2..68c6c9b 100644 --- a/drivers/net/gtp.c +++ b/drivers

[PATCH net-next v2 6/6] gtp: consolidate gtp socket rx path

2017-01-30 Thread Andreas Schultz
Add network device to gtp context in preparation for splitting the TEID from the network device. Use this to rework the socker rx path. Move the common RX part of v0 and v1 into a helper. Also move the final rx part into that helper as well. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c

[PATCH net-next v2 3/6] gtp: unify genl_find_pdp and prepare for per socket lookup

2017-01-30 Thread Andreas Schultz
This unifies duplicate code into a helper. It also prepares the groundwork to add a lookup version that uses the socket to find attache pdp contexts. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 120 +++--- 1 file changed, 51 insertions

[PATCH net-next v2 5/6] gtp: add socket to pdp context

2017-01-30 Thread Andreas Schultz
Having the socket present in context simplifies the sending logic. It also fixes the invalid assumption that we have to use the same sending socket for all client IP's on a specific gtp interface. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c

[PATCH net-next v2 0/6] gtp: misc improvements

2017-01-30 Thread Andreas Schultz
same GTP socket (needed for multi APN support). Regards Andreas Andreas Schultz (6): gtp: make GTP sockets in gtp_newlink optional gtp: merge gtp_get_net and gtp_genl_find_dev gtp: unify genl_find_pdp and prepare for per socket lookup gtp: consolidate pdp context destruction into helper

[PATCH net-next v2 2/6] gtp: merge gtp_get_net and gtp_genl_find_dev

2017-01-30 Thread Andreas Schultz
completely eliminated Once the TEID hash is moved into the GTP socket. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 170 ++ 1 file changed, 81 insertions(+), 89 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index

[PATCH 6/6] gtp: consolidate gtp socket rx path

2017-01-30 Thread Andreas Schultz
Add network device to gtp context in preparation for splitting the TEID from the network device. Use this to rework the socker rx path. Move the common RX part of v0 and v1 into a helper. Also move the final rx part into that helper as well. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c

[PATCH 5/6] gtp: add socket to pdp context

2017-01-30 Thread Andreas Schultz
Having the socket present in context simplifies the sending logic. It also fixes the invalid assumption that we have to use the same sending socket for all client IP's on a specific gtp interface. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c

[PATCH net v3 3/3] gtp: fix cross netns recv on gtp socket

2017-01-27 Thread Andreas Schultz
The use of the passed through netlink src_net to check for a cross netns operation was wrong. Using the GTP socket and the GTP netdevice is always correct (even if the netdev has been moved to new netns after link creation). Remove the now obsolete net field from gtp_dev. Signed-off-by: Andreas

[PATCH net v3 0/3] various gtp fixes

2017-01-27 Thread Andreas Schultz
as fixes genl family autoloading, clearing the DF bit fixes a protocol violation in regard to the specification and the netns comparison fixes a corner case of cross netns recv. Andreas v2->v3: fix compiler error introduced in rebase -- Andreas Schultz (3): gtp: add genl family modules alias

[PATCH net v3 2/3] gtp: clear DF bit on GTP packet tx

2017-01-27 Thread Andreas Schultz
3GPP TS 29.281 and 3GPP TS 29.060 imply that GTP-U packets should be sent with the DF bit cleared. For example 3GPP TS 29.060, Release 8, Section 13.2.2: > Backbone router: Any router in the backbone may fragment the GTP > packet if needed, according to IPv4. Signed-off-by: Andreas S

[PATCH net v3 1/3] gtp: add genl family modules alias

2017-01-27 Thread Andreas Schultz
Auto-load the module when userspace asks for the gtp netlink family. Signed-off-by: Andreas Schultz Acked-by: Harald Welte Acked-by: Pablo Neira Ayuso --- drivers/net/gtp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index 8b6810b..7580ccc 100644

[PATCH net-next v2 1/2] gtp: remove unnecessary rcu_read_lock

2017-01-26 Thread Andreas Schultz
The rcu read lock is hold by default in the ip input path. There is no need to hold it twice in the socket recv decapsulate code path. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 24 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/drivers/net

[PATCH net-next v2 2/2] gtp: let userspace handle packets for invalid tunnels

2017-01-26 Thread Andreas Schultz
enable userspace to send error replies for invalid tunnels Acked-by: Harald Welte Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index 5c63a37..5dd7de6 100644 --- a/drivers

[PATCH net-next v2 0/2] gtp: simple gtp improvements

2017-01-26 Thread Andreas Schultz
This is the part of the previous "simple gtp improvements" series that Pablo indicated should go into net-next. The rcu_lock removal is small correctness changes. Passing invalid to user space allows for more standards compliant handling of invalid tunnels. -- Andreas Schultz (2): g

[PATCH net v2 1/3] gtp: add genl family modules alias

2017-01-26 Thread Andreas Schultz
Auto-load the module when userspace asks for the gtp netlink family. Acked-by: Harald Welte Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index 8b6810b..7580ccc 100644 --- a/drivers/net/gtp.c +++ b

[PATCH net v2 2/3] gtp: clear DF bit on GTP packet tx

2017-01-26 Thread Andreas Schultz
ed-off-by: Andreas Schultz --- drivers/net/gtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index 7580ccc..1df54d6 100644 --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c @@ -612,7 +612,7 @@ static netdev_tx_t gtp_dev_xmit(struct sk_buf

[PATCH net v2 0/3] various gtp fixes

2017-01-26 Thread Andreas Schultz
er case of cross netns recv. I'm not sure if Pablos comments on the previous version qualify as ACK, so I left that out. -- Andreas Schultz (3): gtp: add genl family modules alias gtp: clear DF bit on GTP packet tx gtp: fix cross netns recv on gtp socket drivers/net/gtp.c | 9 ++

[PATCH net v2 3/3] gtp: fix cross netns recv on gtp socket

2017-01-26 Thread Andreas Schultz
The use of the passed through netlink src_net to check for a cross netns operation was wrong. Using the GTP socket and the GTP netdevice is always correct (even if the netdev has been moved to new netns after link creation). Remove the now obsolete net field from gtp_dev. Signed-off-by: Andreas

Re: [PATCH 0/5] GTP: Fine-tuning for some function implementations

2017-01-26 Thread Andreas Schultz
s Elfring (5): > Use kmalloc_array() in gtp_hashtable_new() > Improve another size determination in ipv4_pdp_add() > Adjust 12 checks for null pointers > Rename jump labels in gtp_encap_enable() > Rename jump labels in gtp_hashtable_new() Looks good to me, for all the above: Re

Re: [PATCH 5/5] gtp: let userspace handle packets for invalid tunnels

2017-01-24 Thread Andreas Schultz
Hi Pablo, - On Jan 24, 2017, at 8:03 PM, pablo pa...@netfilter.org wrote: > Hi Andreas, > > On Tue, Jan 24, 2017 at 06:24:02PM +0100, Andreas Schultz wrote: >> enable userspace to send error replies for invalid tunnels >> >> Signed-off-by: Andreas Schultz >&

[PATCH 2/5] gtp: clear DF bit on GTP packet tx

2017-01-24 Thread Andreas Schultz
3GPP TS 29.281 and 3GPP TS 29.060 imply that GTP-U packets should be sent with the DF bit cleared. For example 3GPP TS 29.060, Release 8, Section 13.2.2: > Backbone router: Any router in the backbone may fragment the GTP > packet if needed, according to IPv4. Signed-off-by: Andreas S

[PATCH 4/5] gtp: remove unnecessary rcu_read_lock

2017-01-24 Thread Andreas Schultz
The rcu read lock is hold by default in the ip input path. There is no need to hold it twice in the socket recv decapsulate code path. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 24 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/drivers/net

[PATCH 5/5] gtp: let userspace handle packets for invalid tunnels

2017-01-24 Thread Andreas Schultz
enable userspace to send error replies for invalid tunnels Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index 912721e..c607333 100644 --- a/drivers/net/gtp.c +++ b/drivers

[PATCH 0/5] simple gtp improvements

2017-01-24 Thread Andreas Schultz
f the 3GPP GW functions, userspace needs to see invalid T-PDU's in order to generate the proper error messages, GTP fragmentation rules need the cleared DF bit. Andreas -- Andreas Schultz (5): gtp: add genl family modules alias gtp: clear DF bit on GTP packet tx gtp: fix cross netns r

[PATCH 1/5] gtp: add genl family modules alias

2017-01-24 Thread Andreas Schultz
Auto-load the module when userspace asks for the gtp netlink family. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index 8b6810b..7580ccc 100644 --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c

[PATCH 3/5] gtp: fix cross netns recv on gtp socket

2017-01-24 Thread Andreas Schultz
The use of the passed through netlink src_net to check for a cross netns operation was wrong. Using the GTP socket and the GTP netdevice is always correct (even if the netdev has been moved to new netns after link creation). Remove the now obsolete net field from gtp_dev. Signed-off-by: Andreas

[PATCH v2 14/18] gtp: move TEID hash to per socket structure

2017-01-24 Thread Andreas Schultz
Untangele the TEID information from the network device and move it into a per socket structure. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 100 -- 1 file changed, 60 insertions(+), 40 deletions(-) diff --git a/drivers/net/gtp.c b

[PATCH v2 04/18] gtp: return error ptr in find pdp helpers

2017-01-24 Thread Andreas Schultz
Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index 60946b7..e95c856 100644 --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c @@ -114,7 +114,7 @@ static struct

[PATCH v2 10/18] gtp: add socket to pdp context

2017-01-24 Thread Andreas Schultz
Having the socket present in context simplifies the sending logic. It also fixes the invalid assumtion that we have to use the same sending socket for all client IP's on a specific gtp interface. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c

[PATCH v2 13/18] gtp: replace netdev_dbg and KERN_DEBUG printk with pr_debug

2017-01-24 Thread Andreas Schultz
pr_debug is more versatile for normal debugging. Also replace netdev_dbg in in places where the network device will be remove soon. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/gtp.c b/drivers

[PATCH v2 09/18] gtp: use addr_hash when traversing pdp contexts

2017-01-24 Thread Andreas Schultz
This prepares for the removal of the tid_hash from the device. Signed-off-by: Andreas Schultz --- drivers/net/gtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index c117f63..c7e32a6 100644 --- a/drivers/net/gtp.c +++ b/drivers

  1   2   >