[dpdk-dev] [PATCH] net/af_packet: improve Tx statistics accuracy

Stephen Hemminger stephen at networkplumber.org
Wed Oct 9 19:26:09 CEST 2019


On Wed,  9 Oct 2019 16:29:09 +0100
Flavia Musatescu <flavia.musatescu at intel.com> wrote:

> +	if (sendto(pkt_q->sockfd, NULL, 0, MSG_DONTWAIT, NULL, 0) == -1 &&
> +			errno != ENOBUFS) {
> +		/* Error sending.
> +		 * When sendto call fails and ENOBUFS error is being set
> +		 * some of the packets are actually successfully transmitted.
> +		 * There is no available count of those packets, so in order
> +		 * to make the statistics more accurate, all of the previously
> +		 * enqueued packets will be considered successful, even though
> +		 * this is not entirely correct.
> +		 */

Agree with the change, but please keep only add a small code comment.
Long comments are a personal pet peeve, it also tends to standout as
"some different developer who had an issue left this comment"



More information about the dev mailing list