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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BA49C433EF for ; Sun, 14 Nov 2021 15:11:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 689106109E for ; Sun, 14 Nov 2021 15:11:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233032AbhKNPOp (ORCPT ); Sun, 14 Nov 2021 10:14:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229725AbhKNPOk (ORCPT ); Sun, 14 Nov 2021 10:14:40 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 273A4C061746; Sun, 14 Nov 2021 07:11:46 -0800 (PST) From: Kurt Kanzenbach DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1636902703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1kkq3dBvp9yP0qQAQfqCNJaAwZ1cH/dykhm1gc7U1DE=; b=vYJ8tPv3bsai8XxzNGduhUb1IKvTJSSmuIbZBy3nMOcGzBMjYZyqnHuz9yCL5HIEuRDB7H 97XC5Tsd6kSgTG5DQh8YFUHji/NG/fVBzcazmlSZpxo+8BtTbIA5L/Yuwcnys7USo0y1Fl UIrZtMrV/qQJguy9Mw8h5uA1/06LHdbQuduD2ehZhlrzz4zFj8zTTm13lkFyFYprl68vy0 MrMGNV9J4B+GByCzXVHqNh8JBY9SdTyd4Zu+zL8PRVCeQVF1elcybURbXbsFKpFrUdcyUU sckfG46gRzJTkbE6w799xEITQFSR99CfVIi4z6nneK83T0zkM1RZyy0E42H+Hw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1636902703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1kkq3dBvp9yP0qQAQfqCNJaAwZ1cH/dykhm1gc7U1DE=; b=qWwEbKfHle08FAuryZkVz3s5AzyG3q0EEIWSwNf5liyxjKTuIrjIq6uSqr4mqvwYJNEON0 pD3CKRcpWl55prDA== To: Ong Boon Leong , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Jakub Kicinski , Maxime Coquelin , alexandre.torgue@foss.st.com, Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Ong Boon Leong Subject: Re: [PATCH net-next 1/1] net: stmmac: enhance XDP ZC driver level switching performance In-Reply-To: <20211111143949.2806049-1-boon.leong.ong@intel.com> References: <20211111143949.2806049-1-boon.leong.ong@intel.com> Date: Sun, 14 Nov 2021 16:11:41 +0100 Message-ID: <87v90urcuq.fsf@kurt> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain On Thu Nov 11 2021, Ong Boon Leong wrote: > The previous stmmac_xdp_set_prog() implementation uses stmmac_release() > and stmmac_open() which tear down the PHY device and causes undesirable > autonegotiation which causes a delay whenever AFXDP ZC is setup. > > This patch introduces two new functions that just sufficiently tear > down DMA descriptors, buffer, NAPI process, and IRQs and reestablish > them accordingly in both stmmac_xdp_release() and stammac_xdp_open(). > > As the results of this enhancement, we get rid of transient state > introduced by the link auto-negotiation: > > $ ./xdpsock -i eth0 -t -z > > sock0@eth0:0 txonly xdp-drv > pps pkts 1.00 > rx 0 0 > tx 634444 634560 > > sock0@eth0:0 txonly xdp-drv > pps pkts 1.00 > rx 0 0 > tx 632330 1267072 > > sock0@eth0:0 txonly xdp-drv > pps pkts 1.00 > rx 0 0 > tx 632438 1899584 > > sock0@eth0:0 txonly xdp-drv > pps pkts 1.00 > rx 0 0 > tx 632502 2532160 > > Reported-by: Kurt Kanzenbach > Signed-off-by: Ong Boon Leong Tested-by: Kurt Kanzenbach --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCgAxFiEEooWgvezyxHPhdEojeSpbgcuY8KYFAmGRJy0THGt1cnRAbGlu dXRyb25peC5kZQAKCRB5KluBy5jwpivSD/0e/X3EiWzkobuBPwRB+/E+Anc/4S4/ lsMxq95qm2fzteKb8nUBUDNOxEtW+/tZv3SfBkt0waa1o3AR8Z70VVvE0lw4JXEb PoavzUhFWiRTZSDCuv6ANnlid1DH74eDkvZC9ICX95bDQ7XrqtHM6YpCFh3BAesw eZsYOfXOBgXXgBu9uUWQvYXelvyfMikSygUjQuSlHfGiuqRy1AmbYRFDUJFv4T1d DLjo2wNIyc+Nml/mitvwm6hHyG0YVd/zwkVD4EfEIp04ZcEgnJABsI/dOAoevjLa YaGWwnCSJDxb8PR5crfre74DwtypEgWbGg+p3fwbMy4EJ1rvJ7u44cUNafPJPmKs Juo5CFeeElks3qJ/S/gN5ssVWGb9QcnKgQu5MDTfu3/U21/LnoUg/Wbvrkn2275c srycG2sc7UH9oV6qxaxyG4l5xfZ8jOVLRB+rTRapv047wZuThETrxIg7Y2f7whf9 vY4mUYx1N3H0EJMGAqlUCKlIV8OWOLSx/NftbYKK+LkIsuDs8HQCD+xPJbSPXdS+ 6mVT0So4v5wX00LwP5bnoCmPCzMG2vGuYFFHNuT9QzRzSUQotS5W7blWY7hdpDYh aKNTbCwKvuL5Ao8bvbOYi+oVhribjafnM0O41ScxIatYg7diemQKuYi7DQ/kysr/ u+KICu9nMU5lZA== =Lx50 -----END PGP SIGNATURE----- --=-=-=-- 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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32057C433EF for ; Sun, 14 Nov 2021 15:13:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E2103610F9 for ; Sun, 14 Nov 2021 15:13:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E2103610F9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=roZwPpSlBEtz0GPEyzWQH+Ww7t8oUhm/Whbp1Mfniw8=; b=dVqytOK6SiIZdmnY0iVqbkpQIN 5h+oAXzXn1HCugaYYwNMP1OEPX6cKncJe1dZBMwb2679tRh8tK+ZsHqjP6EAIJOidZ/ICrjDGs7Ma 7i68Nid6r/MOo/wfY9tvhHpUCDM75oFmPpc8h9aeRRjDmAu7tu5o1U42ojaVcBeF26NUaNF8O3Kw6 Z9bNxd9tQQoTebZR16HWlROs2dqeHJ9k6XPF4WqlF4w9VIGesV20CnMfEE7g9tXLcto8BStvLlx94 VPQVrv7FKTLG1QQMR+8CQVpGaNsYdvFlvUZJuAwQvB523xUxNFPb4tu2C53rj11lqHHmiNvH1vFh5 SqUuA9Pg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmHAd-00Dn5x-Kn; Sun, 14 Nov 2021 15:11:51 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmHAa-00Dn55-5s for linux-arm-kernel@lists.infradead.org; Sun, 14 Nov 2021 15:11:49 +0000 From: Kurt Kanzenbach DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1636902703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1kkq3dBvp9yP0qQAQfqCNJaAwZ1cH/dykhm1gc7U1DE=; b=vYJ8tPv3bsai8XxzNGduhUb1IKvTJSSmuIbZBy3nMOcGzBMjYZyqnHuz9yCL5HIEuRDB7H 97XC5Tsd6kSgTG5DQh8YFUHji/NG/fVBzcazmlSZpxo+8BtTbIA5L/Yuwcnys7USo0y1Fl UIrZtMrV/qQJguy9Mw8h5uA1/06LHdbQuduD2ehZhlrzz4zFj8zTTm13lkFyFYprl68vy0 MrMGNV9J4B+GByCzXVHqNh8JBY9SdTyd4Zu+zL8PRVCeQVF1elcybURbXbsFKpFrUdcyUU sckfG46gRzJTkbE6w799xEITQFSR99CfVIi4z6nneK83T0zkM1RZyy0E42H+Hw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1636902703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1kkq3dBvp9yP0qQAQfqCNJaAwZ1cH/dykhm1gc7U1DE=; b=qWwEbKfHle08FAuryZkVz3s5AzyG3q0EEIWSwNf5liyxjKTuIrjIq6uSqr4mqvwYJNEON0 pD3CKRcpWl55prDA== To: Ong Boon Leong , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Jakub Kicinski , Maxime Coquelin , alexandre.torgue@foss.st.com, Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Ong Boon Leong Subject: Re: [PATCH net-next 1/1] net: stmmac: enhance XDP ZC driver level switching performance In-Reply-To: <20211111143949.2806049-1-boon.leong.ong@intel.com> References: <20211111143949.2806049-1-boon.leong.ong@intel.com> Date: Sun, 14 Nov 2021 16:11:41 +0100 Message-ID: <87v90urcuq.fsf@kurt> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211114_071148_416522_604F2953 X-CRM114-Status: GOOD ( 10.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============5851306865223905326==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============5851306865223905326== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain On Thu Nov 11 2021, Ong Boon Leong wrote: > The previous stmmac_xdp_set_prog() implementation uses stmmac_release() > and stmmac_open() which tear down the PHY device and causes undesirable > autonegotiation which causes a delay whenever AFXDP ZC is setup. > > This patch introduces two new functions that just sufficiently tear > down DMA descriptors, buffer, NAPI process, and IRQs and reestablish > them accordingly in both stmmac_xdp_release() and stammac_xdp_open(). > > As the results of this enhancement, we get rid of transient state > introduced by the link auto-negotiation: > > $ ./xdpsock -i eth0 -t -z > > sock0@eth0:0 txonly xdp-drv > pps pkts 1.00 > rx 0 0 > tx 634444 634560 > > sock0@eth0:0 txonly xdp-drv > pps pkts 1.00 > rx 0 0 > tx 632330 1267072 > > sock0@eth0:0 txonly xdp-drv > pps pkts 1.00 > rx 0 0 > tx 632438 1899584 > > sock0@eth0:0 txonly xdp-drv > pps pkts 1.00 > rx 0 0 > tx 632502 2532160 > > Reported-by: Kurt Kanzenbach > Signed-off-by: Ong Boon Leong Tested-by: Kurt Kanzenbach --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCgAxFiEEooWgvezyxHPhdEojeSpbgcuY8KYFAmGRJy0THGt1cnRAbGlu dXRyb25peC5kZQAKCRB5KluBy5jwpivSD/0e/X3EiWzkobuBPwRB+/E+Anc/4S4/ lsMxq95qm2fzteKb8nUBUDNOxEtW+/tZv3SfBkt0waa1o3AR8Z70VVvE0lw4JXEb PoavzUhFWiRTZSDCuv6ANnlid1DH74eDkvZC9ICX95bDQ7XrqtHM6YpCFh3BAesw eZsYOfXOBgXXgBu9uUWQvYXelvyfMikSygUjQuSlHfGiuqRy1AmbYRFDUJFv4T1d DLjo2wNIyc+Nml/mitvwm6hHyG0YVd/zwkVD4EfEIp04ZcEgnJABsI/dOAoevjLa YaGWwnCSJDxb8PR5crfre74DwtypEgWbGg+p3fwbMy4EJ1rvJ7u44cUNafPJPmKs Juo5CFeeElks3qJ/S/gN5ssVWGb9QcnKgQu5MDTfu3/U21/LnoUg/Wbvrkn2275c srycG2sc7UH9oV6qxaxyG4l5xfZ8jOVLRB+rTRapv047wZuThETrxIg7Y2f7whf9 vY4mUYx1N3H0EJMGAqlUCKlIV8OWOLSx/NftbYKK+LkIsuDs8HQCD+xPJbSPXdS+ 6mVT0So4v5wX00LwP5bnoCmPCzMG2vGuYFFHNuT9QzRzSUQotS5W7blWY7hdpDYh aKNTbCwKvuL5Ao8bvbOYi+oVhribjafnM0O41ScxIatYg7diemQKuYi7DQ/kysr/ u+KICu9nMU5lZA== =Lx50 -----END PGP SIGNATURE----- --=-=-=-- --===============5851306865223905326== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============5851306865223905326==--