Hi,

On Tue, Sep 16, 2025 at 02:24:40PM +0200, Simon Wunderlich wrote:
> +static __be32 batadv_skb_crc32(struct sk_buff *skb, u8 *payload_ptr)
> +{
> +     unsigned int to = skb->len;
> +     unsigned int consumed = 0;
> +     struct skb_seq_state st;
> +     unsigned int from;
> +     unsigned int len;
> +     const u8 *data;
> +     u32 crc = 0;
> +
> +     from = (unsigned int)(payload_ptr - skb->data);
> +
> +     skb_prepare_seq_read(skb, from, to, &st);
> +     while ((len = skb_seq_read(consumed, &data, &st)) != 0) {
> +             crc = crc32c(crc, data, len);
> +             consumed += len;
> +     }
> +
> +     return htonl(crc);
> +}

Has using skb_crc32c() been considered here?

- Eric

Reply via email to