Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp632233ybl; Wed, 21 Aug 2019 03:11:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxK176CAHPhZWROXwblBB7HWMCsBEzlL1+R2x03xeFe+bhvLPNPSraezB8ZxLQBis3qqKSy X-Received: by 2002:aa7:9713:: with SMTP id a19mr34774870pfg.64.1566382292585; Wed, 21 Aug 2019 03:11:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566382292; cv=none; d=google.com; s=arc-20160816; b=iuOfbHNYjuAzIxme/tmAu4Vp1jzIWr9IfbeUmx32c0OvRfkpu++AQ/sHzdPROzjRak 6cGVoIKN6uGNIYlNJM4o6IovjWSNZSNmanF7jMXfOQwG/FySwBfa5eLCxmN2xpYRNOcb dodpzKMOcPjl092c75HbFY4qAZXZUxtmEes1J9fMRsXd0X7vizdIUwRvjkdepZ3TtAHZ 4CVg7Krll7uikKrFly2vcsym8+mUzsa5Y86QR2SW2ZHfkRs+g3Yig4kqVWQvIKze1uV8 DOFoDnFySvwbgqLvmCapx9Mg1uqfrGm8CL1w4uXWIMCp2Vbr+GCBvcp/3uzOrWPNYVtR ln8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=QjBSZ/yjqCiujv9oHB6FSnYmTiQRXkpr1BrJyMitkHI=; b=D6ECw8FBhOCKFjir02kOYGmtOejrQuwLmKe3NmLzr5p8tFKitrCPI8K/57hPs7ATWv lbou33GvncMobj+gef8ghVifdMz80ZwXt8TWzECAP6qPAluibTd1p7dzNWaBRkxIs+wZ GJM/U05B8D9t0PzoZ8p4tcREXmLoK2YkUs6/yQp04sjTtdtjlRMU+McsPFgMW349xG3R B3roZrGm1BnhFsY/i5RZ+OfQByeOwvgmQL2/M9xHv6yHPqwLKhkPif4vvx9Pw5Kq5kTk ITKYehPpoOXO4dDTVhWbirDlOywWL5l/R3jxoyz6M1iOCprWlMCGXszQDQRwx1iyy+oP HpCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t25si14539009pgn.160.2019.08.21.03.11.16; Wed, 21 Aug 2019 03:11:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727253AbfHUKJL (ORCPT + 99 others); Wed, 21 Aug 2019 06:09:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55488 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726389AbfHUKJL (ORCPT ); Wed, 21 Aug 2019 06:09:11 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F05063003185; Wed, 21 Aug 2019 10:09:10 +0000 (UTC) Received: from [10.36.116.152] (ovpn-116-152.ams2.redhat.com [10.36.116.152]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 433F75B807; Wed, 21 Aug 2019 10:09:07 +0000 (UTC) From: "Eelco Chaudron" To: "Ilya Maximets" Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, "David S. Miller" , "=?utf-8?b?QmrDtnJuIFTDtnBlbA==?=" , "Magnus Karlsson" , "Jakub Kicinski" , "Alexei Starovoitov" , "Daniel Borkmann" , "Jeff Kirsher" , intel-wired-lan@lists.osuosl.org, "William Tu" Subject: Re: [PATCH net] ixgbe: fix double clean of tx descriptors with xdp Date: Wed, 21 Aug 2019 12:09:06 +0200 Message-ID: <9EFD9B47-2CD0-4D7A-BA22-D87018894E91@redhat.com> In-Reply-To: <20190820151611.10727-1-i.maximets@samsung.com> References: <20190820151611.10727-1-i.maximets@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 21 Aug 2019 10:09:11 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20 Aug 2019, at 17:16, Ilya Maximets wrote: > Tx code doesn't clear the descriptor status after cleaning. > So, if the budget is larger than number of used elems in a ring, some > descriptors will be accounted twice and xsk_umem_complete_tx will move > prod_tail far beyond the prod_head breaking the comletion queue ring. > > Fix that by limiting the number of descriptors to clean by the number > of used descriptors in the tx ring. > > Fixes: 8221c5eba8c1 ("ixgbe: add AF_XDP zero-copy Tx support") > Signed-off-by: Ilya Maximets > --- > > Not tested yet because of lack of available hardware. > So, testing is very welcome. > Hi Ilya, this patch fixes the issue I reported earlier on the Open vSwitch mailing list regarding complete queue overrun. Tested-by: Eelco Chaudron