From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mail.toke.dk (Postfix) with ESMTPS id 514349FDD44 for ; Fri, 14 Apr 2023 07:27:37 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=iptNLBxy DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681450058; x=1712986058; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=5n/0mu42zjwQFiX1Bk2YBnMsraHX2+ZdlcxSeNpwlQA=; b=iptNLBxyZSL7txab7l2LSwr7hKK5GQ/jLgzk7nDgWucNqdJ0BcPUhF7h 1DsAY1ja7UyQIXZecjXdmzS07UXPU5Cw0yAqaHHJYY0mC+0/iRqk/VDPC FE9SHSxW1H6b2n9A8adh1cElRmj8bPoIlCslJPFn0ANGTZgbcPo29L48L tEZ+nnYdLqmESGhhhewzzD2tlGw6/u2048NgAEeYKrviCmPYIod92v2rs h0y3LpuGiIe+Djkgmmk7SoGjsOq1sEgHCrdQkB8Q48U5NdwVp2pkwFIeP qov4w32acw0vEMm4KzkfwChdssvf7pvXMe324KCgAXJ4kug017+uvogq1 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10679"; a="333152647" X-IronPort-AV: E=Sophos;i="5.99,195,1677571200"; d="scan'208";a="333152647" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2023 22:27:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10679"; a="692234132" X-IronPort-AV: E=Sophos;i="5.99,195,1677571200"; d="scan'208";a="692234132" Received: from p12ill20yoongsia.png.intel.com ([10.88.227.28]) by fmsmga007.fm.intel.com with ESMTP; 13 Apr 2023 22:27:28 -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 , Jesper Dangaard Brouer , Ong Boon Leong , Jacob Keller Date: Fri, 14 Apr 2023 13:26:48 +0800 Message-Id: <20230414052651.1871424-1-yoong.siang.song@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: U4B3FD5UL3M5MZEYH4F77C4TFDT47Z3W X-Message-ID-Hash: U4B3FD5UL3M5MZEYH4F77C4TFDT47Z3W X-MailFrom: yoong.siang.song@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header 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 X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] [PATCH net-next v5 0/3] XDP Rx HWTS metadata for stmmac driver List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 changelog: v4 -> v5: remove zeroing operation on ctx variable v3 -> v4: directly retrieve Rx HWTS in stmmac_xdp_rx_timestamp(), instead of reuse stmmac_get_rx_hwtstamp() v2 -> v3: To reduce packet processing cost, get the Rx HWTS only when xmo_rx_timestamp() is called v1 -> v2: Add static to stmmac_xdp_metadata_ops declaration --- 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 | 7 ++ .../net/ethernet/stmicro/stmmac/stmmac_main.c | 80 ++++++++++++++++--- 2 files changed, 77 insertions(+), 10 deletions(-) -- 2.34.1