From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 45E7C1B4B8; Wed, 10 Oct 2018 14:39:53 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Oct 2018 05:39:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,364,1534834800"; d="scan'208";a="96278246" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 10 Oct 2018 05:39:47 -0700 Received: from fmsmsx117.amr.corp.intel.com ([169.254.3.34]) by fmsmsx107.amr.corp.intel.com ([169.254.6.30]) with mapi id 14.03.0319.002; Wed, 10 Oct 2018 05:39:47 -0700 From: "Wiles, Keith" To: Raslan Darawsheh CC: Thomas Monjalon , "dev@dpdk.org" , Shahaf Shuler , Ori Kam , "stable@dpdk.org" Thread-Topic: [PATCH] net/tap: fix reported number of Tx packets Thread-Index: AQHUYGcY6oFp/izeZ06HMCdLslZGyKUY4TEA Date: Wed, 10 Oct 2018 12:39:47 +0000 Message-ID: References: <1539154893-20548-1-git-send-email-rasland@mellanox.com> In-Reply-To: <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-originating-ip: [10.254.38.137] Content-Type: text/plain; charset="us-ascii" Content-ID: <2AFC697F8661FD4B9F21B84F2ABF5F1C@intel.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Oct 2018 12:39:53 -0000 > On Oct 10, 2018, at 2:01 AM, Raslan Darawsheh wrot= e: >=20 > When writev fails to send packets it doesn't update the > number of Tx packets, but it still num_tx is updated. >=20 > the value that should be returned is the actual number > of sent packets which is num_packets. >=20 > Fixes: 02f96a0a ("net/tap: add TUN/TAP device PMD") > CC: stable@dpdk.org > Signed-off-by: Raslan Darawsheh Acked-by: Keith Wiles > --- > drivers/net/tap/rte_eth_tap.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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, uin= t16_t nb_pkts) > txq->stats.errs +=3D nb_pkts - num_tx; > txq->stats.obytes +=3D num_tx_bytes; >=20 > - return num_tx; > + return num_packets; > } >=20 > static const char * > --=20 > 2.7.4 >=20 Regards, Keith