net: ip: net_if: warning message on send failure
Print a warning if sending a packet on the L2 interface fails. Currently this is completely silent unless `NET_DBG` is enabled and the `context` parameter is provided. Signed-off-by: Jordan Yates <jordan@embeint.com>
This commit is contained in:
parent
e71c12c68f
commit
4e0386a445
1 changed files with 4 additions and 0 deletions
|
@ -261,6 +261,10 @@ static bool net_if_tx(struct net_if *iface, struct net_pkt *pkt)
|
|||
net_if_tx_lock(iface);
|
||||
status = net_if_l2(iface)->send(iface, pkt);
|
||||
net_if_tx_unlock(iface);
|
||||
if (status < 0) {
|
||||
NET_WARN("iface %d pkt %p send failure status %d",
|
||||
net_if_get_by_iface(iface), pkt, status);
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_NET_PKT_TXTIME_STATS) ||
|
||||
IS_ENABLED(CONFIG_TRACING_NET_CORE)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue