From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [PATCH bpf-next 08/11] i40e: add AF_XDP zero-copy Rx support Date: Wed, 29 Aug 2018 21:14:28 +0200 Message-ID: <20180829211428.6cce4a1b@cakuba.netronome.com> References: <20180828124435.30578-1-bjorn.topel@gmail.com> <20180828124435.30578-9-bjorn.topel@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: magnus.karlsson@intel.com, magnus.karlsson@gmail.com, alexander.h.duyck@intel.com, alexander.duyck@gmail.com, ast@kernel.org, brouer@redhat.com, daniel@iogearbox.net, netdev@vger.kernel.org, jesse.brandeburg@intel.com, anjali.singhai@intel.com, peter.waskiewicz.jr@intel.com, =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , michael.lundkvist@ericsson.com, willemdebruijn.kernel@gmail.com, john.fastabend@gmail.com, neerav.parikh@intel.com, mykyta.iziumtsev@linaro.org, francois.ozog@linaro.org, ilias.apalodimas@linaro.org, brian.brooks@linaro.org, u9012063@gmail.com, pavel@fastnetmon.com, qi.z.zhang@intel.com To: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Return-path: Received: from mail-pf1-f193.google.com ([209.85.210.193]:42074 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726633AbeH2XM7 (ORCPT ); Wed, 29 Aug 2018 19:12:59 -0400 Received: by mail-pf1-f193.google.com with SMTP id l9-v6so2698913pff.9 for ; Wed, 29 Aug 2018 12:14:41 -0700 (PDT) In-Reply-To: <20180828124435.30578-9-bjorn.topel@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 28 Aug 2018 14:44:32 +0200, Bj=C3=B6rn T=C3=B6pel wrote: > From: Bj=C3=B6rn T=C3=B6pel >=20 > This patch adds zero-copy Rx support for AF_XDP sockets. Instead of > allocating buffers of type MEM_TYPE_PAGE_SHARED, the Rx frames are > allocated as MEM_TYPE_ZERO_COPY when AF_XDP is enabled for a certain > queue. >=20 > All AF_XDP specific functions are added to a new file, i40e_xsk.c. >=20 > Note that when AF_XDP zero-copy is enabled, the XDP action XDP_PASS > will allocate a new buffer and copy the zero-copy frame prior passing > it to the kernel stack. >=20 > Signed-off-by: Bj=C3=B6rn T=C3=B6pel Mm.. I'm surprised you don't run into buffer reuse issues that I had when playing with AF_XDP. What happens in i40e if someone downs the interface? Will UMEMs get destroyed? Will the RX buffers get freed? I'll shortly send an RFC with my quick and dirty RX buffer reuse queue, FWIW.