> diff --git a/drivers/net/veth.c b/drivers/net/veth.c
> index 9982412fd7f2..3ec77599299a 100644
> --- a/drivers/net/veth.c
> +++ b/drivers/net/veth.c
> @@ -1697,6 +1697,35 @@ static int veth_xdp_rx_vlan_tag(const struct xdp_md
> *ctx, __be16 *vlan_proto,
> return err;
> }
>
> +static int veth_xdp_rx_checksum(const struct xdp_md *ctx,
> + enum xdp_checksum *ip_summed,
> + u32 *cksum_meta)
> +{
> + const struct veth_xdp_buff *_ctx = (void *)ctx;
> + const struct sk_buff *skb = _ctx->skb;
> +
> + if (!skb)
> + return -ENODATA;
> +
> + *ip_summed = skb->ip_summed;
Is this assignment needed? Every branch in the switch below overwrites
*ip_summed, so this line has no effect. It looks like a leftover from v1
where the raw skb->ip_summed was the intended output value.
> + switch (skb->ip_summed) {
> + case CHECKSUM_COMPLETE:
> + *ip_summed = XDP_CHECKSUM_COMPLETE;
> + *cksum_meta = skb->csum;
> + break;
> + case CHECKSUM_UNNECESSARY:
> + *ip_summed = XDP_CHECKSUM_UNNECESSARY;
> + *cksum_meta = skb->csum_level;
> + break;
> + default:
> + *ip_summed = XDP_CHECKSUM_NONE;
> + *cksum_meta = 0;
> + break;
> + }
[ ... ]
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/21992879200
AI-authorship-score: low
AI-authorship-explanation: Multiple version iterations over months with
incremental refinements, a non-native English typo, and a refactoring leftover
are all characteristic of human development.
issues-found: 1
issue-severity-score: low
issue-severity-explanation: Dead code assignment from v1 refactoring leftover
has no functional impact but is unnecessary.