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 13450A04F1; Wed, 17 Jun 2020 05:42:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6935A1BFC4; Wed, 17 Jun 2020 05:42:27 +0200 (CEST) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 28DD31BFAE for ; Wed, 17 Jun 2020 05:42:26 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id v11so595377pgb.6 for ; Tue, 16 Jun 2020 20:42:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DZuijdu2cCZm0Tw28FW1pwxdYsBUmJn7XiFuCb0yx80=; b=unm4ay04mJdvGqhxRiUNXOW+SRQXGanM8VjSO5qZoF8w0FoXv0uN5E47D6Iy08d9Q9 Coj7t0g7OBThfW3Q/2FJjgIDkz07e3HZPJm4hB1kg86i0MbeDNzxvF6ugXifvkxWWriH lg0gglh/uqDvIs+SAmo7cgh5+Cw/4ChNY3Bw5MNCIeTTbaEBDbWJZBMsdb+3C6/OurCl m6dd5YKawyKwsb9I0sDakx6A5NQU1a6nuNIWEdy07uYuF1mZPOtEImPmHnI56PNvnVHA AsyynaNMHVxdE2v9AULnB+Y5vAg9mo98//jwCo1rIc6zo/4X/a1oWRk7JyaUmYJAfmMq AAvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DZuijdu2cCZm0Tw28FW1pwxdYsBUmJn7XiFuCb0yx80=; b=ZzqTkktDGQgCcEwa/YlwKrczL4CAppHLGO7hfybvcsf7j1LDFlXNKdlqHN9mtqy9+0 NL87Q8z+oc9Lte5R9duFZS5igYoJFUbAqQlo1rgHALrLLGARxOCjfK9l+x1JKMNadG/6 aK7zO232lYBH96GBNOUCv7yhK9fHgFPBeh/qEvoBLYzNSdQKwAj8IypNZdT1fwfdeK02 38Qq86SP8/sXHBSl0A7yY9OCVhZPhpDvvXXzAl8hRVURwhXq8SonzOwyaL4DQSnmzBQP gG0LUmEFIWY1neOJb+dW6EwcuQ2HRbh2Unym73oaHHsqOeEUUiTqLIdnal/iyTuqaxWZ i0Rg== X-Gm-Message-State: AOAM530I1Cbka6aN+XHeS7inLxBQoQz7vIacF2GOAVd7qCuqvjXgFCA/ E1xuPblhmL0JJ07Oof/EeOcL1w== X-Google-Smtp-Source: ABdhPJzHNECJNHqgnJX1Nxwel870VbfA/4Mx3Zqb0BPOStaHyWo6QOUD/63uy1ijKzWV0vK7K0pq2A== X-Received: by 2002:a63:d34a:: with SMTP id u10mr4378194pgi.297.1592365345308; Tue, 16 Jun 2020 20:42:25 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id i14sm3818066pju.24.2020.06.16.20.42.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 20:42:24 -0700 (PDT) Date: Tue, 16 Jun 2020 20:42:16 -0700 From: Stephen Hemminger To: Ciara Loftus Cc: dev@dpdk.org, xiaolong.ye@intel.com, magnus.karlsson@intel.com Message-ID: <20200616204216.35e362b3@hermes.lan> In-Reply-To: <20200612141746.9450-1-ciara.loftus@intel.com> References: <20200612141746.9450-1-ciara.loftus@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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" On Fri, 12 Jun 2020 14:17:46 +0000 Ciara Loftus wrote: > 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 syscall > in which the kernel attempts to complete outstanding tx operations, then > 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 possible > 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 reduce > 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 You might want to add the ability to emulate a tx_free threshold by pulling more completions earlier.