From patchwork Sun Mar 12 20:24:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Horatiu Vultur X-Patchwork-Id: 6492 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp866926wrd; Sun, 12 Mar 2023 13:37:22 -0700 (PDT) X-Google-Smtp-Source: AK7set8mJBONGlNjo/H8CJFfWllQpxUV4Q9VTq3BEnWDqMV1yBhzQ6fAB3fETkm/c/VQUVGwkgIf X-Received: by 2002:a05:6a20:698c:b0:cc:c5db:ea4a with SMTP id t12-20020a056a20698c00b000ccc5dbea4amr50329879pzk.33.1678653441862; Sun, 12 Mar 2023 13:37:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678653441; cv=none; d=google.com; s=arc-20160816; b=mloL5/NAq9XZhUsrkpkzXzP5+HYGy4qHzI3qS+hmJOSFQgaPheJATlQPc+T6rHpFjf KhrfHLU/ndXHbFi2qJA3LSDJJF9iFR6Tneq1M7zH9fYMIwN+Hs35Oa+0z4pz1H1s7a0D vA8mt/AGKbuA64RSdOhPXmQW/HtpEWJ3WqPM41Y/DSZJcCzfK8XE18SzhqJEjqQBrbfj AftlxKwblKEcI2N7Fo0M5lUT25x2aH8zALzG69OwuHJhUL757Iap4rS3T+IiMAZsLGtp Zv3rpyyDGKBtlymCL6Pi+fA91q3ta2RgUtTlcPKIndWlvssBhRlQDVcGrTtlUM4qLo4v gjJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=fHqmHedYyOKhaDbGL8exJbDlWixut8vRk48+6EfAgSk=; b=gaLJDqO7Z3iDmqhvxf/vE5a3FhZ+Da+81ai8k2JWw2BFQCoDSj6+YTJ6SxaI9rApDD lJb+Gb51NcxMLYlQPJ4L46LnGMVSgB8wRDkAbfFJPONErcpjcLqrTfWuuNmotsQggKGh 3o/WfvWtO3pK7vbA71Eihp8mvgl32w5deAz6+G6HndTWqny2wawM//piSg9FXeh9V3ht Gy1QOk5yfseyLJmhYBsuqguxEe12JMGeA5Jf2rOV+Qo1gbWKCeQLgqXR6wAX8oSvvzij Qj3FdImfB4JUoP9O5i1LM0tzxq8ciHM0ePeTzjcmw3jXM0Pw0hElKznTpN5Rk/bbwAll 7ATg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=0uviPUIR; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y19-20020aa79af3000000b00593b16f79a6si4862251pfp.231.2023.03.12.13.37.05; Sun, 12 Mar 2023 13:37:21 -0700 (PDT) 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=0uviPUIR; 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 S231150AbjCLUYh (ORCPT + 99 others); Sun, 12 Mar 2023 16:24:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230501AbjCLUYf (ORCPT ); Sun, 12 Mar 2023 16:24:35 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4661730E8A; Sun, 12 Mar 2023 13:24:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1678652671; x=1710188671; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=joNMncj/BiWcmzZcHvpg70xi30fS22mGS98IQ7jvZd0=; b=0uviPUIR14VZSZtOHwssU/LtCY0V7GL/quDOPOXPdH4MSK2vBiJgAg/S xKx3G04qW/YnPhkLcTakn4z6i9jJ8Ruk+/42B74AmuEaXhjbkyReCiep7 fBtPEsJvM/HZU+2tlaDORMYWQhQV7kNYdcO2JStvH3MK2YL0DjQWlOgWy f/+4DfvuJXLeMvVjY80In2skT8WcGC3zPbTjHpoSto9CM7iX/cVco7LPg 3zYRmpGp3+ab3TyAMG4sOg2/AUrP7ylmFwjMWorfQJoWec5gPHJ171dfI 4xy6r/LcyBMLoXAllYRCBTkpPxprl3vfKv5fmjpYX4fvazMhCjE8Cd1kk w==; X-IronPort-AV: E=Sophos;i="5.98,254,1673938800"; d="scan'208";a="201240583" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 12 Mar 2023 13:24:30 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Sun, 12 Mar 2023 13:24:29 -0700 Received: from soft-dev3-1.microsemi.net (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Sun, 12 Mar 2023 13:24:27 -0700 From: Horatiu Vultur To: , CC: , , , , , , Horatiu Vultur Subject: [PATCH net-next 0/2] net: lan966x: Improve TX/RX of frames from/to CPU Date: Sun, 12 Mar 2023 21:24:22 +0100 Message-ID: <20230312202424.1495439-1-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.38.0 MIME-Version: 1.0 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, RCVD_IN_MSPIKE_H2,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760195711259595155?= X-GMAIL-MSGID: =?utf-8?q?1760195711259595155?= The first patch of this series improves the RX side. As it seems to be an expensive operation to read the RX timestamp for every frame, then read it only if it is required. This will give an improvement of ~70mbit on the RX side. The second patch stops using the packing library. This improves mostly the TX side as this library is used to set diffent bits in the IFH. If this library is replaced with a more simple/shorter implementation, this gives an improvement of ~100mbit on TX side. All the measurements were done using iperf3. Horatiu Vultur (2): net: lan966x: Don't read RX timestamp if not needed net: lan966x: Stop using packing library .../net/ethernet/microchip/lan966x/Kconfig | 1 - .../ethernet/microchip/lan966x/lan966x_fdma.c | 2 +- .../ethernet/microchip/lan966x/lan966x_main.c | 77 +++++++++++++------ .../ethernet/microchip/lan966x/lan966x_main.h | 5 +- .../ethernet/microchip/lan966x/lan966x_ptp.c | 20 ++--- 5 files changed, 66 insertions(+), 39 deletions(-)