VPP-84 af_packet retry on EAGAIN, count on errors 34/1234/4
authorChris Luke <chrisy@flirble.org>
Tue, 24 May 2016 01:30:26 +0000 (21:30 -0400)
committerDamjan Marion <damarion@cisco.com>
Sat, 28 May 2016 16:34:39 +0000 (16:34 +0000)
commit4b46c84901b6ea393a5118d7835d77aa6b3cef58
treebf3904f56a3c4098ddc32b2a25df8d84bb621a10
parent1220afe52a03936c3d81c0e7e2e771f06dd04c25
VPP-84 af_packet retry on EAGAIN, count on errors

When af_packet signals the kernel that there are packets in the tx
ring with sendto() the kernel sometimes responds with EAGAIN.
Previously the af_packet driver would treat any error from sendto()
as fatal.

Whilst there's not much we can do about this, count the errors
and let's try to not die on the spot or sit in a loop forever.

Change-Id: Id76ba5e07b744f1ed6f348ec838a1ac506a381c9
Signed-off-by: Chris Luke <chrisy@flirble.org>
vnet/vnet/devices/af_packet/af_packet.c
vnet/vnet/devices/af_packet/device.c