Lines Matching +full:compute +full:- +full:cb

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
8 /* Keeps track of mac header offset relative to skb->head.
10 * For non-tunnel skb it points to skb_mac_header() and for
24 #define SKB_GSO_CB(skb) ((struct skb_gso_cb *)((skb)->cb + SKB_GSO_CB_OFFSET))
28 return (skb_mac_header(inner_skb) - inner_skb->head) - in skb_tnl_header_len()
29 SKB_GSO_CB(inner_skb)->mac_offset; in skb_tnl_header_len()
43 SKB_GSO_CB(skb)->mac_offset += (new_headroom - headroom); in gso_pskb_expand_head()
50 if (skb->remcsum_offload) in gso_reset_checksum()
53 SKB_GSO_CB(skb)->csum = res; in gso_reset_checksum()
54 SKB_GSO_CB(skb)->csum_start = skb_checksum_start(skb) - skb->head; in gso_reset_checksum()
57 /* Compute the checksum for a gso segment. First compute the checksum value
58 * from the start of transport header to SKB_GSO_CB(skb)->csum_start, and
59 * then add in skb->csum (checksum from csum_start to end of packet).
60 * skb->csum and csum_start are then updated to reflect the checksum of the
61 * resultant packet starting from the transport header-- the resultant checksum
68 int plen = (skb->head + SKB_GSO_CB(skb)->csum_start) - csum_start; in gso_make_checksum()
69 __wsum partial = SKB_GSO_CB(skb)->csum; in gso_make_checksum()
71 SKB_GSO_CB(skb)->csum = res; in gso_make_checksum()
72 SKB_GSO_CB(skb)->csum_start = csum_start - skb->head; in gso_make_checksum()
100 skb->protocol = protocol; in skb_gso_error_unwind()
101 skb->encapsulation = 1; in skb_gso_error_unwind()
104 skb->mac_header = mac_offset; in skb_gso_error_unwind()
105 skb->network_header = skb->mac_header + mac_len; in skb_gso_error_unwind()
106 skb->mac_len = mac_len; in skb_gso_error_unwind()