/kernel/linux/linux-5.10/arch/s390/include/asm/ |
D | checksum.h | 47 u32 csum = (__force u32) sum; in csum_fold() local 49 csum += (csum >> 16) | (csum << 16); in csum_fold() 50 csum >>= 16; in csum_fold() 51 return (__force __sum16) ~csum; in csum_fold() 60 __u64 csum = 0; in ip_fast_csum() local 63 csum += *ptr++; in ip_fast_csum() 64 csum += *ptr++; in ip_fast_csum() 65 csum += *ptr++; in ip_fast_csum() 66 csum += *ptr++; in ip_fast_csum() 69 csum += *ptr++; in ip_fast_csum() [all …]
|
/kernel/linux/linux-5.10/arch/mips/include/asm/ |
D | checksum.h | 77 static inline __sum16 csum_fold(__wsum csum) in csum_fold() argument 79 u32 sum = (__force u32)csum; in csum_fold() 82 csum = (__force __wsum)(sum < (__force u32)csum); in csum_fold() 84 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() 106 carry = (csum < word[1]); in ip_fast_csum() 107 csum += carry; in ip_fast_csum() 109 csum += word[2]; in ip_fast_csum() [all …]
|
/kernel/linux/linux-5.10/net/netfilter/ |
D | utils.c | 14 __sum16 csum = 0; in nf_ip_checksum() local 21 !csum_fold(skb->csum)) || in nf_ip_checksum() 24 skb->csum)) { in nf_ip_checksum() 31 skb->csum = 0; in nf_ip_checksum() 33 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, in nf_ip_checksum() 36 csum = __skb_checksum_complete(skb); in nf_ip_checksum() 38 return csum; in nf_ip_checksum() 48 __sum16 csum = 0; in nf_ip_checksum_partial() local 56 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, protocol, in nf_ip_checksum_partial() 61 return csum; in nf_ip_checksum_partial() [all …]
|
/kernel/linux/linux-5.10/include/net/ |
D | checksum.h | 57 static inline __wsum csum_add(__wsum csum, __wsum addend) in csum_add() argument 59 u32 res = (__force u32)csum; in csum_add() 65 static inline __wsum csum_sub(__wsum csum, __wsum addend) in csum_sub() argument 67 return csum_add(csum, ~addend); in csum_sub() 70 static inline __sum16 csum16_add(__sum16 csum, __be16 addend) in csum16_add() argument 72 u16 res = (__force u16)csum; in csum16_add() 78 static inline __sum16 csum16_sub(__sum16 csum, __be16 addend) in csum16_sub() argument 80 return csum16_add(csum, ~addend); in csum16_sub() 84 csum_block_add(__wsum csum, __wsum csum2, int offset) in csum_block_add() argument 92 return csum_add(csum, (__force __wsum)sum); in csum_block_add() [all …]
|
D | seg6.h | 22 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()
|
D | udp.h | 130 __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()
|
D | gre.h | 15 __be16 csum; member 111 __wsum csum; in gre_checksum() local 114 csum = lco_csum(skb); in gre_checksum() 116 csum = skb_checksum(skb, 0, skb->len, 0); in gre_checksum() 117 return csum_fold(csum); in gre_checksum()
|
/kernel/linux/linux-5.10/samples/bpf/ |
D | xdp_adjust_tail_kern.c | 58 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 …]
|
/kernel/linux/linux-5.10/drivers/infiniband/hw/qib/ |
D | qib_eeprom.c | 117 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()
|
/kernel/linux/linux-5.10/arch/powerpc/lib/ |
D | checksum_wrappers.c | 17 __wsum csum; in csum_and_copy_from_user() local 26 csum = csum_partial_copy_generic((void __force *)src, dst, len); in csum_and_copy_from_user() 29 return csum; in csum_and_copy_from_user() 35 __wsum csum; in csum_and_copy_to_user() local 43 csum = csum_partial_copy_generic(src, (void __force *)dst, len); in csum_and_copy_to_user() 46 return csum; in csum_and_copy_to_user()
|
/kernel/linux/linux-5.10/fs/ext4/ |
D | bitmap.c | 45 __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()
|
/kernel/linux/linux-5.10/arch/s390/kernel/ |
D | os_info.c | 40 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()
|
/kernel/linux/linux-5.10/arch/csky/include/asm/ |
D | checksum.h | 10 static inline __sum16 csum_fold(__wsum csum) in csum_fold() argument 19 : "=r"(csum), "=r"(tmp) in csum_fold() 20 : "0"(csum)); in csum_fold() 22 return (__force __sum16) ~csum; in csum_fold()
|
/kernel/linux/linux-5.10/block/partitions/ |
D | sgi.c | 32 __be32 csum; /* Disk label checksum */ member 38 int i, csum; in sgi_partition() local 60 for(csum = 0; ui >= ((__be32 *) label);) { in sgi_partition() 62 csum += be32_to_cpu(cs); in sgi_partition() 64 if(csum) { in sgi_partition()
|
D | sun.c | 24 __be16 csum; in sun_partition() local 64 __be16 csum; /* Label xor'd checksum */ in sun_partition() member 85 for (csum = 0; ush >= ((__be16 *) label);) in sun_partition() 86 csum ^= *ush--; in sun_partition() 87 if (csum) { in sun_partition()
|
/kernel/linux/linux-5.10/net/sched/ |
D | act_csum.c | 156 skb->csum = csum_partial(icmph, ipl - ihl, 0); in tcf_csum_ipv4_icmp() 157 icmph->checksum = csum_fold(skb->csum); in tcf_csum_ipv4_icmp() 173 igmph->csum = 0; in tcf_csum_ipv4_igmp() 174 skb->csum = csum_partial(igmph, ipl - ihl, 0); in tcf_csum_ipv4_igmp() 175 igmph->csum = csum_fold(skb->csum); in tcf_csum_ipv4_igmp() 194 skb->csum = csum_partial(icmp6h, ipl - ihl, 0); in tcf_csum_ipv6_icmp() 197 skb->csum); in tcf_csum_ipv6_icmp() 219 skb->csum = csum_partial(tcph, ipl - ihl, 0); in tcf_csum_ipv4_tcp() 221 iph->saddr, iph->daddr, skb->csum); in tcf_csum_ipv4_tcp() 243 skb->csum = csum_partial(tcph, ipl - ihl, 0); in tcf_csum_ipv6_tcp() [all …]
|
/kernel/linux/linux-5.10/arch/powerpc/include/asm/ |
D | checksum.h | 94 static 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()
|
/kernel/linux/linux-5.10/arch/sparc/include/asm/ |
D | checksum_64.h | 133 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()
|
/kernel/linux/linux-5.10/sound/drivers/vx/ |
D | vx_core.c | 669 unsigned int csum = 0; in snd_vx_dsp_load() local 687 csum ^= *cptr; in snd_vx_dsp_load() 688 csum = (csum >> 24) | (csum << 8); in snd_vx_dsp_load() 690 csum ^= *cptr; in snd_vx_dsp_load() 691 csum = (csum >> 24) | (csum << 8); in snd_vx_dsp_load() 693 csum ^= *cptr; in snd_vx_dsp_load() 694 csum = (csum >> 24) | (csum << 8); in snd_vx_dsp_load() 697 snd_printdd(KERN_DEBUG "checksum = 0x%08x\n", csum); in snd_vx_dsp_load()
|
/kernel/linux/linux-5.10/tools/bootconfig/ |
D | main.c | 161 u32 size = 0, csum = 0, rcsum; in load_xbc_from_initrd() local 189 if (read(fd, &csum, sizeof(u32)) < 0) in load_xbc_from_initrd() 191 csum = le32toh(csum); in load_xbc_from_initrd() 209 if (csum != rcsum) { in load_xbc_from_initrd() 210 pr_err("checksum error: %d != %d\n", csum, rcsum); in load_xbc_from_initrd() 347 u32 size, csum; in apply_xbc() local 357 csum = checksum((unsigned char *)buf, size); in apply_xbc() 378 printf("\tChecksum: %d\n", (unsigned int)csum); in apply_xbc() 417 *(u32 *)p = htole32(csum); in apply_xbc()
|
/kernel/linux/linux-5.10/net/sunrpc/ |
D | socklib.c | 30 __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()
|
/kernel/linux/linux-5.10/drivers/input/touchscreen/ |
D | elo.c | 59 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()
|
/kernel/linux/linux-5.10/arch/ia64/include/asm/ |
D | checksum.h | 49 static inline __sum16 csum_fold(__wsum csum) in csum_fold() argument 51 u32 sum = (__force u32)csum; in csum_fold() 61 __u32 len, __u8 proto, __wsum csum);
|
/kernel/linux/linux-5.10/drivers/net/ethernet/sgi/ |
D | ioc3-eth.c | 303 u32 csum, ehsum; in ioc3_tcpudp_checksum() local 331 csum = hwsum + in ioc3_tcpudp_checksum() 344 csum += 0xffff ^ ehsum; in ioc3_tcpudp_checksum() 351 csum += 0xffff ^ (u16)((cp[1] << 8) | cp[0]); in ioc3_tcpudp_checksum() 352 csum += 0xffff ^ (u16)((cp[3] << 8) | cp[2]); in ioc3_tcpudp_checksum() 354 csum += 0xffff ^ (u16)((cp[0] << 8) | cp[1]); in ioc3_tcpudp_checksum() 355 csum += 0xffff ^ (u16)((cp[2] << 8) | cp[3]); 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() [all …]
|
/kernel/linux/linux-5.10/fs/cachefiles/ |
D | key.c | 35 unsigned char csum, ch; in cachefiles_cook_key() local 44 csum = raw[0] + raw[1]; in cachefiles_cook_key() 48 csum += ch; in cachefiles_cook_key() 84 sprintf(key, "@%02x%c+", (unsigned) csum, 0); in cachefiles_cook_key()
|