[PATCH 1/3] gtp: add some debug instrumentation

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Andreas Schultz aschultz at tpip.net
Tue Nov 17 11:06:18 UTC 2015


Signed-off-by: Andreas Schultz <aschultz at tpip.net>
---
 gtp.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gtp.c b/gtp.c
index 8782fea..cbe2da1 100644
--- a/gtp.c
+++ b/gtp.c
@@ -330,6 +330,8 @@ static int gtp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
 	if (!gti)
 		goto user;
 
+	netdev_dbg(gti->dev, "encap_recv %p\n", sk);
+
 	switch (udp_sk(sk)->encap_type) {
 	case UDP_ENCAP_GTP0:
 		netdev_dbg(gti->dev, "received GTP0 packet\n");
@@ -893,6 +895,8 @@ static int gtp_encap_enable(struct net_device *dev, struct gtp_instance *gti,
 	struct socket *sock0, *sock1u;
 	struct sock *sk;
 
+	netdev_dbg(dev, "enable gtp on %d, %d\n", fd_gtp0, fd_gtp1);
+
 	sock0 = sockfd_lookup(fd_gtp0, &err);
 	if (sock0 == NULL) {
 		netdev_dbg(dev, "socket fd=%d not found (gtp0)\n", fd_gtp0);
@@ -918,6 +922,8 @@ static int gtp_encap_enable(struct net_device *dev, struct gtp_instance *gti,
 		goto err2;
 	}
 
+	netdev_dbg(dev, "enable gtp on %p, %p\n", sock0, sock1u);
+
 	gti->sock0 = sock0;
 	gti->sock1u = sock1u;
 
-- 
2.5.0




More information about the OpenBSC mailing list