- if (sendto(apif->fd, NULL, 0, MSG_DONTWAIT, NULL, 0) == -1)
- clib_unix_error("tx sendto failure");
+
+ if (PREDICT_FALSE(sendto(apif->fd, NULL, 0,
+ MSG_DONTWAIT, NULL, 0) == -1))
+ {
+ /* Uh-oh, drop & move on, but count whether it was fatal or not.
+ * Note that we have no reliable way to properly determine the
+ * disposition of the packets we just enqueued for delivery.
+ */
+ vlib_error_count (vm, node->node_index,
+ unix_error_is_fatal(errno) ?
+ AF_PACKET_TX_ERROR_TXRING_FATAL :
+ AF_PACKET_TX_ERROR_TXRING_EAGAIN,
+ n_sent);
+ }