From: sashiko-bot@kernel.org
To: "Maciej Fijalkowski" <maciej.fijalkowski@intel.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH v4 net-next 11/15] selftests: xsk: send UDP over IPv4 or IPv6 between the interface MACs
Date: Sat, 17 Oct 2026 17:44:37 +0000 [thread overview]
Message-ID: <sashiko-outbox-175725@kernel.org> (raw)
In-Reply-To: <20261016174338.787135-12-maciej.fijalkowski@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] bpf: multi-line comment style violation
--
commit c93ec22f2ead9dd358b23391b62cb4c9037e31b7
Author: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
selftests: xsk: send UDP over IPv4 or IPv6 between the interface MACs
xskxceiver sends frames of the loopback ethertype between made-up MAC
addresses, and its XDP programs redirect every frame to the XSKMAP.
That suits a veth pair that carries nothing else, but not a physical
link, where the peer NIC filters out the made-up addresses and the
programs take neighbour discovery, LLDP or SSH away from the stack.
Send the test packets as UDP between the MAC addresses of the two
interfaces on any link. Each endpoint takes the IPv4 or IPv6 addresses
of the flow (--src-ip, --dst-ip), the MAC address of its peer
(--dst-mac) and the UDP port (--udp-port), and reads its own MAC
address from the interface. Over IPv4 the UDP checksum is left at zero,
as IPv4 allows; over IPv6 it is computed from the known payload.
PKT_HDR_SIZE and MIN_PKT_SIZE now stand for variables that
xsk_set_flow() sets, so the smallest packet grows with the headers to
64 bytes over IPv4 and 88 over IPv6, and a verbatim stream adds up the
descriptors of a packet for its IP and UDP lengths.
> diff --git a/tools/testing/selftests/net/lib/xsk/xsk_xdp_progs.bpf.c b/tools/testing/selftests/net/lib/xsk/xsk_xdp_progs.bpf.c
> index 023d8befd4cab..2b55dbaf13b24 100644
> --- a/tools/testing/selftests/net/lib/xsk/xsk_xdp_progs.bpf.c
> +++ b/tools/testing/selftests/net/lib/xsk/xsk_xdp_progs.bpf.c
> @@ -15,12 +23,64 @@ struct {
> __uint(value_size, sizeof(int));
> } xsk SEC(".maps");
>
> -static unsigned int idx;
> int adjust_value = 0;
> int count = 0;
> +/* UDP destination port of the test flow, other traffic goes to the stack */
> +__u16 test_port;
> +
> +/* Return the UDP header of a test packet, and in hdr_len the size of the
> + * headers in front of its payload, or NULL for any other packet.
> + */
[Severity: Low]
This is a minor coding style observation. The BPF subsystem prefers the
opening of multi-line comments to be on its own line. Should this be
formatted as follows?
/*
* Return the UDP header of a test packet, and in hdr_len the size of the
* headers in front of its payload, or NULL for any other packet.
*/
> +static __always_inline struct udphdr *test_udp_hdr(struct xdp_md *xdp,
> + __u32 *hdr_len)
> +{
> + void *data_end = (void *)(long)xdp->data_end;
> + void *data = (void *)(long)xdp->data;
> + struct ethhdr *eth = data;
> + struct ipv6hdr *ip6;
> + struct udphdr *udp;
> + struct iphdr *ip;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261016174338.787135-1-maciej.fijalkowski@intel.com?part=11
next prev parent reply other threads:[~2026-10-17 17:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 17:43 [PATCH v4 net-next 00/15] selftests: net: migrate AF_XDP test suite over to net Maciej Fijalkowski
2026-10-16 17:43 ` [PATCH v4 net-next 01/15] selftests: xsk: factor endpoint work out of pthread wrappers Maciej Fijalkowski
2026-10-16 17:43 ` [PATCH v4 net-next 02/15] selftests: xsk: size the TX UMEM in HW_SW_MAX_RING_SIZE Maciej Fijalkowski
2026-10-17 17:44 ` sashiko-bot
2026-10-16 17:43 ` [PATCH v4 net-next 03/15] selftests: xsk: drop the single-interface loopback mode Maciej Fijalkowski
2026-10-17 17:44 ` sashiko-bot
2026-10-16 17:43 ` [PATCH v4 net-next 04/15] selftests/bpf: drop the test_progs AF_XDP wrapper Maciej Fijalkowski
2026-10-16 17:43 ` [PATCH v4 net-next 05/15] selftests: net: add a generic rule for BPF skeletons Maciej Fijalkowski
2026-10-16 17:43 ` [PATCH v4 net-next 06/15] selftests: xsk: move the AF_XDP test suite to selftests/net Maciej Fijalkowski
2026-10-16 17:43 ` [PATCH v4 net-next 07/15] selftests: xsk: collect interface capabilities in struct xsk_caps Maciej Fijalkowski
2026-10-16 17:43 ` [PATCH v4 net-next 08/15] selftests: xsk: split xskxceiver main() into setup, run and cleanup Maciej Fijalkowski
2026-10-16 17:43 ` [PATCH v4 net-next 09/15] selftests: xsk: run one test case per xskxceiver invocation Maciej Fijalkowski
2026-10-17 17:44 ` sashiko-bot
2026-10-16 17:43 ` [PATCH v4 net-next 10/15] selftests: xsk: run the RX and TX endpoints in separate processes Maciej Fijalkowski
2026-10-16 17:43 ` [PATCH v4 net-next 11/15] selftests: xsk: send UDP over IPv4 or IPv6 between the interface MACs Maciej Fijalkowski
2026-10-17 17:44 ` sashiko-bot [this message]
2026-10-16 17:43 ` [PATCH v4 net-next 12/15] selftests: xsk: prepare xskxceiver for endpoints on two hosts Maciej Fijalkowski
2026-10-16 17:43 ` [PATCH v4 net-next 13/15] selftests: xsk: list the hardware test cases Maciej Fijalkowski
2026-10-16 17:43 ` [PATCH v4 net-next 14/15] selftests: drv-net: test AF_XDP zero-copy with an SKB peer Maciej Fijalkowski
2026-10-16 17:43 ` [PATCH v4 net-next 15/15] selftests: xsk: document generic and hardware endpoint runs Maciej Fijalkowski
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=sashiko-outbox-175725@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=sashiko-reviews@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.