From: Stanislav Fomichev <sdf@google.com>
To: Larysa Zaremba <larysa.zaremba@intel.com>
Cc: bpf@vger.kernel.org, Martin KaFai Lau <martin.lau@linux.dev>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>, Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>,
linux-kernel@vger.kernel.org,
Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
Jesper Dangaard Brouer <hawk@kernel.org>
Subject: Re: [PATCH bpf-next v2] selftests/bpf: add options and frags to xdp_hw_metadata
Date: Tue, 17 Oct 2023 09:41:30 -0700 [thread overview]
Message-ID: <CAKH8qBvrAQKhd=J+5HzVzrjmexk6ENwFjyGyxGV6e_9sRQg7Zw@mail.gmail.com> (raw)
In-Reply-To: <20231017162800.24080-1-larysa.zaremba@intel.com>
On Tue, Oct 17, 2023 at 9:35 AM Larysa Zaremba <larysa.zaremba@intel.com> wrote:
>
> This is a follow-up to the commit 9b2b86332a9b ("bpf: Allow to use kfunc
> XDP hints and frags together").
>
> The are some possible implementations problems that may arise when
> providing metadata specifically for multi-buffer packets, therefore there
> must be a possibility to test such option separately.
>
> Add an option to use multi-buffer AF_XDP xdp_hw_metadata and mark used XDP
> program as capable to use frags.
>
> As for now, xdp_hw_metadata accepts no options, so add simple option
> parsing logic and a help message.
>
> For quick reference, also add an ingress packet generation command to the
> help message. The command comes from [0].
>
> Example of output for multi-buffer packet:
>
> xsk_ring_cons__peek: 1
> 0xead018: rx_desc[15]->addr=10000000000f000 addr=f100 comp_addr=f000
> rx_hash: 0x5789FCBB with RSS type:0x29
> rx_timestamp: 1696856851535324697 (sec:1696856851.5353)
> XDP RX-time: 1696856843158256391 (sec:1696856843.1583)
> delta sec:-8.3771 (-8377068.306 usec)
> AF_XDP time: 1696856843158413078 (sec:1696856843.1584)
> delta sec:0.0002 (156.687 usec)
> 0xead018: complete idx=23 addr=f000
> xsk_ring_cons__peek: 1
> 0xead018: rx_desc[16]->addr=100000000008000 addr=8100 comp_addr=8000
> 0xead018: complete idx=24 addr=8000
> xsk_ring_cons__peek: 1
> 0xead018: rx_desc[17]->addr=100000000009000 addr=9100 comp_addr=9000 EoP
> 0xead018: complete idx=25 addr=9000
>
> Metadata is printed for the first packet only.
>
> [0] https://lore.kernel.org/all/20230119221536.3349901-18-sdf@google.com/
>
> Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
> ---
> V1 -> V2: drop gen_socket_config(), remove extra spaces in help message
Acked-by: Stanislav Fomichev <sdf@google.com>
Thanks!
next prev parent reply other threads:[~2023-10-17 16:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 16:27 [PATCH bpf-next v2] selftests/bpf: add options and frags to xdp_hw_metadata Larysa Zaremba
2023-10-17 16:41 ` Stanislav Fomichev [this message]
2023-10-18 8:20 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKH8qBvrAQKhd=J+5HzVzrjmexk6ENwFjyGyxGV6e_9sRQg7Zw@mail.gmail.com' \
--to=sdf@google.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=larysa.zaremba@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=martin.lau@linux.dev \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).