aboutsummaryrefslogtreecommitdiffstats
path: root/vnet/vnet/devices/af_packet/af_packet.c
diff options
context:
space:
mode:
authorChris Luke <chrisy@flirble.org>2016-05-23 21:30:26 -0400
committerDamjan Marion <damarion@cisco.com>2016-05-28 16:34:39 +0000
commit4b46c84901b6ea393a5118d7835d77aa6b3cef58 (patch)
treebf3904f56a3c4098ddc32b2a25df8d84bb621a10 /vnet/vnet/devices/af_packet/af_packet.c
parent1220afe52a03936c3d81c0e7e2e771f06dd04c25 (diff)
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>
Diffstat (limited to 'vnet/vnet/devices/af_packet/af_packet.c')
-rw-r--r--vnet/vnet/devices/af_packet/af_packet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vnet/vnet/devices/af_packet/af_packet.c b/vnet/vnet/devices/af_packet/af_packet.c
index b41eaf3ba82..e3ed3857982 100644
--- a/vnet/vnet/devices/af_packet/af_packet.c
+++ b/vnet/vnet/devices/af_packet/af_packet.c
@@ -115,7 +115,7 @@ create_packet_v2_sock(u8 * name, tpacket_req_t * rx_req, tpacket_req_t * tx_req,
int opt = 1;
if ((err = setsockopt(*fd, SOL_PACKET, PACKET_LOSS, &opt, sizeof(opt))) < 0)
{
- DBG_SOCK("Failed to set rx packet interface version");
+ DBG_SOCK("Failed to set packet tx ring error handling option");
ret = VNET_API_ERROR_SYSCALL_ERROR_1;
goto error;
}