[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230414052651.1871424-1-yoong.siang.song@intel.com>
Date: Fri, 14 Apr 2023 13:26:48 +0800
From: Song Yoong Siang <yoong.siang.song@...el.com>
To: Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Jesper Dangaard Brouer <hawk@...nel.org>,
John Fastabend <john.fastabend@...il.com>,
Stanislav Fomichev <sdf@...gle.com>,
Alexander Duyck <alexanderduyck@...com>,
Jesper Dangaard Brouer <brouer@...hat.com>,
Ong Boon Leong <boon.leong.ong@...el.com>,
Jacob Keller <jacob.e.keller@...el.com>
Cc: netdev@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
bpf@...r.kernel.org, xdp-hints@...-project.net,
Song Yoong Siang <yoong.siang.song@...el.com>
Subject: [PATCH net-next v5 0/3] XDP Rx HWTS metadata for stmmac driver
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:
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
Powered by blists - more mailing lists