From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesper Dangaard Brouer Date: Tue, 5 Jun 2018 14:43:47 +0200 Subject: [Intel-wired-lan] [PATCH bpf-next 10/11] i40e: implement AF_XDP zero-copy support for Tx In-Reply-To: <20180604120601.18123-11-bjorn.topel@gmail.com> References: <20180604120601.18123-1-bjorn.topel@gmail.com> <20180604120601.18123-11-bjorn.topel@gmail.com> Message-ID: <20180605144347.34351ecc@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: intel-wired-lan@osuosl.org List-ID: On Mon, 4 Jun 2018 14:06:00 +0200 Bj?rn T?pel wrote: > Here, ndo_xsk_async_xmit is implemented. As a shortcut, the existing > XDP Tx rings are used for zero-copy. This will result in other devices > doing XDP_REDIRECT to an AF_XDP enabled queue will have its packets > dropped. This behavior is problematic, because XDP Tx rings are smp_processor_id based, and several RX queues can (via proc smp_affinity settings) be assigned to the same CPU. Thus, other RX-queues (than the AF_XDP enabled queue) can experience packet drops. And other devices doing redirect through i40e, which happen to run on a CPU which XDP Tx queue is "hijacked" will see dropped packets. Any plans to allocate/create a dedicated TX ring per AF_XDP socket? -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesper Dangaard Brouer Subject: Re: [PATCH bpf-next 10/11] i40e: implement AF_XDP zero-copy support for Tx Date: Tue, 5 Jun 2018 14:43:47 +0200 Message-ID: <20180605144347.34351ecc@redhat.com> References: <20180604120601.18123-1-bjorn.topel@gmail.com> <20180604120601.18123-11-bjorn.topel@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Cc: magnus.karlsson@intel.com, magnus.karlsson@gmail.com, alexander.h.duyck@intel.com, alexander.duyck@gmail.com, ast@fb.com, daniel@iogearbox.net, netdev@vger.kernel.org, mykyta.iziumtsev@linaro.org, john.fastabend@gmail.com, willemdebruijn.kernel@gmail.com, mst@redhat.com, michael.lundkvist@ericsson.com, jesse.brandeburg@intel.com, anjali.singhai@intel.com, qi.z.zhang@intel.com, francois.ozog@linaro.org, ilias.apalodimas@linaro.org, brian.brooks@linaro.org, andy@greyhouse.net, michael.chan@broadcom.com, intel-wired-lan@lists.osuosl.org, brouer@redhat.com To: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:47266 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751598AbeFEMoD (ORCPT ); Tue, 5 Jun 2018 08:44:03 -0400 In-Reply-To: <20180604120601.18123-11-bjorn.topel@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 4 Jun 2018 14:06:00 +0200 Björn Töpel wrote: > Here, ndo_xsk_async_xmit is implemented. As a shortcut, the existing > XDP Tx rings are used for zero-copy. This will result in other devices > doing XDP_REDIRECT to an AF_XDP enabled queue will have its packets > dropped. This behavior is problematic, because XDP Tx rings are smp_processor_id based, and several RX queues can (via proc smp_affinity settings) be assigned to the same CPU. Thus, other RX-queues (than the AF_XDP enabled queue) can experience packet drops. And other devices doing redirect through i40e, which happen to run on a CPU which XDP Tx queue is "hijacked" will see dropped packets. Any plans to allocate/create a dedicated TX ring per AF_XDP socket? -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer