From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9512CA04F0 for ; Tue, 10 Dec 2019 16:00:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 87A881B13C; Tue, 10 Dec 2019 16:00:27 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id A07511BEC4 for ; Tue, 10 Dec 2019 16:00:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575990025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uxsFkfIPl0QN3xdfk6k3A6jH/pdHeRzie5xDqN4J96Y=; b=S8gFNaUNE5FFCvCIEa5WBADI6Ar5eQZVl1cKLJswMjFFDmUanwCeIzLNhnzM5vX+FYGKX/ 64yt2iRoF2Jm4X3Vt+XrhiH1mgUBfEcLhDUzhqXyBduAg2TPeYfmogxYJtwMCflOqUvhK4 Dtu3ojWQWORsU+hRIWlzzy2n7Hl2vws= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-415-39wMweDPMQyUtIfihG-6Vw-1; Tue, 10 Dec 2019 10:00:21 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8258F8017DF; Tue, 10 Dec 2019 15:00:20 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-64.ams2.redhat.com [10.36.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 84A545DA2C; Tue, 10 Dec 2019 15:00:19 +0000 (UTC) From: Kevin Traynor To: Flavia Musatescu Cc: Ferruh Yigit , dpdk stable Date: Tue, 10 Dec 2019 14:58:46 +0000 Message-Id: <20191210145937.32755-12-ktraynor@redhat.com> In-Reply-To: <20191210145937.32755-1-ktraynor@redhat.com> References: <20191210145937.32755-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: 39wMweDPMQyUtIfihG-6Vw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/af_packet: improve Tx statistics accuracy' has been queued to LTS release 18.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 rebasi= ng (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/f888eb77cf18192cb5= 4bcc7189e2e9206260e59b Thanks. Kevin. --- >From f888eb77cf18192cb54bcc7189e2e9206260e59b Mon Sep 17 00:00:00 2001 From: Flavia Musatescu 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 Reviewed-by: Ferruh Yigit --- 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_pac= ket/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) =20 =09/* kick-off transmits */ -=09if (sendto(pkt_q->sockfd, NULL, 0, MSG_DONTWAIT, NULL, 0) =3D=3D -1) { -=09=09/* error sending -- no packets transmitted */ +=09if (sendto(pkt_q->sockfd, NULL, 0, MSG_DONTWAIT, NULL, 0) =3D=3D -1 && +=09=09=09errno !=3D ENOBUFS && errno !=3D EAGAIN) { +=09=09/* +=09=09 * In case of a ENOBUFS/EAGAIN error all of the enqueued +=09=09 * packets will be considered successful even though only some +=09=09 * are sent. +=09=09 */ + =09=09num_tx =3D 0; =09=09num_tx_bytes =3D 0; --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-10 14:49:39.902280705 +0000 +++ 0012-net-af_packet-improve-Tx-statistics-accuracy.patch=092019-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@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)