From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FFCFC433E0 for ; Thu, 18 Mar 2021 15:48:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0507264F2A for ; Thu, 18 Mar 2021 15:48:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230416AbhCRPr4 (ORCPT ); Thu, 18 Mar 2021 11:47:56 -0400 Received: from www62.your-server.de ([213.133.104.62]:57776 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230367AbhCRPru (ORCPT ); Thu, 18 Mar 2021 11:47:50 -0400 Received: from sslproxy06.your-server.de ([78.46.172.3]) by www62.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1lMusB-00090F-Vr; Thu, 18 Mar 2021 16:47:44 +0100 Received: from [85.7.101.30] (helo=pc-9.home) by sslproxy06.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMusB-000V3X-Fc; Thu, 18 Mar 2021 16:47:43 +0100 Subject: Re: [PATCH v3 bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT To: Lorenzo Bianconi , bpf@vger.kernel.org Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org, ast@kernel.org, brouer@redhat.com, toke@redhat.com, freysteinn.alfredsson@kau.se, lorenzo.bianconi@redhat.com, john.fastabend@gmail.com, jasowang@redhat.com, mst@redhat.com, thomas.petazzoni@bootlin.com, mw@semihalf.com, linux@armlinux.org.uk, ilias.apalodimas@linaro.org, netanel@amazon.com, akiyano@amazon.com, michael.chan@broadcom.com, madalin.bucur@nxp.com, ioana.ciornei@nxp.com, jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, saeedm@nvidia.com, grygorii.strashko@ti.com, ecree.xilinx@gmail.com, maciej.fijalkowski@intel.com References: From: Daniel Borkmann Message-ID: <38ae780a-f54a-cba2-1648-07926e646ed0@iogearbox.net> Date: Thu, 18 Mar 2021 16:47:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.102.4/26112/Thu Mar 18 12:08:11 2021) Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On 3/8/21 12:06 PM, Lorenzo Bianconi wrote: > We want to change the current ndo_xdp_xmit drop semantics because > it will allow us to implement better queue overflow handling. > This is working towards the larger goal of a XDP TX queue-hook. > Move XDP_REDIRECT error path handling from each XDP ethernet driver to > devmap code. According to the new APIs, the driver running the > ndo_xdp_xmit pointer, will break tx loop whenever the hw reports a tx > error and it will just return to devmap caller the number of successfully > transmitted frames. It will be devmap responsability to free dropped > frames. > Move each XDP ndo_xdp_xmit capable driver to the new APIs: > - veth > - virtio-net > - mvneta > - mvpp2 > - socionext > - amazon ena > - bnxt > - freescale (dpaa2, dpaa) > - xen-frontend > - qede > - ice > - igb > - ixgbe > - i40e > - mlx5 > - ti (cpsw, cpsw-new) > - tun > - sfc > > Acked-by: Edward Cree > Reviewed-by: Ioana Ciornei > Reviewed-by: Ilias Apalodimas > Signed-off-by: Lorenzo Bianconi Applied, thanks!