From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id E15C91B7DC for ; Thu, 12 Apr 2018 13:51:40 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Apr 2018 04:51:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,441,1517904000"; d="scan'208";a="190937158" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by orsmga004.jf.intel.com with ESMTP; 12 Apr 2018 04:51:38 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.164]) by IRSMSX101.ger.corp.intel.com ([169.254.1.176]) with mapi id 14.03.0319.002; Thu, 12 Apr 2018 12:51:37 +0100 From: "Ananyev, Konstantin" To: "Chen, Junjie J" , "Xing, Beilei" , "Zhang, Qi Z" CC: "dev@dpdk.org" , "Chen, Junjie J" , "Chen@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/i40e: update tx_free_threshold to improve zero copy performance Thread-Index: AQHT0iYYVrCxvZVcBE+mc2yjuzKcgaP9BHYA Date: Thu, 12 Apr 2018 11:51:36 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258AE9143FC@IRSMSX102.ger.corp.intel.com> References: <20180412053226.295226-1-junjie.j.chen@intel.com> In-Reply-To: <20180412053226.295226-1-junjie.j.chen@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTA5NGY4NGMtNGQ0ZS00MGE1LWJmNTEtYjc1YzhiODc0MmIzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImRYcE1lbkpDb1BLMkJlc2s0YTdoenpLd0dIMVpTRVY3VWRkZHBNTm80Rmc9In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/i40e: update tx_free_threshold to improve zero copy performance 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: Thu, 12 Apr 2018 11:51:41 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Junjie Chen > Sent: Thursday, April 12, 2018 6:32 AM > To: Xing, Beilei ; Zhang, Qi Z > Cc: dev@dpdk.org; Chen, Junjie J ; Chen@dpdk.org > Subject: [dpdk-dev] [PATCH] net/i40e: update tx_free_threshold to improve= zero copy performance >=20 > From: "Chen, Junjie" >=20 > When vhost backend works in dequeue zero copy mode, nic locks virtio's > buffer until there is less or equal than tx_free_threshold buffer remain > and then free number of tx burst buffer. This causes packets drop in > virtio side and impacts zero copy performance. So we need to increase > the tx_free_threshold to let nic free virtio's buffer as soon as possible= . > Also we keep the upper limit to tx max burst size to ensure least > performance impact on non zero copy. Ok but why vhost app can't just use tx_queue_setup() to specify desired val= ue for tx_free_thresh? Why instead we have to modify PMD to satisfy needs of one app? Konstantin >=20 > Signed-off-by: Chen, Junjie > --- > drivers/net/i40e/i40e_rxtx.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c > index 56a854cec..d9569bdc9 100644 > --- a/drivers/net/i40e/i40e_rxtx.c > +++ b/drivers/net/i40e/i40e_rxtx.c > @@ -2039,6 +2039,8 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev, > tx_conf->tx_rs_thresh : DEFAULT_TX_RS_THRESH); > tx_free_thresh =3D (uint16_t)((tx_conf->tx_free_thresh) ? > tx_conf->tx_free_thresh : DEFAULT_TX_FREE_THRESH); > + if (tx_free_thresh < nb_desc - I40E_TX_MAX_BURST) > + tx_free_thresh =3D nb_desc - I40E_TX_MAX_BURST; > if (tx_rs_thresh >=3D (nb_desc - 2)) { > PMD_INIT_LOG(ERR, "tx_rs_thresh must be less than the " > "number of TX descriptors minus 2. " > -- > 2.16.0