On Fri, 5 Dec 2025 at 18:14, Kevin Traynor <[email protected]> wrote:
> > +    ovs_assert(inner_l4_data);
> > +    inner_csum = csum_continue(inner_csum, inner_l4,
> > +        (char *) inner_l4_csum_p - (char *) inner_l4);
> > +    inner_l4_csum = csum_finish(csum_continue(inner_csum, inner_l4_csum_p 
> > + 1,
> > +        (char *) inner_l4_data - (char *)(inner_l4_csum_p + 1)));
>
> > +    if (dp_packet_inner_l4_proto_udp(p) && !inner_l4_csum) {
>
> Less likely to be an inner_l4_csum == 0, so could reverse order/nest
>
> > +        inner_l4_csum = htons(0xffff);
> > +    }
>
> I think you could remove this block as inner_l4_csum == 0 will have the
> same effect later, but only concern would be code clarity.

Oh, nice...
That will require some comment so that inner_l4_csum value does not
get used for something after a change in this helper (though I don't
see what would be changed here).


-- 
David Marchand

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to