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:
parent
330eb0f6f9
commit
65d8429d29
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue