Subject: Re: [PATCH net-next] net: usb: smsc95xx: stop lying about skb->truesize

From: Jakub Kicinski <[email-masked]>
Date: Tue, 7 May 2024 17:41:51 -0700

On Mon,  6 May 2024 14:28:35 +0000 Eric Dumazet wrote:
> -			ax_skb->len = size;
> -			ax_skb->data = packet;
> -			skb_set_tail_pointer(ax_skb, size);
> +			skb_put(ax_skb, size - 4);
> +			memcpy(ax_skb->data, packet, size - 4);
>  
>  			if (dev->net->features & NETIF_F_RXCSUM)
>  				smsc95xx_rx_csum_offload(ax_skb);
> -			skb_trim(ax_skb, ax_skb->len - 4); /* remove fcs */
> -			ax_skb->truesize = size + sizeof(struct sk_buff);

I think this one's off:

static void smsc95xx_rx_csum_offload(struct sk_buff *skb)
{
     skb->csum = *(u16 *)(skb_tail_pointer(skb) - 2);
     skb->ip_summed = CHECKSUM_COMPLETE;
     skb_trim(skb, skb->len - 2);
}