network/stack: Don't special-case ENOBUFS and EMSGSIZE in update_send_stats.

These errors are always reported, so we want to count them as
an "error" on send, not a "drop".
This commit is contained in:
Augustin Cavalier 2024-11-12 23:19:44 -05:00
parent 7aba63496b
commit 6a290d1dd1

View File

@ -198,10 +198,7 @@ update_device_send_stats(struct net_device* device, status_t status, size_t pack
atomic_add((int32*)&device->stats.send.packets, 1);
atomic_add64((int64*)&device->stats.send.bytes, packetSize);
} else {
if (status == ENOBUFS || status == EMSGSIZE)
atomic_add((int32*)&device->stats.send.dropped, 1);
else
atomic_add((int32*)&device->stats.send.errors, 1);
atomic_add((int32*)&device->stats.send.errors, 1);
}
}