Home
last modified time | relevance | path

Searched refs:csum (Results 1 – 2 of 2) sorted by relevance

/samples/bpf/
Dxdp_adjust_tail_kern.c55 static __always_inline __u16 csum_fold_helper(__u32 csum) in csum_fold_helper() argument
57 return ~((csum & 0xffff) + (csum >> 16)); in csum_fold_helper()
61 __u32 *csum) in ipv4_csum() argument
63 *csum = bpf_csum_diff(0, 0, data_start, data_size, *csum); in ipv4_csum()
64 *csum = csum_fold_helper(*csum); in ipv4_csum()
82 __u32 csum = 0; in send_icmp4_too_big() local
97 ipv4_csum(icmp_hdr, ICMP_TOOBIG_PAYLOAD_SIZE, &csum); in send_icmp4_too_big()
98 icmp_hdr->checksum = csum; in send_icmp4_too_big()
109 csum = 0; in send_icmp4_too_big()
110 ipv4_csum(iph, sizeof(struct iphdr), &csum); in send_icmp4_too_big()
[all …]
Dxdp_tx_iptunnel_kern.c89 u32 csum = 0; in handle_ipv4() local
143 csum += *next_iph_u16++; in handle_ipv4()
145 iph->check = ~((csum & 0xffff) + (csum >> 16)); in handle_ipv4()