Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1200646rwb; Thu, 10 Nov 2022 12:39:16 -0800 (PST) X-Google-Smtp-Source: AMsMyM6X4c0+sT8S55dIzCExp9VRlqTqvVYunaj7vNhH1dfwF9W/j2yEZ2a+L/RhJ5XdE5s9Gxn1 X-Received: by 2002:a62:7953:0:b0:561:7dc7:510b with SMTP id u80-20020a627953000000b005617dc7510bmr3412697pfc.3.1668112755805; Thu, 10 Nov 2022 12:39:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668112755; cv=none; d=google.com; s=arc-20160816; b=QqM+5l4/fAXVNjOrDY+7Wfi0exjSQnEaA2SEcDFpBfgm4UgYKJnBn5inw3d1yKRUzM YpUy98A0p9MTvRyBIyJWQvITjCmja/k6cRNtBVz/qZrV4LH+0amhx5qArrnPmX99FSGi QZ5qki+YAAWOqh84ihF/OANZmlcK2bEgAiKeXmsHEUeu5C6f+CeBSXGVXeHHLvIf3cUi JLxUiVIEkvAG0zUqj+mf7w5LjABZyPxBqk88ion2gEzZ+D/TTx0wm/LxZuzCTkfGim7b QzWP4d34lTjCPe7rI82ldo90aaMVYd6gMY+Y4+AM40ROGqudRxjVfMiviHJ9vDOenRAB e/aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=668GYRYBHMKuvq1jDq2ua+Lwc9rqRTahxAEthFkxBbo=; b=ztVsuRkk4y7iN7YgRqpql8sUhtKz0h02HpZJoOJpbod+tesP10cPh6/ahU7yvxdccu TIFfIXP+X9SVWxN6OG4JHUGcdyAs8PBdhGsyOMs0Ywwv7XJVbNROEsbjFThZLpmNMck3 1/DJ5WxXUjFGQzNKJqRh5E4owqIDG8jhL9qa4KfeDw8xHvHjncDxqibF/8KszNgb8PNX RH7FGQjCmQ8HwqDcp9PjZ1ZqWrxcJy76yvDvE1jz7ENTbCF9PMZQ/V8vMCnXIAxVDShr 6XxNSqnIqNk32P5GWyH3LDhV+qWu+bpJi33vrL+8EErCt2+T5CHALr92ngdtw1S7z1m3 R9Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=1Iglbzhe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ch14-20020a056a00288e00b0056c747dac83si221409pfb.62.2022.11.10.12.38.59; Thu, 10 Nov 2022 12:39:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=1Iglbzhe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231735AbiKJURI (ORCPT + 92 others); Thu, 10 Nov 2022 15:17:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230266AbiKJURF (ORCPT ); Thu, 10 Nov 2022 15:17:05 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB4584FF81; Thu, 10 Nov 2022 12:17:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1668111423; x=1699647423; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=5PLnax8XorRp3Zie4kgXRfWwQFyg+n9E8n1hQRXSQwk=; b=1Iglbzheq/lHp0o/cB+aDGpNc61GJ//KOICQj4gxnGJsUGS6jCE6isy6 OHrDWMcfGYJosZyPibHGrrbDldJojBnVsdsElMsmOsq+VQLA68XfgVQQu 7I/3RG7SUP/tCW3X9YRAEU8R9vfCJ0WOD/VqY25vzrUn4/ec3fe9hNfPc xnItxYDppcJPaVPl1Ge6Saf8OxsTf5Tu3rBXraS2F+W1P7rx348nz58qp lmQ44BI0ljPCynkLzuNZKwFLIBkUMy0pv+cstv2f7NaWt6ItgpMjJjuCB mrKfjEljAU1pYTXyISYuvYf9fhQF737da7SXppQ+0AFB6aenqDPtALmAN g==; X-IronPort-AV: E=Sophos;i="5.96,154,1665471600"; d="scan'208";a="186424713" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 10 Nov 2022 13:17:02 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 10 Nov 2022 13:17:01 -0700 Received: from localhost (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 10 Nov 2022 13:17:01 -0700 Date: Thu, 10 Nov 2022 21:21:47 +0100 From: Horatiu Vultur To: Alexander Lobakin CC: Andrew Lunn , , , , , , , , , , , , , Subject: Re: [PATCH net-next v3 0/4] net: lan966x: Add xdp support Message-ID: <20221110202147.hkhfvvb55djob43x@soft-dev3-1> References: <20221109204613.3669905-1-horatiu.vultur@microchip.com> <20221110111747.1176760-1-alexandr.lobakin@intel.com> <20221110162148.3533816-1-alexandr.lobakin@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <20221110162148.3533816-1-alexandr.lobakin@intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The 11/10/2022 17:21, Alexander Lobakin wrote: Hi, > > From: Andrew Lunn > Date: Thu, 10 Nov 2022 14:57:35 +0100 > > > > Nice stuff! I hear time to time that XDP is for 10G+ NICs only, but > > > I'm not a fan of such, and this series proves once again XDP fits > > > any hardware ^.^ > > > > The Freescale FEC recently gained XDP support. Many variants of it are > > Fast Ethernet only. > > > > What i found most interesting about that patchset was that the use of > > the page_ppol API made the driver significantly faster for the general > > case as well as XDP. > > The driver didn't have any page recycling or page splitting logics, > while Page Pool recycles even pages from skbs if > skb_mark_for_recycle() is used, which is the case here. So it > significantly reduced the number of new page allocations for Rx, if > there still are any at all. > Plus, Page Pool allocates pages by bulks (of 16 IIRC), not one by > one, that reduces CPU overhead as well. Just to make sure that everything is clear, those results that I have shown in the cover letter are without any XDP programs on the interfaces. Because I thought that is the correct comparison of the results before and after all these changes. Once I add an XDP program on the interface the performance drops. The program will look for some ether types and always return XDP_PASS. These are the results when I have such a XDP program on the interface: [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.01 sec 486 MBytes 408 Mbits/sec 0 sender [ 5] 0.00-10.00 sec 483 MBytes 405 Mbits/sec receiver > > > > > Andrew > > Thanks, > Olek -- /Horatiu