net: pkt: Print caller and line when allocation fails

It is useful to know who called the net_pkt allocator when
we run out of buffers.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2020-03-06 15:19:50 +02:00
commit 65d8429d29

View file

@ -1150,7 +1150,11 @@ int net_pkt_alloc_buffer(struct net_pkt *pkt,
#endif
if (!buf) {
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
NET_ERR("Data buffer allocation failed (%s:%d)", caller, line);
#else
NET_ERR("Data buffer allocation failed.");
#endif
return -ENOMEM;
}