Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp615530ybl; Thu, 22 Aug 2019 02:08:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuSe0piMzHEf7H+WPNu5HSE/tSrpQSfJWfg/KZMFfCsuYNd5JMZeEbw/pMFmJQJR3vmLzN X-Received: by 2002:a63:2a08:: with SMTP id q8mr32516373pgq.415.1566464894446; Thu, 22 Aug 2019 02:08:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566464894; cv=none; d=google.com; s=arc-20160816; b=kASpaD4JTshatipT77ZzDrgq6qH5/gIyX+vy5EpM1GoXqAE6Z9RWY3HfrMWh7lm2fk Lr2rW3ecRbikgmkD8P7XkRjU5gh/NNin6wVUiU4th4idtlMOCgUofJADVx+sg6JNtOQw RvBL2AuxC4CrLC1Qd7QwGtAhFMppHVeZOM62k0jqaLeI8dP34dfbOD5Ol+n1UY67Ot9s xAlKpVnxhPrAvT7rMTZRrfKCslshbgaOJ2+OIYb7mwdyZSYICTwNKOKrgRaqvBX87TmZ pP/Y9AulQQXvAupDhHz4jceesdOvHZBYY1ecgQiY7BdiW2zoBtRjw7uftdkBKv78bamm ze/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=SjGrToOEWeMlpOS5e+zEaXYac5JbBU5qP/ippadIYok=; b=M4kaJKZPc6579n3c2jQEoh4+bNtQaKQJYyqs0T64x7sZ83T/8TLYNMzdfwFoURqo88 0vDxCzlDYN8u5z07e1z8W79IzeNzCcqziv8QhtfM90o9PjuId2Wn40hTCN/jZsnHbVXK 5U/26mMS09tRx99/eO8rTTN1tM1JzDnUwelmn368hsuMzo2jgJJcgbiLDBjipiEp/Zv5 KIL2ksShIU7O2EkT8situDjQ3JLd43rUDD69VIBIxOgCZC9ObWedAPGi7gA9yicYaiVN kCK8r9ynv+I1czy10c5M3rdlXu7J2W8vNB4mQ0oVB+lMeGDzdCTQr0KoJC+QDYD2Z6bw 8eVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LKZVyQ6y; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h12si16931677pls.334.2019.08.22.02.07.59; Thu, 22 Aug 2019 02:08:14 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LKZVyQ6y; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730869AbfHVHLM (ORCPT + 99 others); Thu, 22 Aug 2019 03:11:12 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:42039 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728104AbfHVHLL (ORCPT ); Thu, 22 Aug 2019 03:11:11 -0400 Received: by mail-qt1-f195.google.com with SMTP id t12so6406787qtp.9; Thu, 22 Aug 2019 00:11:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=SjGrToOEWeMlpOS5e+zEaXYac5JbBU5qP/ippadIYok=; b=LKZVyQ6y7LhITaq+dPNulHmPllHIo9YQhD3YZH4XHzKUvfTokHfwav/6NZaHD1+CtO gMotuBGp+Mk7z/XTZdAJdM4t1YA/CBt9XKwUyCVSJ646dW8zOSqxckjP8toX4sTJCyY3 sbdvq4944IWRmom98sAuYG8taznl2tiSGQBSy6yocpOMJyqB5o3QEgjbLZKr+/w34CXd D6FQbNXH/1PaHdbzcZgDTqBPepq9QB7RJWrFVIhaUC4vaeJLHtrUdPr5omqlEnI7WSVa WUbqIv7EW+sOGyKiD4wxQR6JkbdbGcWrFa+dAY2uI9HaGDnoEFMKtEc3Q4WJo54N3bHV n4rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=SjGrToOEWeMlpOS5e+zEaXYac5JbBU5qP/ippadIYok=; b=mzbkxoYVWzSj6GwBn0YyzA8JRXS7PN/fPBhzsAoC8IFFncso+QdZqUuI0775xPHFRm Ubi7ZTUo4BZcD79Zu/xrxZlRd96ewJayafj6s1aMOanIHPnydh/xUXsEkJCnQvf9vBsi J3v580RddQECDOFzqTTgLYMHI8SiEGteiujf4jZK95Ei90G7lfMkGBMd5b+JGw/NzdX/ f/305t7wIbwbJtbU7iUJTi1EU3S7EBwb/M/rvM6ltb0Rz0yw81J0mZoh47+vOeDE3l5w 0PrEbEQM99w7wcF2FdtLjxdNkNTU3zd77QfU/bFyau8S1tWh9UjF0DYHSnKcDaevx/Ys 0zlw== X-Gm-Message-State: APjAAAXeqDWn8oDYACXlQ8uYriVroXFXQUvGyvrIM3xY9rvxjWM5fcbN /o/LEZggj/VYQTH1SnFnQhsUCMwsroJZBOfiF90= X-Received: by 2002:ac8:5247:: with SMTP id y7mr36273264qtn.107.1566457870403; Thu, 22 Aug 2019 00:11:10 -0700 (PDT) MIME-Version: 1.0 References: <20190820151611.10727-1-i.maximets@samsung.com> <625791af-c656-1e42-b60e-b3a5cedcb4c4@samsung.com> In-Reply-To: From: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Date: Thu, 22 Aug 2019 09:10:58 +0200 Message-ID: Subject: Re: [Intel-wired-lan] [PATCH net] ixgbe: fix double clean of tx descriptors with xdp To: Ilya Maximets Cc: Alexander Duyck , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Jakub Kicinski , Daniel Borkmann , Netdev , William Tu , LKML , Alexei Starovoitov , intel-wired-lan , bpf , "David S. Miller" , Magnus Karlsson , Eelco Chaudron Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 21 Aug 2019 at 18:22, Ilya Maximets wrote: > > On 21.08.2019 4:17, Alexander Duyck wrote: > > On Tue, Aug 20, 2019 at 8:58 AM Ilya Maximets = wrote: > >> > >> On 20.08.2019 18:35, Alexander Duyck wrote: [...] > > > > So is it always in the same NAPI context?. I forgot, I was thinking > > that somehow the socket could possibly make use of XDP for transmit. > > AF_XDP socket only triggers tx interrupt on ndo_xsk_async_xmit() which > is used in zero-copy mode. Real xmit happens inside > ixgbe_poll() > -> ixgbe_clean_xdp_tx_irq() > -> ixgbe_xmit_zc() > > This should be not possible to bound another XDP socket to the same netde= v > queue. > > It also possible to xmit frames in xdp_ring while performing XDP_TX/REDIR= ECT > actions. REDIRECT could happen from different netdev with different NAPI > context, but this operation is bound to specific CPU core and each core h= as > its own xdp_ring. > > However, I'm not an expert here. > Bj=C3=B6rn, maybe you could comment on this? > Yes, you're correct Ilya.