Re: [PATCH net 4/6] seg6: discard CHECKSUM_COMPLETE after the End.BPF program

From: Andrea Mayer

Date: Wed Nov 04 2026 - 19:36:29 EST


On Tue, 3 Nov 2026 10:28:52 +0800
Hangbin Liu <hangbin.liu@xxxxxxxxx> wrote:

> [snip]
> > + /* The program may have changed the packet and seg6_bpf_has_valid_srh()
> > + * may rewrite the SRH Hdr Ext Len below.
> > + * skb->csum may then no longer be the checksum of the full packet.
> > + */
> > + skb_checksum_complete_unset(skb);
> > +
>
> Should we move this a bit later?
>
> > if (srh_state->srh && !seg6_bpf_has_valid_srh(skb))
> > goto drop;
> > local_unlock_nested_bh(&seg6_bpf_srh_states.bh_lock);
> > --
>
> e.g. after this. As there is not need to do the setting if the skb is dropped.
> [snip]

Hi Hangbin,

Right, I will move it there in v2.

Thanks,
Andrea