net: pkt: Print size of the failed net_buf allocation
This information is useful when debugging things. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
0a47dc5918
commit
9325109cbc
1 changed files with 3 additions and 2 deletions
|
@ -1151,9 +1151,10 @@ int net_pkt_alloc_buffer(struct net_pkt *pkt,
|
|||
|
||||
if (!buf) {
|
||||
#if NET_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
NET_ERR("Data buffer allocation failed (%s:%d)", caller, line);
|
||||
NET_ERR("Data buffer (%zd) allocation failed (%s:%d)",
|
||||
alloc_len, caller, line);
|
||||
#else
|
||||
NET_ERR("Data buffer allocation failed.");
|
||||
NET_ERR("Data buffer (%zd) allocation failed.", alloc_len);
|
||||
#endif
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue