From: sashiko-bot@kernel.org
To: "Vladimir Vdovin" <deliran@verdict.gg>
Cc: bpf@vger.kernel.org
Subject: Re: [RFC PATCH bpf-next v1 5/7] ice: support the rx_csum XDP metadata hint
Date: Tue, 30 Jun 2026 19:27:30 +0000 [thread overview]
Message-ID: <20260630192730.B63461F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260630191510.81402-6-deliran@verdict.gg>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Incomplete checksum validation logic improperly reports `XDP_CSUM_VERIFIED` for packets with IP or outer header checksum errors.
- [Low] Dereferencing a `void *` pointer causes a compilation error.
--
commit 3569f119a8bc81475b62415df37c17d04819a768
Author: Vladimir Vdovin <deliran@verdict.gg>
ice: support the rx_csum XDP metadata hint
This commit implements the xmo_rx_csum XDP metadata hint for the ice driver
by reading the Rx flex descriptor status bits. It mirrors ice_rx_csum()
and returns -ENODATA when hardware checksum offload is disabled.
> diff --git a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c
> --- a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c
> +++ b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c
[ ... ]
> +static int ice_xdp_rx_csum(const struct xdp_md *ctx,
> + enum xdp_csum_status *csum_status)
> +{
> + const struct libeth_xdp_buff *xdp_ext = (void *)ctx;
> + struct ice_rx_ring *rx_ring;
> + u16 status0;
> +
> + rx_ring = libeth_xdp_buff_to_rq(xdp_ext, typeof(*rx_ring), xdp_rxq);
> + if (!(rx_ring->netdev->features & NETIF_F_RXCSUM))
> + return -ENODATA;
> +
> + status0 = le16_to_cpu(xdp_ext->desc->wb.status_error0);
[Severity: Low]
Does this code compile? Looking at include/net/libeth/xdp.h,
libeth_xdp_buff->desc is defined as const void *. Attempting to access
the wb member directly on a void pointer will cause a compilation error.
> + if ((status0 & BIT(ICE_RX_FLEX_DESC_STATUS0_L3L4P_S)) &&
> + !(status0 & BIT(ICE_RX_FLEX_DESC_STATUS0_XSUM_L4E_S)))
> + *csum_status = XDP_CSUM_VERIFIED;
[Severity: High]
Does this code improperly report XDP_CSUM_VERIFIED for packets with outer
header or IP checksum errors?
Unlike ice_rx_csum() which validates IP and outer header errors, this
condition only checks that L3/L4 are present and that there is no inner L4
checksum error (XSUM_L4E_S). If a packet has a corrupted IP checksum or a
corrupted outer UDP checksum in a tunnel (XSUM_EUDPE_S or XSUM_IPE_S), it
appears this will bypass the error flags and still return XDP_CSUM_VERIFIED.
> + else
> + *csum_status = XDP_CSUM_NONE;
> +
> + return 0;
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260630191510.81402-1-deliran@verdict.gg?part=5
next prev parent reply other threads:[~2026-06-30 19:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 19:15 [RFC PATCH bpf-next v1 0/7] xdp: RX checksum metadata hint and checksum assertion over redirect Vladimir Vdovin
2026-06-30 19:15 ` [RFC PATCH bpf-next v1 1/7] xdp: let XDP programs assert the RX checksum " Vladimir Vdovin
2026-06-30 19:31 ` sashiko-bot
2026-06-30 19:15 ` [RFC PATCH bpf-next v1 2/7] selftests/bpf: add test for bpf_xdp_assert_rx_csum over cpumap Vladimir Vdovin
2026-06-30 19:27 ` sashiko-bot
2026-06-30 19:15 ` [RFC PATCH bpf-next v1 3/7] xdp: add bpf_xdp_metadata_rx_csum() RX metadata kfunc Vladimir Vdovin
2026-06-30 19:15 ` [RFC PATCH bpf-next v1 4/7] net/mlx5e: support the rx_csum XDP metadata hint Vladimir Vdovin
2026-06-30 19:15 ` [RFC PATCH bpf-next v1 5/7] ice: " Vladimir Vdovin
2026-06-30 19:27 ` sashiko-bot [this message]
2026-06-30 19:15 ` [RFC PATCH bpf-next v1 6/7] veth: " Vladimir Vdovin
2026-06-30 19:27 ` sashiko-bot
2026-06-30 19:15 ` [RFC PATCH bpf-next v1 7/7] selftests/bpf: cover bpf_xdp_metadata_rx_csum in xdp_metadata Vladimir Vdovin
2026-06-30 19:27 ` sashiko-bot
2026-06-30 21:18 ` [RFC PATCH bpf-next v1 0/7] xdp: RX checksum metadata hint and checksum assertion over redirect Stanislav Fomichev
2026-06-30 22:16 ` Lorenzo Bianconi
2026-07-01 17:10 ` Vladimir Vdovin
2026-07-02 14:52 ` Lorenzo Bianconi
2026-07-04 16:41 ` Jesper Dangaard Brouer
2026-07-08 12:51 ` [PATCH bpf-next 0/1] selftests: drv-net: XDP RX checksum metadata test Vladimir Vdovin
2026-07-08 12:51 ` [PATCH bpf-next 1/1] selftests: drv-net: add XDP RX checksum metadata tests Vladimir Vdovin
2026-07-08 13:19 ` sashiko-bot
2026-07-08 13:28 ` bot+bpf-ci
2026-07-08 15:12 ` [PATCH bpf-next 0/1] selftests: drv-net: XDP RX checksum metadata test Lorenzo Bianconi
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=20260630192730.B63461F000E9@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.