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 34DA7A0350; Tue, 23 Jun 2020 16:51:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 11F611D694; Tue, 23 Jun 2020 16:51:02 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id F3CCF1D694 for ; Tue, 23 Jun 2020 16:50:59 +0200 (CEST) IronPort-SDR: cxE45ett1gNtS9wKcr230wQcI7yskQ32nT8tZUXahHslLE/ErbVgiCtMu+Zh0Unn5KCSnKYnCj AfA01d2rGDMg== X-IronPort-AV: E=McAfee;i="6000,8403,9661"; a="124349519" X-IronPort-AV: E=Sophos;i="5.75,271,1589266800"; d="scan'208";a="124349519" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2020 07:50:59 -0700 IronPort-SDR: IH/tYIX9h3h1cAU7MGmPB+sCM7F+BJ8gqfu+PUcvNrzAOLC2JAdvgIEQgGB/dQuKjQQArydqhy SqD2yQocCqqw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,271,1589266800"; d="scan'208";a="423027322" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by orsmga004.jf.intel.com with ESMTP; 23 Jun 2020 07:50:58 -0700 Received: from irsmsx106.ger.corp.intel.com ([169.254.8.150]) by IRSMSX153.ger.corp.intel.com ([169.254.9.23]) with mapi id 14.03.0439.000; Tue, 23 Jun 2020 15:50:57 +0100 From: "Loftus, Ciara" To: Stephen Hemminger CC: "dev@dpdk.org" , "Ye, Xiaolong" , "Karlsson, Magnus" Thread-Topic: [dpdk-dev] [PATCH] net/af_xdp: optimisations to improve packet loss Thread-Index: AQHWQMc55pHU0BxN2kisM+G2MRogPKjcIEQAgAoxcyA= Date: Tue, 23 Jun 2020 14:50:56 +0000 Message-ID: <74F120C019F4A64C9B78E802F6AD4CC287779CD2@IRSMSX106.ger.corp.intel.com> References: <20200612141746.9450-1-ciara.loftus@intel.com> <20200616204216.35e362b3@hermes.lan> In-Reply-To: <20200616204216.35e362b3@hermes.lan> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 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/af_xdp: optimisations to improve packet loss 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" >=20 > On Fri, 12 Jun 2020 14:17:46 +0000 > Ciara Loftus wrote: >=20 > > This commit makes some changes to the AF_XDP PMD in an effort to > improve > > its packet loss characteristics. > > > > 1. In the case of failed transmission due to inability to reserve a tx > > descriptor, the PMD now pulls from the completion ring, issues a syscal= l > > in which the kernel attempts to complete outstanding tx operations, the= n > > tries to reserve the tx descriptor again. Prior to this we dropped the > > packet after the syscall and didn't try to re-reserve. > > > > 2. During completion ring cleanup, always pull as many entries as possi= ble > > from the ring as opposed to the batch size or just how many packets > > we're going to attempt to send. Keeping the completion ring emptier > should > > reduce failed transmissions in the kernel, as the kernel requires space= in > > the completion ring to successfully tx. > > > > 3. Size the fill ring as twice the receive ring size which may help red= uce > > allocation failures in the driver. > > > > With these changes, a benchmark which measured the packet rate at > which > > 0.01% packet loss could be reached improved from ~0.1G to ~3Gbps. > > > > Signed-off-by: Ciara Loftus >=20 > You might want to add the ability to emulate a tx_free threshold > by pulling more completions earlier. Thanks for the suggestion. I've implemented it in the v2. Ciara