af_packet / TX_RING not fully non-blocking (w/ MSG_DONTWAIT).
authorKretschmer, Mathias <mathias.kretschmer@fokus.fraunhofer.de>
Fri, 8 May 2015 13:44:37 +0000 (15:44 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 10 May 2015 23:40:08 +0000 (19:40 -0400)
commitfbf33a2802f71dba06faa948af805884ff16a2ab
tree94a5d1b3c78f23b9a82bfbbdf97c17c9cfa29abc
parentcd9c39977754d9602b5783a44f4af09530a58254
af_packet / TX_RING not fully non-blocking (w/ MSG_DONTWAIT).

This patch fixes an issue where the send(MSG_DONTWAIT) call
on a TX_RING is not fully non-blocking in cases where the device's sndBuf is
full. We pass nonblock=true to sock_alloc_send_skb() and return any possibly
occuring error code (most likely EGAIN) to the caller. As the fast-path stays
as it is, we keep the unlikely() around skb == NULL.

Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/packet/af_packet.c