mbox series

[net-next,v6,0/3] XDP Rx HWTS metadata for stmmac driver

Message ID 20230415064503.3225835-1-yoong.siang.song@intel.com (mailing list archive)
Headers show
Series XDP Rx HWTS metadata for stmmac driver | expand

Message

Song, Yoong Siang April 15, 2023, 6:45 a.m. UTC
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 <interface name>

Command on Link Partner:
	echo -n xdp | nc -u -q1 <destination IPv4 addr> 9091
	echo -n skb | nc -u -q1 <destination IPv4 addr> 9092

Result for port 9091:
	poll: 1 (0) skip=1 fail=0 redir=1
	xsk_ring_cons__peek: 1
	0x55f69f65f6d0: rx_desc[0]->addr=100000000008000 addr=8100 comp_addr=8000
	rx_timestamp: 1677762069053692631
	No rx_hash err=-95
	0x55f69f65f6d0: complete idx=8 addr=8000

Result for port 9092:
	poll: 1 (0) skip=2 fail=0 redir=1
	found skb hwtstamp = 1677762071.937207680

changelog:
v5 -> v6: improve field naming of struct stmmac_xdp_buff

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(-)

Comments

patchwork-bot+netdevbpf@kernel.org April 18, 2023, 2:10 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Sat, 15 Apr 2023 14:45:00 +0800 you wrote:
> 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 <interface name>
> 
> [...]

Here is the summary with links:
  - [net-next,v6,1/3] net: stmmac: introduce wrapper for struct xdp_buff
    https://git.kernel.org/netdev/net-next/c/5b24324a907c
  - [net-next,v6,2/3] net: stmmac: add Rx HWTS metadata to XDP receive pkt
    https://git.kernel.org/netdev/net-next/c/e3f9c3e34840
  - [net-next,v6,3/3] net: stmmac: add Rx HWTS metadata to XDP ZC receive pkt
    https://git.kernel.org/netdev/net-next/c/9570df353309

You are awesome, thank you!