The first patch removes a useless rcu lock and the second relax alloc
constraints when a PDP context is added.
drivers/net/gtp.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
Comments are welcomed,
Nicolas
During a dump, this attribute is essential, it enables the userspace to
know on which interface the context is linked to.
Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel(a)6wind.com>
Tested-by: Gabriel Ganne <gabriel.ganne(a)6wind.com>
---
I target this to net, because I think this is a bug fix. The dump result cannot
be used if there is more than one gtp interface on the system.
drivers/net/gtp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
index 21640a035d7d..8e47d0112e5d 100644
--- a/drivers/net/gtp.c
+++ b/drivers/net/gtp.c
@@ -1179,6 +1179,7 @@ static int gtp_genl_fill_info(struct sk_buff *skb, u32 snd_portid, u32 snd_seq,
goto nlmsg_failure;
if (nla_put_u32(skb, GTPA_VERSION, pctx->gtp_version) ||
+ nla_put_u32(skb, GTPA_LINK, pctx->dev->ifindex) ||
nla_put_be32(skb, GTPA_PEER_ADDRESS, pctx->peer_addr_ip4.s_addr) ||
nla_put_be32(skb, GTPA_MS_ADDRESS, pctx->ms_addr_ip4.s_addr))
goto nla_put_failure;
--
2.26.2
Hi All,
This is my first post, I have a similar problem to the topic "Network
is unreachable error for GTP interface".
I followed all instructions, installed all needed dependencies,
upgrade my kernel version to 4.9.0-6 as stated in
https://osmocom.org/projects/openggsn/wiki/Kernel_GTP
Unfortunately, no GTP T-PDU encapsulation for my packets.
## Tunnel listing is OK
root@routeurA:/home/bob/libgtpnl/tools# ./gtp-tunnel list
version 1 tei 200/100 ms_addr 172.23.10.163 sgsn_addr 10.11.12.14
## I have upgraded my Kernel version to 4.9.0-6 as stated in
https://osmocom.org/projects/openggsn/wiki/Kernel_GTP
At the time of writing (2018-04-26) of this wiki, below listed
distributions have support of GTP kernels :
Debian
Debian 9 "stretch" (kernel 4.9.0-6)
root@routeurA:/home/bob/libgtpnl/tools# uname -r
4.9.0-6-amd64
## GTP module
root@routeurA:/home/bob/libgtpnl/tools# lsmod | grep gtp
gtp 28672 0
udp_tunnel 16384 1 gtp
## ping remote ms_addr is not ok
root@routeurA:/home/bob/libgtpnl/tools# ping 172.23.10.163
PING 172.23.10.163 (172.23.10.163) 56(84) bytes of data.
^C
--- 172.23.10.163 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
## remove the route using "gtpa" device
root@routeurA:/home/bob/libgtpnl/tools# ip route del 172.23.10.163/32 dev gtpa
## add new route using normal interface
root@routeurA:/home/bob/libgtpnl/tools# ip route add 172.23.10.163/32
via 10.11.12.14
## ping is OK
root@routeurA:/home/bob/libgtpnl/tools# ping 172.23.10.163
PING 172.23.10.163 (172.23.10.163) 56(84) bytes of data.
64 bytes from 172.23.10.163: icmp_seq=1 ttl=64 time=0.592 ms
64 bytes from 172.23.10.163: icmp_seq=2 ttl=64 time=0.713 ms
## remove again the route
root@routeurA:/home/bob/libgtpnl/tools# ip route del 172.23.10.163/32
## switch it to "gtpa" device
root@routeurA:/home/bob/libgtpnl/tools# ip route add 172.23.10.163/32 dev gtpa
root@routeurA:/home/bob/libgtpnl/tools# ping 172.23.10.163
PING 172.23.10.163 (172.23.10.163) 56(84) bytes of data.
^C
## tcpdump shows ICMP between the 2 ms_addr, no encapsulation at all
Am I missing something somewhere?
FYI, I'm not using openggsn or ergw, I have developped my small
userspace GTP-C ready, but I'm stuck at GTP-U side.
Thanks in advance,
Best Regards,