[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <PH0PR11MB58304082BF0EA96D1A74E4C5D8132@PH0PR11MB5830.namprd11.prod.outlook.com>
Date: Thu, 9 Jan 2025 07:06:17 +0000
From: "Song, Yoong Siang" <yoong.siang.song@...el.com>
To: Stanislav Fomichev <stfomichev@...il.com>
CC: "David S . Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
<pabeni@...hat.com>, Simon Horman <horms@...nel.org>, Willem de Bruijn
<willemb@...gle.com>, "Bezdeka, Florian" <florian.bezdeka@...mens.com>,
Donald Hunter <donald.hunter@...il.com>, Jonathan Corbet <corbet@....net>,
Bjorn Topel <bjorn@...nel.org>, "Karlsson, Magnus"
<magnus.karlsson@...el.com>, "Fijalkowski, Maciej"
<maciej.fijalkowski@...el.com>, Jonathan Lemon <jonathan.lemon@...il.com>,
Andrew Lunn <andrew+netdev@...n.ch>, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, Jesper Dangaard Brouer
<hawk@...nel.org>, John Fastabend <john.fastabend@...il.com>, "Damato, Joe"
<jdamato@...tly.com>, Stanislav Fomichev <sdf@...ichev.me>, Xuan Zhuo
<xuanzhuo@...ux.alibaba.com>, Mina Almasry <almasrymina@...gle.com>, "Daniel
Jurgens" <danielj@...dia.com>, Amritha Nambiar <amritha.nambiar@...el.com>,
Andrii Nakryiko <andrii@...nel.org>, Eduard Zingerman <eddyz87@...il.com>,
Mykola Lysenko <mykolal@...com>, Martin KaFai Lau <martin.lau@...ux.dev>,
Song Liu <song@...nel.org>, Yonghong Song <yonghong.song@...ux.dev>, KP Singh
<kpsingh@...nel.org>, Hao Luo <haoluo@...gle.com>, Jiri Olsa
<jolsa@...nel.org>, Shuah Khan <shuah@...nel.org>, Alexandre Torgue
<alexandre.torgue@...s.st.com>, Jose Abreu <joabreu@...opsys.com>, "Maxime
Coquelin" <mcoquelin.stm32@...il.com>, "Nguyen, Anthony L"
<anthony.l.nguyen@...el.com>, "Kitszel, Przemyslaw"
<przemyslaw.kitszel@...el.com>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "linux-doc@...r.kernel.org"
<linux-doc@...r.kernel.org>, "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
"linux-stm32@...md-mailman.stormreply.com"
<linux-stm32@...md-mailman.stormreply.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "intel-wired-lan@...ts.osuosl.org"
<intel-wired-lan@...ts.osuosl.org>, "xdp-hints@...-project.net"
<xdp-hints@...-project.net>
Subject: RE: [PATCH bpf-next v4 3/4] net: stmmac: Add launch time support to
XDP ZC
On Wednesday, January 8, 2025 1:08 AM, Stanislav Fomichev <stfomichev@...il.com> wrote:
>On 01/06, Song Yoong Siang wrote:
>> Enable launch time (Time-Based Scheduling) support to XDP zero copy via XDP
>> Tx metadata framework.
>>
>> This patch is tested with tools/testing/selftests/bpf/xdp_hw_metadata on
>> Intel Tiger Lake platform. Below are the test steps and result.
>>
>> Test Steps:
>> 1. Add mqprio qdisc:
>> $ sudo tc qdisc add dev enp0s30f4 handle 8001: parent root mqprio num_tc
>> 4 map 0 1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 queues 1@0 1@1 1@2 1@3 hw 0
>>
>> 2. Enable launch time hardware offload on hardware queue 1:
>> $ sudo tc qdisc replace dev enp0s30f4 parent 8001:2 etf offload clockid
>> CLOCK_TAI delta 500000
>>
>> 3. Add an ingress qdisc:
>> $ sudo tc qdisc add dev enp0s30f4 ingress
>>
>> 4. Add a flower filter to route incoming packet with VLAN priority 1 into
>> hardware queue 1:
>> $ sudo tc filter add dev enp0s30f4 parent ffff: protocol 802.1Q flower
>> vlan_prio 1 hw_tc 1
>>
>> 5. Enable VLAN tag stripping:
>> $ sudo ethtool -K enp0s30f4 rxvlan on
>>
>> 6. Start xdp_hw_metadata selftest application:
>> $ sudo ./xdp_hw_metadata enp0s30f4 -l 1000000000
>>
>> 7. Send an UDP packet with VLAN priority 1 to port 9091 of DUT.
>
>Tangential: I wonder whether we can add the setup steps to the
>xdp_hw_metadata tool? It is useful to have one command to run that
>takes care of all the details. Same way it already enables HW
>tstamping..
>
>Or, if not the full setup, some kind of detection we can signal to the
>user that some things might be missing?
Sure. I can try to add the setup steps into xdp_hw_metadata
by using ioctl() function. However, there are some device specific
command, like the number of queue, their priority,
how they route the incoming packet, etc. I will try to find out
a common way that can work for most of the devices,
at least work for both igc and stmmac.
Thanks & Regards
Siang
Powered by blists - more mailing lists