Message ID | 1539154893-20548-1-git-send-email-rasland@mellanox.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Ferruh Yigit |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 219311B434; Wed, 10 Oct 2018 09:01:46 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70074.outbound.protection.outlook.com [40.107.7.74]) by dpdk.org (Postfix) with ESMTP id 7F0241B42D; Wed, 10 Oct 2018 09:01:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JU3DbWKGuDqzaOphU2TEybmiXCn41qp5OQKu+2+lpmI=; b=MYPvhVWFO/fgU/wlgqG035XpOoXryrJ/s+vslUfKlX6pgpGzkVOikU+dq/k0KizTJ8rDfRhun5yrlncEgk6gsCvEXKkj0sgu4MveXR5hNduyzjePbK7MmrMQT6bH6AFVdUk5h0O2GazXura9E2f4oolCt89+49l7dN+Sr8gjiN0= Received: from DB5PR05MB1254.eurprd05.prod.outlook.com (10.162.157.140) by DB5PR05MB1320.eurprd05.prod.outlook.com (10.162.157.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.28; Wed, 10 Oct 2018 07:01:41 +0000 Received: from DB5PR05MB1254.eurprd05.prod.outlook.com ([fe80::3516:b329:5c35:51a5]) by DB5PR05MB1254.eurprd05.prod.outlook.com ([fe80::3516:b329:5c35:51a5%2]) with mapi id 15.20.1207.029; Wed, 10 Oct 2018 07:01:41 +0000 From: Raslan Darawsheh <rasland@mellanox.com> To: "keith.wiles@intel.com" <keith.wiles@intel.com> CC: Thomas Monjalon <thomas@monjalon.net>, "dev@dpdk.org" <dev@dpdk.org>, Shahaf Shuler <shahafs@mellanox.com>, Raslan Darawsheh <rasland@mellanox.com>, Ori Kam <orika@mellanox.com>, "stable@dpdk.org" <stable@dpdk.org> Thread-Topic: [PATCH] net/tap: fix reported number of Tx packets Thread-Index: AQHUYGcY6oFp/izeZ06HMCdLslZGyA== Date: Wed, 10 Oct 2018 07:01:41 +0000 Message-ID: <1539154893-20548-1-git-send-email-rasland@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HE1PR06CA0142.eurprd06.prod.outlook.com (2603:10a6:7:16::29) To DB5PR05MB1254.eurprd05.prod.outlook.com (2a01:111:e400:51cc::12) authentication-results: spf=none (sender IP is ) smtp.mailfrom=rasland@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [37.142.13.130] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB5PR05MB1320; 6:kEiEJeypg5a2cHRNsXsJVFhpSk7mbKx69Go15ZlQXNyBnNBrIpdFZ0gObQu9ks/zE1ZQwq2Xl2ciuIsFe1XvHA/z84/rn8bjB0BKIOp68F1zXdnrq5JaXb9bLbrNVOBl3RW/w7+TchiiF90HCUIF7lt/ZTn7wNyrEOQ9ghvyrjFJDW/nWSVw9+fQHuBrVFMkFcvKqSsfUKgBjaawOgTcgPsbiAfJhFFFef/CpbkygTtN6Q8rtD+7eRTeIj473UzeRnhslSwE5sGRr0+1InfvBSrH0PLjq5HDLoQtiQX0uoYJMmeJY97uX1XIl7llRhci1W7sMQSevjeJJB90AqJtNdo0PM+jM47lqCyVSi7I2IYllQKxyAiF0lV54ASA38JX4ge6Lmg6bprc+S9lz1MLf+OmJC3XUvpj8sVM3LrnTYUgI/s60XSd1l+u8KxoKZQwkMWce/ioSy9MCq/gLPhNFw==; 5:wz/Rj8EyveA1ZkPndqfWajERWGiDbTzUkhHaZM8uvKQgDy+1R/SxEFRpwR1Xu2RKbFr29/+CXZ/7HWMZ9sufsEuksfLUdawN2Qk+XzDTfWAdz2P/nJgBWZedUUl7kb96A72RQ2UU/yNKcvb1dBFp9GgXvwiKm3RCetS9JVKLQ4c=; 7:3ht9ItT2vjWBZbGIQ5v6pZ/ovmdmclUKamnn6SOK9BJhKGtqBbhEtLi7tm5Xfxc9ORgWK3kfnHSHNtcOXH6/qtHQE7HHSDV3KX40SAKyP+7Jtozd7qbBgQmuSZPbfxlCZzM78736cNYneBlmUOoWXHUSUJpa01GGfiVIIbQIjNVHpLV9ZeIl4vwfL8JR+gXq44McGi0TryPqhcYHErVI6SKezsfVln1EF7NCgIcLmRIIuqkwuD2I4WMqrTb7ChWW x-ms-office365-filtering-correlation-id: e40fd8e7-17b9-4fec-486e-08d62e7e3add x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB5PR05MB1320; x-ms-traffictypediagnostic: DB5PR05MB1320: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: <DB5PR05MB13207DF83BF93200A606235CC2E00@DB5PR05MB1320.eurprd05.prod.outlook.com> x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231355)(944501410)(52105095)(10201501046)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051); SRVR:DB5PR05MB1320; BCL:0; PCL:0; RULEID:; SRVR:DB5PR05MB1320; x-forefront-prvs: 08213D42D3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(136003)(376002)(396003)(346002)(366004)(189003)(199004)(8936002)(305945005)(2501003)(105586002)(14454004)(8676002)(5250100002)(256004)(81156014)(81166006)(106356001)(54906003)(14444005)(102836004)(86362001)(66066001)(575784001)(478600001)(50226002)(2900100001)(2351001)(71200400001)(71190400001)(2906002)(97736004)(99286004)(52116002)(53936002)(486006)(5660300001)(386003)(6506007)(6916009)(476003)(6116002)(316002)(3846002)(6486002)(2616005)(26005)(4326008)(6436002)(186003)(6512007)(68736007)(7736002)(36756003)(1857600001)(25786009)(5640700003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR05MB1320; H:DB5PR05MB1254.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: ynXt7Bd5t+SOWmfG99SMyU9tYXCqEhq49XuwOpr4WNRz3vTQ7wDaEbYjlGq7JJTbMeoh4z/mTF+e5d/KIw2OEGgmFe1ws7cpmRURfnfJ9LHjH+MNCU4hykV7TSoFphZQvi9CqFv4yxXbYu3kTqfebdJRoCWFOIUvCmObYOFPzjpkYoOAPhKIMsPPOr+2lr8pckLALN4ld7pVxiq+gv5WUh33KsDM9K9u6RjOQx0BbeaSRD5wx6NL40sKz5DRBCuSzbGnQUWd5QtVDpj4c1PanmjdijWniTDOZGUp1kvS4hlPiuglE+YyAXRvLkIV88ULnC0zK6onjbXoAWFt2DnVBpjWIqkr6b7khFqRmLfw3KA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: e40fd8e7-17b9-4fec-486e-08d62e7e3add X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Oct 2018 07:01:41.4316 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR05MB1320 Subject: [dpdk-dev] [PATCH] net/tap: fix reported number of Tx packets X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
net/tap: fix reported number of Tx packets
|
|
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/Intel-compilation | success | Compilation OK |
Commit Message
Raslan Darawsheh
Oct. 10, 2018, 7:01 a.m. UTC
When writev fails to send packets it doesn't update the
number of Tx packets, but it still num_tx is updated.
the value that should be returned is the actual number
of sent packets which is num_packets.
Fixes: 02f96a0a ("net/tap: add TUN/TAP device PMD")
CC: stable@dpdk.org
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
---
drivers/net/tap/rte_eth_tap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
> On Oct 10, 2018, at 2:01 AM, Raslan Darawsheh <rasland@mellanox.com> wrote: > > When writev fails to send packets it doesn't update the > number of Tx packets, but it still num_tx is updated. > > the value that should be returned is the actual number > of sent packets which is num_packets. > > Fixes: 02f96a0a ("net/tap: add TUN/TAP device PMD") > CC: stable@dpdk.org > Signed-off-by: Raslan Darawsheh <rasland@mellanox.com> Acked-by: Keith Wiles <keith.wiles@intel.com> > --- > drivers/net/tap/rte_eth_tap.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c > index 83c9288..228add2 100644 > --- a/drivers/net/tap/rte_eth_tap.c > +++ b/drivers/net/tap/rte_eth_tap.c > @@ -707,7 +707,7 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) > txq->stats.errs += nb_pkts - num_tx; > txq->stats.obytes += num_tx_bytes; > > - return num_tx; > + return num_packets; > } > > static const char * > -- > 2.7.4 > Regards, Keith
On 10/10/2018 1:39 PM, Wiles, Keith wrote: > > >> On Oct 10, 2018, at 2:01 AM, Raslan Darawsheh <rasland@mellanox.com> wrote: >> >> When writev fails to send packets it doesn't update the >> number of Tx packets, but it still num_tx is updated. >> >> the value that should be returned is the actual number >> of sent packets which is num_packets. >> >> Fixes: 02f96a0a ("net/tap: add TUN/TAP device PMD") >> CC: stable@dpdk.org >> Signed-off-by: Raslan Darawsheh <rasland@mellanox.com> > > Acked-by: Keith Wiles <keith.wiles@intel.com> Applied to dpdk-next-net/master, thanks.
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 83c9288..228add2 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -707,7 +707,7 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) txq->stats.errs += nb_pkts - num_tx; txq->stats.obytes += num_tx_bytes; - return num_tx; + return num_packets; } static const char *