Home
last modified time | relevance | path

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

12345678910>>...15

/linux/arch/s390/include/asm/
A Dchecksum.h51 csum += (csum >> 16) | (csum << 16); in csum_fold()
52 csum >>= 16; in csum_fold()
62 __u64 csum = 0; in ip_fast_csum() local
65 csum += *ptr++; in ip_fast_csum()
66 csum += *ptr++; in ip_fast_csum()
67 csum += *ptr++; in ip_fast_csum()
68 csum += *ptr++; in ip_fast_csum()
72 csum += (csum >> 32) | (csum << 32); in ip_fast_csum()
87 csum += len; in csum_tcpudp_nofold()
88 csum += proto; in csum_tcpudp_nofold()
[all …]
/linux/arch/mips/include/asm/
A Dchecksum.h82 csum = (__force __wsum)(sum < (__force u32)csum); in csum_fold()
101 unsigned int csum; in ip_fast_csum() local
104 csum = word[0]; in ip_fast_csum()
105 csum += word[1]; in ip_fast_csum()
107 csum += carry; in ip_fast_csum()
109 csum += word[2]; in ip_fast_csum()
111 csum += carry; in ip_fast_csum()
113 csum += word[3]; in ip_fast_csum()
115 csum += carry; in ip_fast_csum()
119 csum += *word; in ip_fast_csum()
[all …]
/linux/net/netfilter/
A Dutils.c14 __sum16 csum = 0; in nf_ip_checksum() local
31 skb->csum = 0; in nf_ip_checksum()
38 return csum; in nf_ip_checksum()
48 __sum16 csum = 0; in nf_ip_checksum_partial() local
61 return csum; in nf_ip_checksum_partial()
68 __sum16 csum = 0; in nf_ip6_checksum() local
93 return csum; in nf_ip6_checksum()
103 __sum16 csum = 0; in nf_ip6_checksum_partial() local
120 return csum; in nf_ip6_checksum_partial()
138 return csum; in nf_checksum()
[all …]
/linux/include/net/
A Dchecksum.h59 u32 res = (__force u32)csum; in csum_add()
67 return csum_add(csum, ~addend); in csum_sub()
72 u16 res = (__force u16)csum; in csum16_add()
80 return csum16_add(csum, ~addend); in csum16_sub()
92 csum_block_add(__wsum csum, __wsum csum2, int offset) in csum_block_add() argument
94 return csum_add(csum, csum_shift(csum2, offset)); in csum_block_add()
100 return csum_block_add(csum, csum2, offset); in csum_block_add_ext()
106 return csum_block_add(csum, ~csum2, offset); in csum_block_sub()
168 csum = csum_sub(csum, csum_partial(ptr, start, 0)); in remcsum_adjust()
171 delta = csum_sub((__force __wsum)csum_fold(csum), in remcsum_adjust()
[all …]
A Dudp.h130 __wsum csum = csum_partial(skb_transport_header(skb), in udp_csum_outgoing() local
133 csum = csum_add(csum, skb->csum); in udp_csum_outgoing()
135 return csum; in udp_csum_outgoing()
140 __wsum csum = csum_partial(skb_transport_header(skb), in udp_csum() local
141 sizeof(struct udphdr), skb->csum); in udp_csum()
144 csum = csum_add(csum, skb->csum); in udp_csum()
146 return csum; in udp_csum()
161 skb->csum = csum_partial(skb->data, sizeof(struct udphdr), in udp_csum_pull_header()
162 skb->csum); in udp_csum_pull_header()
A Dseg6.h22 skb->csum = ~csum_partial((char *)diff, sizeof(diff), ~skb->csum); in update_csum_diff4()
33 skb->csum = ~csum_partial((char *)diff, sizeof(diff), ~skb->csum); in update_csum_diff16()
/linux/samples/bpf/
A Dxdp_adjust_tail_kern.c58 static __always_inline __u16 csum_fold_helper(__u32 csum) in csum_fold_helper() argument
60 return ~((csum & 0xffff) + (csum >> 16)); in csum_fold_helper()
64 __u32 *csum) in ipv4_csum() argument
66 *csum = bpf_csum_diff(0, 0, data_start, data_size, *csum); in ipv4_csum()
67 *csum = csum_fold_helper(*csum); in ipv4_csum()
85 __u32 csum = 0; in send_icmp4_too_big() local
100 ipv4_csum(icmp_hdr, ICMP_TOOBIG_PAYLOAD_SIZE, &csum); in send_icmp4_too_big()
101 icmp_hdr->checksum = csum; in send_icmp4_too_big()
112 csum = 0; in send_icmp4_too_big()
113 ipv4_csum(iph, sizeof(struct iphdr), &csum); in send_icmp4_too_big()
[all …]
/linux/drivers/infiniband/hw/qib/
A Dqib_eeprom.c117 u8 csum = 0, len; in flash_csum() local
128 csum += *ip++; in flash_csum()
129 csum -= ifp->if_csum; in flash_csum()
130 csum = ~csum; in flash_csum()
132 ifp->if_csum = csum; in flash_csum()
134 return csum; in flash_csum()
150 u8 csum, *bguid; in qib_get_eeprom_info() local
199 csum = flash_csum(ifp, 0); in qib_get_eeprom_info()
200 if (csum != ifp->if_csum) { in qib_get_eeprom_info()
203 csum, ifp->if_csum); in qib_get_eeprom_info()
/linux/arch/powerpc/lib/
A Dchecksum_wrappers.c17 __wsum csum; in csum_and_copy_from_user() local
22 csum = csum_partial_copy_generic((void __force *)src, dst, len); in csum_and_copy_from_user()
25 return csum; in csum_and_copy_from_user()
31 __wsum csum; in csum_and_copy_to_user() local
36 csum = csum_partial_copy_generic(src, (void __force *)dst, len); in csum_and_copy_to_user()
39 return csum; in csum_and_copy_to_user()
/linux/fs/ext4/
A Dbitmap.c45 __u32 csum; in ext4_inode_bitmap_csum_set() local
51 csum = ext4_chksum(sbi, sbi->s_csum_seed, (__u8 *)bh->b_data, sz); in ext4_inode_bitmap_csum_set()
52 gdp->bg_inode_bitmap_csum_lo = cpu_to_le16(csum & 0xFFFF); in ext4_inode_bitmap_csum_set()
54 gdp->bg_inode_bitmap_csum_hi = cpu_to_le16(csum >> 16); in ext4_inode_bitmap_csum_set()
88 __u32 csum; in ext4_block_bitmap_csum_set() local
94 csum = ext4_chksum(sbi, sbi->s_csum_seed, (__u8 *)bh->b_data, sz); in ext4_block_bitmap_csum_set()
95 gdp->bg_block_bitmap_csum_lo = cpu_to_le16(csum & 0xFFFF); in ext4_block_bitmap_csum_set()
97 gdp->bg_block_bitmap_csum_hi = cpu_to_le16(csum >> 16); in ext4_block_bitmap_csum_set()
/linux/arch/s390/kernel/
A Dos_info.c40 os_info.csum = os_info_csum(&os_info); in os_info_crashkernel_add()
50 os_info.entry[nr].csum = (__force u32)csum_partial(ptr, size, 0); in os_info_entry_add()
51 os_info.csum = os_info_csum(&os_info); in os_info_entry_add()
64 os_info.csum = os_info_csum(&os_info); in os_info_init()
79 u32 csum; in os_info_old_alloc() local
97 csum = (__force u32)csum_partial(buf_align, size, 0); in os_info_old_alloc()
98 if (csum != os_info_old->entry[nr].csum) { in os_info_old_alloc()
138 if (os_info_old->csum != os_info_csum(os_info_old)) in os_info_old_init()
/linux/drivers/gpu/drm/amd/amdgpu/
A Damdgpu_ras_eeprom.c219 u8 *pp, csum; in __calc_hdr_byte_sum() local
225 csum = 0; in __calc_hdr_byte_sum()
227 csum += *pp; in __calc_hdr_byte_sum()
229 return csum; in __calc_hdr_byte_sum()
239 u8 csum; in amdgpu_ras_eeprom_correct_header_tag() local
247 csum = -csum; in amdgpu_ras_eeprom_correct_header_tag()
267 u8 csum; in amdgpu_ras_eeprom_reset_table() local
278 csum = -csum; in amdgpu_ras_eeprom_reset_table()
569 csum = 0; in amdgpu_ras_eeprom_update_header()
575 csum = -csum; in amdgpu_ras_eeprom_update_header()
[all …]
/linux/net/sched/
A Dact_csum.c158 icmph->checksum = csum_fold(skb->csum); in tcf_csum_ipv4_icmp()
174 igmph->csum = 0; in tcf_csum_ipv4_igmp()
176 igmph->csum = csum_fold(skb->csum); in tcf_csum_ipv4_igmp()
198 skb->csum); in tcf_csum_ipv6_icmp()
222 iph->saddr, iph->daddr, skb->csum); in tcf_csum_ipv4_tcp()
247 skb->csum); in tcf_csum_ipv6_tcp()
293 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv4_udp()
298 skb->csum); in tcf_csum_ipv4_udp()
341 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv6_udp()
349 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv6_udp()
[all …]
/linux/block/partitions/
A Dsgi.c32 __be32 csum; /* Disk label checksum */ member
38 int i, csum; in sgi_partition() local
59 for(csum = 0; ui >= ((__be32 *) label);) { in sgi_partition()
61 csum += be32_to_cpu(cs); in sgi_partition()
63 if(csum) { in sgi_partition()
A Dsun.c24 __be16 csum; in sun_partition() local
64 __be16 csum; /* Label xor'd checksum */ in sun_partition() member
84 for (csum = 0; ush >= ((__be16 *) label);) in sun_partition()
85 csum ^= *ush--; in sun_partition()
86 if (csum) { in sun_partition()
/linux/arch/csky/include/asm/
A Dchecksum.h9 static inline __sum16 csum_fold(__wsum csum) in csum_fold() argument
18 : "=r"(csum), "=r"(tmp) in csum_fold()
19 : "0"(csum)); in csum_fold()
21 return (__force __sum16) ~csum; in csum_fold()
/linux/arch/powerpc/include/asm/
A Dchecksum.h94 static __always_inline __wsum csum_add(__wsum csum, __wsum addend) in csum_add() argument
97 u64 res = (__force u64)csum; in csum_add()
99 if (__builtin_constant_p(csum) && csum == 0) in csum_add()
102 return csum; in csum_add()
110 : "+r" (csum) : "r" (addend) : "xer"); in csum_add()
111 return csum; in csum_add()
/linux/tools/bootconfig/
A 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()
/linux/sound/drivers/vx/
A Dvx_core.c687 unsigned int csum = 0; in snd_vx_dsp_load() local
706 csum ^= *cptr; in snd_vx_dsp_load()
707 csum = (csum >> 24) | (csum << 8); in snd_vx_dsp_load()
709 csum ^= *cptr; in snd_vx_dsp_load()
710 csum = (csum >> 24) | (csum << 8); in snd_vx_dsp_load()
712 csum ^= *cptr; in snd_vx_dsp_load()
713 csum = (csum >> 24) | (csum << 8); in snd_vx_dsp_load()
716 snd_printdd(KERN_DEBUG "checksum = 0x%08x\n", csum); in snd_vx_dsp_load()
/linux/drivers/net/ethernet/sgi/
A Dioc3-eth.c303 u32 csum, ehsum; in ioc3_tcpudp_checksum() local
331 csum = hwsum + in ioc3_tcpudp_checksum()
344 csum += 0xffff ^ ehsum; in ioc3_tcpudp_checksum()
358 csum = (csum & 0xffff) + (csum >> 16); in ioc3_tcpudp_checksum()
359 csum = (csum & 0xffff) + (csum >> 16); in ioc3_tcpudp_checksum()
361 if (csum == 0xffff) in ioc3_tcpudp_checksum()
1001 u32 csum, ehsum; in ioc3_start_xmit() local
1019 csum = (csum & 0xffff) + (csum >> 16); /* Fold again */ in ioc3_start_xmit()
1020 csum = (csum & 0xffff) + (csum >> 16); in ioc3_start_xmit()
1025 udp_hdr(skb)->check = csum; in ioc3_start_xmit()
[all …]
/linux/net/sunrpc/
A Dsocklib.c30 __wsum csum; member
74 desc->csum = csum_block_add(desc->csum, csum2, pos); in xdr_skb_read_and_csum_bits()
180 desc.csum = csum_partial(skb->data, desc.offset, skb->csum); in csum_partial_copy_to_xdr()
186 desc.csum = csum_block_add(desc.csum, csum2, desc.offset); in csum_partial_copy_to_xdr()
190 if (csum_fold(desc.csum)) in csum_partial_copy_to_xdr()
/linux/drivers/input/touchscreen/
A Delo.c59 unsigned char csum; member
73 elo->csum = 0xaa; in elo_process_data_10()
83 if (data != elo->csum) { in elo_process_data_10()
86 data, elo->csum); in elo_process_data_10()
114 elo->csum += data; in elo_process_data_10()
224 unsigned char csum = 0xaa + ELO10_LEAD_BYTE; in elo_command_10() local
237 csum += packet[i]; in elo_command_10()
242 if (serio_write(elo->serio, csum)) in elo_command_10()
/linux/net/ipv4/
A Dip_output.c926 skb->csum = csum_block_add(skb->csum, csum, odd); in ip_generic_getfrag()
936 __wsum csum; in csum_page() local
940 return csum; in csum_page()
1104 skb->csum = 0; in __ip_append_data()
1120 skb_prev->csum = csum_sub(skb_prev->csum, in __ip_append_data()
1389 skb->csum = 0; in ip_append_page()
1404 skb_prev->csum = csum_sub(skb_prev->csum, in ip_append_page()
1425 __wsum csum; in ip_append_page() local
1427 skb->csum = csum_block_add(skb->csum, csum, skb->len); in ip_append_page()
1638 __wsum csum; in ip_reply_glue_bits() local
[all …]
/linux/arch/sparc/include/asm/
A Dchecksum_64.h133 static inline __wsum csum_add(__wsum csum, __wsum addend) in csum_add() argument
138 : "=r" (csum) in csum_add()
139 : "r" (addend), "0" (csum)); in csum_add()
141 return csum; in csum_add()
/linux/drivers/crypto/cavium/zip/
A Dzip_inflate.c84 zip_cmd->s.adlercrc32 = zip_ops->csum; in prepare_inflate_zcmd()
179 zip_ops->csum = result_ptr->s.adler32; in zip_inflate()
200 zip_ops->csum = result_ptr->s.adler32; in zip_inflate()
205 zip_ops->csum = result_ptr->s.adler32; in zip_inflate()
210 zip_ops->csum = result_ptr->s.crc32; in zip_inflate()

Completed in 42 milliseconds

12345678910>>...15