net: pkt: Make the debug print eye friendly

Print "pkt" instead of "Pkt" when printing network packet
pointer value.

Change-Id: Id4225be9c55807def3d892d372cdfc5c79c871fc
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2017-04-20 15:36:35 +03:00
commit f498a90b77
5 changed files with 11 additions and 11 deletions

View file

@ -1439,7 +1439,7 @@ bool net_6lo_uncompress(struct net_pkt *pkt)
return uncompress_ipv6_header(pkt);
}
NET_DBG("Pkt is not compressed");
NET_DBG("pkt %p is not compressed", pkt);
return true;
}

View file

@ -951,9 +951,9 @@ try_send:
return NULL;
}
NET_DBG("Pkt %p (frag %p) will be sent later", pkt, pkt->frags);
NET_DBG("pkt %p (frag %p) will be sent later", pkt, pkt->frags);
#else
NET_DBG("Pkt %p (frag %p) cannot be sent, dropping it.", pkt,
NET_DBG("pkt %p (frag %p) cannot be sent, dropping it.", pkt,
pkt->frags);
net_pkt_unref(pkt);

View file

@ -256,11 +256,11 @@ void net_pkt_print_frags(struct net_pkt *pkt)
int count = -1, frag_size = 0, ll_overhead = 0;
if (!pkt) {
NET_INFO("Pkt %p", pkt);
NET_INFO("pkt %p", pkt);
return;
}
NET_INFO("Pkt %p frags %p", pkt, pkt->frags);
NET_INFO("pkt %p frags %p", pkt, pkt->frags);
NET_ASSERT(pkt->frags);
@ -825,7 +825,7 @@ struct net_buf *net_pkt_frag_del(struct net_pkt *pkt,
#endif
{
#if defined(CONFIG_NET_DEBUG_NET_PKT)
NET_DBG("Pkt %p parent %p frag %p ref %u (%s:%d)",
NET_DBG("pkt %p parent %p frag %p ref %u (%s:%d)",
pkt, parent, frag, frag->ref, caller, line);
if (frag->ref == 1) {
@ -852,7 +852,7 @@ void net_pkt_frag_add_debug(struct net_pkt *pkt, struct net_buf *frag,
void net_pkt_frag_add(struct net_pkt *pkt, struct net_buf *frag)
#endif
{
NET_DBG("Pkt %p frag %p (%s:%d)", pkt, frag, caller, line);
NET_DBG("pkt %p frag %p (%s:%d)", pkt, frag, caller, line);
/* We do not use net_buf_frag_add() as this one will refcount
* the frag once more if !pkt->frags
@ -872,7 +872,7 @@ void net_pkt_frag_insert_debug(struct net_pkt *pkt, struct net_buf *frag,
void net_pkt_frag_insert(struct net_pkt *pkt, struct net_buf *frag)
#endif
{
NET_DBG("Pkt %p frag %p (%s:%d)", pkt, frag, caller, line);
NET_DBG("pkt %p frag %p (%s:%d)", pkt, frag, caller, line);
net_buf_frag_last(frag)->frags = pkt->frags;
pkt->frags = frag;

View file

@ -145,7 +145,7 @@ static int tester_send(struct net_if *iface, struct net_pkt *pkt)
return 0;
}
DBG("Pkt %p to be sent len %lu\n", pkt, net_pkt_get_len(pkt));
DBG("pkt %p to be sent len %lu\n", pkt, net_pkt_get_len(pkt));
net_pkt_unref(pkt);
@ -185,7 +185,7 @@ static int tester_send_peer(struct net_if *iface, struct net_pkt *pkt)
return 0;
}
DBG("Pkt %p to be sent len %lu\n", pkt, net_pkt_get_len(pkt));
DBG("pkt %p to be sent len %lu\n", pkt, net_pkt_get_len(pkt));
net_pkt_unref(pkt);

View file

@ -145,7 +145,7 @@ static int tester_send(struct net_if *iface, struct net_pkt *pkt)
return 0;
}
DBG("Pkt %p to be sent len %lu\n", pkt, net_pkt_get_len(pkt));
DBG("pkt %p to be sent len %lu\n", pkt, net_pkt_get_len(pkt));
#if 0
net_hexdump_frags("recv", pkt);