From patchwork Mon Apr 10 10:09:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Song, Yoong Siang" X-Patchwork-Id: 13206246 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C9000C77B61 for ; Mon, 10 Apr 2023 10:11:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=j6In5/Xsf35KWuRdZLska81j5BetbJpesynHpGsmnE0=; b=M8Xyd8PSu2omUn 0jmnuDHnwCAr7sEQm9aeA6vV1xtJ413DjTDuV0vXSbdIyLsRsJVeOt1zDDqfQkO4nOlc7CjBuc1TZ PtHw3PWLkuZAhCpvoEdAIbP4GrDvVzk7NN24J+pB8c+FfmH+kbQJ+976V0TPoTIcvfjMEK4+Y2V5V gI93akDuZYYd0qWu+3z2WmShIyg+UzP7zhHcic1I1NGZK26RsUPO4yHiIrafQ9rou5Z+j5A2+Rj87 F2Y49GTu0x8u5HJKJ5NbgZjlR2zJxfiSSM6ho76cnHqGZpJUKBYM9T4FvsXQZK8DxP/tPQlI7HxYa mKDvVbK61JA1+2QwOc/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ploTi-00EwH3-0D; Mon, 10 Apr 2023 10:10:26 +0000 Received: from mga11.intel.com ([192.55.52.93]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ploTe-00EwG2-1v for linux-arm-kernel@lists.infradead.org; Mon, 10 Apr 2023 10:10:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681121422; x=1712657422; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=8eoxuz0kULjCVGWAEGYIGKMQ5ODOXKen7qD6Fb3jxRI=; b=MTGaI6APh0gr4Av3pCMZwOQsJuupRb+IDsRvNqzKeFj6J+7pPrY+Ucii bUDCUkHc/hkW+TCqIBogS5vN+DD2T4i/vQKr3T6u4it72QSNLIHoORDLN ewZnmODWHJSqhUJhll0Ew0pySX0YByvpCYypuDnzLTSfvpJGv6x0/cboL hPP4ML2iD6kd+ESZJxOJDpNt8ywAQYmFBjsqdxMGDrnXs1uH0/vBt7t/c 0N1R0bQHXDDD1bhv5SayH9j9p1hE6R9QS5PYihCKMFVzPK8OLOUZesDpq LHrtQDRx0nEiBFhN1tknItyh8R+H4BHL7tVsxL/Jt13LhXvnOXhyYAYPK A==; X-IronPort-AV: E=McAfee;i="6600,9927,10675"; a="340815284" X-IronPort-AV: E=Sophos;i="5.98,333,1673942400"; d="scan'208";a="340815284" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2023 03:10:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10675"; a="752715966" X-IronPort-AV: E=Sophos;i="5.98,333,1673942400"; d="scan'208";a="752715966" Received: from p12ill20yoongsia.png.intel.com ([10.88.227.28]) by fmsmga008.fm.intel.com with ESMTP; 10 Apr 2023 03:10:14 -0700 From: Song Yoong Siang To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Stanislav Fomichev , Alexander Duyck , Ong Boon Leong 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, xdp-hints@xdp-project.net, Song Yoong Siang Subject: [PATCH net-next 0/4] XDP Rx HWTS metadata for stmmac driver Date: Mon, 10 Apr 2023 18:09:35 +0800 Message-Id: <20230410100939.331833-1-yoong.siang.song@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230410_031022_684375_AB073DA3 X-CRM114-Status: UNSURE ( 7.72 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Implemented XDP receive hardware timestamp metadata for stmmac driver. This patchset is tested with tools/testing/selftests/bpf/xdp_hw_metadata. Below are the test steps and results. Command on DUT: sudo ./xdp_hw_metadata Command on Link Partner: echo -n xdp | nc -u -q1 9091 echo -n skb | nc -u -q1 9092 Result for port 9091: 0x55fdb5f006d0: rx_desc[3]->addr=1000000003bd000 addr=3bd100 comp_addr=3bd000 rx_timestamp: 1677762474360150047 rx_hash: 0 0x55fdb5f006d0: complete idx=515 addr=3bd000 Result for port 9092: found skb hwtstamp = 1677762476.320146161 --- Ong Boon Leong (1): net: stmmac: restructure Rx hardware timestamping function Song Yoong Siang (3): net: stmmac: introduce wrapper for struct xdp_buff net: stmmac: add Rx HWTS metadata to XDP receive pkt net: stmmac: add Rx HWTS metadata to XDP ZC receive pkt drivers/net/ethernet/stmicro/stmmac/stmmac.h | 5 ++ .../net/ethernet/stmicro/stmmac/stmmac_main.c | 88 ++++++++++++++----- 2 files changed, 73 insertions(+), 20 deletions(-)