Skip to content
Snippets Groups Projects
Commit 259af48e authored by Aastha Mehta's avatar Aastha Mehta
Browse files

prints leading to udp functions

parent d771bcfa
No related branches found
No related tags found
No related merge requests found
......@@ -219,6 +219,13 @@ static int ip_local_deliver_finish(struct net *net, struct sock *sk, struct sk_b
resubmit:
raw = raw_local_deliver(skb, protocol);
#ifdef CONFIG_XEN_SME
memset(dbg_buff, 0, DBG_BUF_SIZE);
sprintf(dbg_buff, "%s:%d caller: %pS, raw: %d", __func__, __LINE__,
__builtin_return_address(0), raw);
xsl_print_sk_buff(skb, dbg_buff);
#endif
ipprot = rcu_dereference(inet_protos[protocol]);
if (ipprot) {
int ret;
......@@ -230,7 +237,21 @@ static int ip_local_deliver_finish(struct net *net, struct sock *sk, struct sk_b
}
nf_reset(skb);
}
#ifdef CONFIG_XEN_SME
memset(dbg_buff, 0, DBG_BUF_SIZE);
sprintf(dbg_buff, "%s:%d caller: %pS", __func__, __LINE__,
__builtin_return_address(0));
xsl_print_sk_buff(skb, dbg_buff);
#endif
ret = ipprot->handler(skb);
#ifdef CONFIG_XEN_SME
memset(dbg_buff, 0, DBG_BUF_SIZE);
sprintf(dbg_buff, "%s:%d caller: %pS", __func__, __LINE__,
__builtin_return_address(0));
xsl_print_sk_buff(skb, dbg_buff);
#endif
if (ret < 0) {
protocol = -ret;
goto resubmit;
......
......@@ -79,6 +79,10 @@
#define pr_fmt(fmt) "UDP: " fmt
#ifdef CONFIG_XEN_SME
#include "../../drivers/net/ethernet/broadcom/bnx2x/sme/xen_sme_hooks.h"
#define DBG_BUF_SIZE 256
#endif
#include <asm/uaccess.h>
#include <asm/ioctls.h>
#include <linux/bootmem.h>
......@@ -1505,6 +1509,13 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
int rc;
int is_udplite = IS_UDPLITE(sk);
#ifdef CONFIG_XEN_SME
char dbg_buff[DBG_BUF_SIZE];
memset(dbg_buff, 0, DBG_BUF_SIZE);
sprintf(dbg_buff, "%s:%d caller: %pS", __func__, __LINE__,
__builtin_return_address(0));
xsl_print_sk_buff(skb, dbg_buff);
#endif
/*
* Charge it to the socket, dropping if the queue is full.
*/
......@@ -1597,6 +1608,12 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
rc = 0;
#ifdef CONFIG_XEN_SME
memset(dbg_buff, 0, DBG_BUF_SIZE);
sprintf(dbg_buff, "%s:%d caller: %pS, sock owned: %d", __func__, __LINE__,
__builtin_return_address(0), (sk ? sk->sk_lock.owned : -2));
xsl_print_sk_buff(skb, dbg_buff);
#endif
ipv4_pktinfo_prepare(sk, skb);
bh_lock_sock(sk);
if (!sock_owned_by_user(sk))
......@@ -1739,6 +1756,13 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
__be32 saddr, daddr;
struct net *net = dev_net(skb->dev);
#ifdef CONFIG_XEN_SME
char dbg_buff[DBG_BUF_SIZE];
memset(dbg_buff, 0, DBG_BUF_SIZE);
sprintf(dbg_buff, "%s:%d caller: %pS", __func__, __LINE__,
__builtin_return_address(0));
xsl_print_sk_buff(skb, dbg_buff);
#endif
/*
* Validate the packet.
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment