Home
last modified time | relevance | path

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

/tools/bootconfig/
Dmain.c180 uint32_t size = 0, csum = 0, rcsum; in load_xbc_from_initrd() local
208 if (read(fd, &csum, sizeof(uint32_t)) < 0) in load_xbc_from_initrd()
210 csum = le32toh(csum); in load_xbc_from_initrd()
228 if (csum != rcsum) { in load_xbc_from_initrd()
229 pr_err("checksum error: %d != %d\n", csum, rcsum); in load_xbc_from_initrd()
366 uint32_t size, csum; in apply_xbc() local
376 csum = xbc_calc_checksum(buf, size); in apply_xbc()
398 printf("\tChecksum: %d\n", (unsigned int)csum); in apply_xbc()
437 *(uint32_t *)p = htole32(csum); in apply_xbc()
/tools/testing/selftests/bpf/progs/
Dxdp_synproxy_kern.c119 static __always_inline __u16 csum_fold(__u32 csum) in csum_fold() argument
121 csum = (csum & 0xffff) + (csum >> 16); in csum_fold()
122 csum = (csum & 0xffff) + (csum >> 16); in csum_fold()
123 return (__u16)~csum; in csum_fold()
128 __u32 csum) in csum_tcpudp_magic() argument
130 __u64 s = csum; in csum_tcpudp_magic()
149 __u32 len, __u8 proto, __u32 csum) in csum_ipv6_magic() argument
151 __u64 sum = csum; in csum_ipv6_magic()
Dtest_xdp.c90 __u32 csum = 0; in handle_ipv4() local
142 csum += *next_iph++; in handle_ipv4()
144 iph->check = ~((csum & 0xffff) + (csum >> 16)); in handle_ipv4()
Dtest_xdp_loop.c86 __u32 csum = 0; in handle_ipv4() local
138 csum += *next_iph++; in handle_ipv4()
140 iph->check = ~((csum & 0xffff) + (csum >> 16)); in handle_ipv4()
Dtest_xdp_dynptr.c91 __u32 csum = 0; in handle_ipv4() local
150 csum += *next_iph++; in handle_ipv4()
152 iph->check = ~((csum & 0xffff) + (csum >> 16)); in handle_ipv4()
Dtest_cls_redirect_dynptr.c156 static uint16_t pkt_checksum_fold(uint32_t csum) in pkt_checksum_fold() argument
161 csum = (csum & 0xffff) + (csum >> 16); in pkt_checksum_fold()
162 csum = (csum & 0xffff) + (csum >> 16); in pkt_checksum_fold()
163 return (uint16_t)~csum; in pkt_checksum_fold()
Dtest_cls_redirect.c247 static INLINING uint16_t pkt_checksum_fold(uint32_t csum) in pkt_checksum_fold() argument
252 csum = (csum & 0xffff) + (csum >> 16); in pkt_checksum_fold()
253 csum = (csum & 0xffff) + (csum >> 16); in pkt_checksum_fold()
254 return (uint16_t)~csum; in pkt_checksum_fold()
Dtest_xdp_noinline.c331 __u32 csum = 0; in encap_v4() local
367 csum += *next_iph_u16++; in encap_v4()
368 iph->check = ~((csum & 0xffff) + (csum >> 16)); in encap_v4()
394 __u32 csum = 0; in send_icmp_reply() local
414 csum += *next_iph_u16++; in send_icmp_reply()
415 iph->check = ~((csum & 0xffff) + (csum >> 16)); in send_icmp_reply()
Dtest_tc_tunnel.c79 __u32 csum; in set_ipv4_csum() local
85 for (i = 0, csum = 0; i < sizeof(*iph) >> 1; i++) in set_ipv4_csum()
86 csum += *iph16++; in set_ipv4_csum()
88 iph->check = ~((csum & 0xffff) + (csum >> 16)); in set_ipv4_csum()
Dtest_tunnel_kern.c458 __s64 csum; in veth_set_outer_dst() local
485 csum = bpf_csum_diff(&iph->daddr, sizeof(__u32), &assigned_ip, in veth_set_outer_dst()
493 0, csum, 0) < 0) { in veth_set_outer_dst()
/tools/testing/selftests/net/
D.gitignore5 csum
Dcsum.c592 uint16_t csum; in recv_verify_csum() local
594 csum = checksum(th, cfg_proto, len); in recv_verify_csum()
597 sport, len, csum_field, csum); in recv_verify_csum()
600 if (csum && !cfg_bad_csum) { in recv_verify_csum()
603 } else if (cfg_bad_csum && !csum) { in recv_verify_csum()
DMakefile84 TEST_GEN_FILES += csum
Dpmtu.sh825 action pedit ex munge ip df set 0x40 pipe csum ip and udp
828 action pedit ex munge ip df set 0x40 pipe csum ip and udp
857 options:remote_ip=${b_addr} options:key=1 options:csum=true || return 1
/tools/testing/selftests/drivers/net/mlxsw/
Ddevlink_trap_tunnel_vxlan.sh152 )"D6:E5:"$( : IP header csum
208 )"00:00:"$( : IP header csum
291 )"00:00:"$( : IP header csum
Ddevlink_trap_tunnel_ipip.sh137 )"E7:E6:"$( : IP header csum
Dingress_rif_conf_vxlan.sh216 )"50:21:"$( : IP header csum
Ddevlink_trap_l3_drops.sh369 )"$checksum:"$( : IP header csum
/tools/testing/selftests/net/forwarding/
Dvxlan_bridge_1d.sh579 )"00:00:"$( : IP header csum
584 )"8b:f2:"$( : ICMP csum
/tools/testing/selftests/net/mptcp/
Dmptcp_join.sh443 pipe csum tcp \