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 92BEDA04F3 for ; Thu, 19 Dec 2019 15:38:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 89B2D1BF92; Thu, 19 Dec 2019 15:38:04 +0100 (CET) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 676861BFB1 for ; Thu, 19 Dec 2019 15:38:03 +0100 (CET) Received: by mail-wr1-f67.google.com with SMTP id q6so6194992wro.9 for ; Thu, 19 Dec 2019 06:38:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zh5hfWotocYQTdRw/01b861g38qAhs7Fv3K7j3so3C4=; b=O0KL2+e+t1EYKlwg7DAEN4yStdOYav6AhpnI6TnRXjJyL6sD9QGKwnkdpCxZbpwtaM n2x6Eeq0VXVwwRjLsqYCUYxO5DsXgxif8x0f1pN+eyJ5mf01uppl4ys6258Ior5MN+ys hekuNL/ZpSgPTB+AznoxxbrQvqpcdqhDY3CzFicQN0rgLLGO5kAW2HFW27vkpK8DxWT4 NLFXoZzNnCVW49dM0chBxkQkyJM+HggT/H4IJdBSCGQIRQHRbCuLlxI1ZQuEmksOGxy9 QeUZgjSqVoVYdnIZgEYgea2s+eT6amak0E/2NfqDOsCvyAHcAEMCL85H7t2fl8r0UV4i H/zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zh5hfWotocYQTdRw/01b861g38qAhs7Fv3K7j3so3C4=; b=jNvGJxP/GpzCM6wnaG4dba5UrfNw+UijG0DvlYnwCs09XU1PSp4qoa2/nOAXnIhymE viZ0XYcz1bzj4aCt1FSdxarxnHEOINf3C68LDmc0BEZYYJBk2Mg2UvJoo1QS1w16+S+Q 5/hEee/CeLOQ1+moyWNFQSozFiHq53fcxSDE/1x6Z2oBebVQI32eJZDlBwB1q/KhCcsP bWKfPWf/kK1Ll/bVQkF4MHNiQLj16ymn5mjJN/3b6/j8EHxJjx/4ZhtQiX7GVJe9A0Wr J4OCdm+O50LAQvw7P4L8pJSew21muY6kUlTTLfRQTVMXgA+DW4cCZd4xRWb3w94Br9Ns D5Jg== X-Gm-Message-State: APjAAAU5vEYIlKupQGrdQd+HyTHii8WN8pIcGqfXhKYVEGl6VhalN7Mz IAIWWWfIutj9aQ4uCLdua3M= X-Google-Smtp-Source: APXvYqwJwBkohRWgSw/LowoocsaWWbCesERNd2EknJHSnOYV4MQ0g56Oo5op42kx4KaADhxvyovLgA== X-Received: by 2002:adf:db41:: with SMTP id f1mr10009466wrj.392.1576766282110; Thu, 19 Dec 2019 06:38:02 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id o129sm6603175wmb.1.2019.12.19.06.38.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 06:38:01 -0800 (PST) From: luca.boccassi@gmail.com To: Flavia Musatescu Cc: Ferruh Yigit , dpdk stable Date: Thu, 19 Dec 2019 14:33:44 +0000 Message-Id: <20191219143447.21506-77-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191219143447.21506-1-luca.boccassi@gmail.com> References: <20191219143447.21506-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/af_packet: improve Tx statistics accuracy' has been queued to LTS release 17.11.10 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 17.11.10 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/21/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. Thanks. Luca Boccassi --- >From 88a449cc34a5bfaf019c60b8a8b0093226550787 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_packet/rte_eth_af_packet.c index 4735280902..ae9b0e25f0 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -263,8 +263,14 @@ 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.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-12-19 14:32:29.368474807 +0000 +++ 0077-net-af_packet-improve-Tx-statistics-accuracy.patch 2019-12-19 14:32:26.173299174 +0000 @@ -1,8 +1,10 @@ -From d4bda0ab2972cb3fd65fbb2575a51de5a68757cb Mon Sep 17 00:00:00 2001 +From 88a449cc34a5bfaf019c60b8a8b0093226550787 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 @@ -29,7 +31,6 @@ TX-packets: 1389156 TX-errors: 0 TX-bytes: 83349360 Fixes: 74b7fc0a0ff1 ("net/af_packet: fix packet bytes counting") -Cc: stable@dpdk.org Signed-off-by: Flavia Musatescu Reviewed-by: Ferruh Yigit @@ -38,10 +39,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 dce76b04e5..5b71db7078 100644 +index 4735280902..ae9b0e25f0 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c -@@ -244,8 +244,14 @@ eth_af_packet_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) +@@ -263,8 +263,14 @@ eth_af_packet_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) } /* kick-off transmits */