mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
net: Use skb_checksum_start_offset()
Replace skb->csum_start - skb_headroom(skb) with skb_checksum_start_offset(). Note for usb/smsc95xx: skb->data - skb->head == skb_headroom(skb). Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
04fb451eff
commit
55508d601d
9 changed files with 13 additions and 16 deletions
|
@ -1650,8 +1650,7 @@ static int packet_recvmsg(struct kiocb *iocb, struct socket *sock,
|
|||
|
||||
if (skb->ip_summed == CHECKSUM_PARTIAL) {
|
||||
vnet_hdr.flags = VIRTIO_NET_HDR_F_NEEDS_CSUM;
|
||||
vnet_hdr.csum_start = skb->csum_start -
|
||||
skb_headroom(skb);
|
||||
vnet_hdr.csum_start = skb_checksum_start_offset(skb);
|
||||
vnet_hdr.csum_offset = skb->csum_offset;
|
||||
} /* else everything is zero */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue