All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Vladimir Vdovin" <deliran@verdict.gg>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v4 6/6] selftests: drv-net: add XDP RX checksum metadata tests
Date: Wed, 08 Jul 2026 20:41:55 +0000	[thread overview]
Message-ID: <20260708204156.659C11F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260708203410.45121-7-deliran@verdict.gg>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Multi-line comments in BPF code use the incorrect style (text on the same line as the opening `/*`).
--

--- Patch [6]: [PATCH bpf-next v4 6/6] selftests: drv-net: add XDP RX checksum metadata tests ---
commit 534009eb94d734041b26454f61107825d2b5f78e
Author: Vladimir Vdovin <deliran@verdict.gg>

selftests: drv-net: add XDP RX checksum metadata tests

This commit extends the xdp_metadata.py driver test with coverage for
bpf_xdp_metadata_rx_checksum(). It adds an xdp_rx_csum program to read
the RX checksum verdict and tests both valid and invalid RX checksum
scenarios on supported devices.

> diff --git a/tools/testing/selftests/net/lib/xdp_metadata.bpf.c b/tools/testing/selftests/net/lib/xdp_metadata.bpf.c
> index f71f59215239f..70decae0a6637 100644
> --- a/tools/testing/selftests/net/lib/xdp_metadata.bpf.c
> +++ b/tools/testing/selftests/net/lib/xdp_metadata.bpf.c
[ ... ]
> @@ -40,6 +41,24 @@ struct {
>  	__uint(max_entries, 4);
>  } map_rss SEC(".maps");
>  
> +/* RX checksum results: key 0 = ip_summed bitmask, key 1 = hw cksum value,
> + * key 2 = cksum level, key 3 = packet count, key 4 = error count.
> + */

[Severity: Low]
This isn't a bug, but the modern BPF multi-line comment style requires
the opening /* to be on its own line. Could this be updated so the text
starts on the next line?

> +enum {
> +	CSUM_KEY_IP_SUMMED = 0,
> +	CSUM_KEY_CKSUM = 1,
[ ... ]
> @@ -55,8 +74,20 @@ enum xdp_rss_hash_type {
>  	XDP_RSS_L4_ICMP = 1U << 8,
>  };
>  
> +/* Mirror of enum xdp_checksum from include/net/xdp.h.
> + * Needed because the enum is not part of UAPI headers.
> + */

[Severity: Low]
This isn't a bug, but this multi-line comment also has text on the same
line as the opening /*. Could this follow the preferred BPF multi-line
comment style?

> +enum xdp_checksum {
> +	XDP_CHECKSUM_NONE = 1U << 0,
> +	XDP_CHECKSUM_UNNECESSARY = 1U << 1,
[ ... ]
> @@ -78,41 +109,39 @@ static __always_inline __u16 get_dest_port(void *l4, void *data_end,
>  	return 0;
>  }
>  
> -SEC("xdp")
> -int xdp_rss_hash(struct xdp_md *ctx)
> +/* Return true when the packet matches the L4 protocol and destination
> + * port configured in map_xdp_setup (zero/unset filters match anything).
> + */

[Severity: Low]
This isn't a bug, but the opening /* should be on its own line here as well
to match the preferred BPF comment style.

> +static __always_inline bool xdp_match_setup(struct xdp_md *ctx)
>  {
>  	void *data_end = (void *)(long)ctx->data_end;
>  	void *data = (void *)(long)ctx->data;

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260708203410.45121-1-deliran@verdict.gg?part=6

  reply	other threads:[~2026-07-08 20:41 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08 20:34 [PATCH bpf-next v4 0/6] Add the capability to load HW RX checksum in eBPF programs Vladimir Vdovin
2026-07-08 20:34 ` [Intel-wired-lan] " Vladimir Vdovin
2026-07-08 20:34 ` [PATCH bpf-next v4 1/6] netlink: specs: Add XDP RX checksum capability to XDP metadata specs Vladimir Vdovin
2026-07-08 20:34   ` [Intel-wired-lan] " Vladimir Vdovin
2026-07-08 20:43   ` sashiko-bot
2026-07-10 10:09   ` Loktionov, Aleksandr
2026-07-10 10:09     ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-07-10 19:05   ` Stanislav Fomichev
2026-07-10 19:05     ` [Intel-wired-lan] " Stanislav Fomichev
2026-07-08 20:34 ` [PATCH bpf-next v4 2/6] net: veth: Add xmo_rx_checksum callback to veth driver Vladimir Vdovin
2026-07-08 20:34   ` [Intel-wired-lan] " Vladimir Vdovin
2026-07-08 20:54   ` sashiko-bot
2026-07-10 10:09   ` Loktionov, Aleksandr
2026-07-10 10:09     ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-07-08 20:34 ` [PATCH bpf-next v4 3/6] net: ice: Add xmo_rx_checksum callback Vladimir Vdovin
2026-07-08 20:34   ` [Intel-wired-lan] " Vladimir Vdovin
2026-07-08 20:43   ` sashiko-bot
2026-07-10 10:10   ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-07-10 10:10     ` Loktionov, Aleksandr
2026-07-08 20:34 ` [PATCH bpf-next v4 4/6] selftests/bpf: Add selftest support for bpf_xdp_metadata_rx_checksum Vladimir Vdovin
2026-07-08 20:34   ` [Intel-wired-lan] " Vladimir Vdovin
2026-07-08 20:34 ` [PATCH bpf-next v4 5/6] selftests/bpf: Add bpf_xdp_metadata_rx_checksum support to xdp_hw_metadat prog Vladimir Vdovin
2026-07-08 20:34   ` [Intel-wired-lan] " Vladimir Vdovin
2026-07-08 20:45   ` sashiko-bot
2026-07-10 10:11   ` Loktionov, Aleksandr
2026-07-10 10:11     ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-07-08 20:34 ` [PATCH bpf-next v4 6/6] selftests: drv-net: add XDP RX checksum metadata tests Vladimir Vdovin
2026-07-08 20:34   ` [Intel-wired-lan] " Vladimir Vdovin
2026-07-08 20:41   ` sashiko-bot [this message]
2026-07-10 10:12   ` Loktionov, Aleksandr
2026-07-10 10:12     ` Loktionov, Aleksandr

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=20260708204156.659C11F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=deliran@verdict.gg \
    --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.