[dpdk-stable] patch 'net/af_packet: improve Tx statistics accuracy' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Tue Dec 10 15:58:46 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/16/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/f888eb77cf18192cb54bcc7189e2e9206260e59b

Thanks.

Kevin.

---
>From f888eb77cf18192cb54bcc7189e2e9206260e59b Mon Sep 17 00:00:00 2001
From: Flavia Musatescu <flavia.musatescu at intel.com>
Date: Fri, 18 Oct 2019 15:24:31 +0100
Subject: [PATCH] net/af_packet: improve Tx statistics accuracy

[ upstream commit d4bda0ab2972cb3fd65fbb2575a51de5a68757cb ]

When sendto call fails and ENOBUFS/EAGAIN 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 the previously enqueued
packets will be considered successful, even though this is not
entirely correct.

Statistics numbers before this update:

Pktgen:
   Total Rx Pkts:               1360084
         Tx Pkts:               2000000
testpmd:
   RX-packets: 1408346  RX-missed: 0       RX-bytes:  84503418
   TX-packets: 526486   TX-errors: 881851  TX-bytes:  31589724

Statistics numbers after this update:

Pktgen:
   Total Rx Pkts:               1329872
         Tx Pkts:               2000000
testpmd:
   RX-packets: 1389156  RX-missed: 0       RX-bytes:  83349360
   TX-packets: 1389156  TX-errors: 0       TX-bytes:  83349360

Fixes: 74b7fc0a0ff1 ("net/af_packet: fix packet bytes counting")

Signed-off-by: Flavia Musatescu <flavia.musatescu at intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 drivers/net/af_packet/rte_eth_af_packet.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 2e32b3d3c..90e34c45a 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -240,6 +240,12 @@ eth_af_packet_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 
 	/* kick-off transmits */
-	if (sendto(pkt_q->sockfd, NULL, 0, MSG_DONTWAIT, NULL, 0) == -1) {
-		/* error sending -- no packets transmitted */
+	if (sendto(pkt_q->sockfd, NULL, 0, MSG_DONTWAIT, NULL, 0) == -1 &&
+			errno != ENOBUFS && errno != EAGAIN) {
+		/*
+		 * In case of a ENOBUFS/EAGAIN error all of the enqueued
+		 * packets will be considered successful even though only some
+		 * are sent.
+		 */
+
 		num_tx = 0;
 		num_tx_bytes = 0;
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-10 14:49:39.902280705 +0000
+++ 0012-net-af_packet-improve-Tx-statistics-accuracy.patch	2019-12-10 14:49:38.997458793 +0000
@@ -1 +1 @@
-From d4bda0ab2972cb3fd65fbb2575a51de5a68757cb Mon Sep 17 00:00:00 2001
+From f888eb77cf18192cb54bcc7189e2e9206260e59b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d4bda0ab2972cb3fd65fbb2575a51de5a68757cb ]
+
@@ -32 +33,0 @@
-Cc: stable at dpdk.org
@@ -41 +42 @@
-index dce76b04e..5b71db707 100644
+index 2e32b3d3c..90e34c45a 100644
@@ -44 +45 @@
-@@ -245,6 +245,12 @@ eth_af_packet_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -240,6 +240,12 @@ eth_af_packet_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)



More information about the stable mailing list