/Linux-v6.1/tools/testing/selftests/tc-testing/tc-tests/actions/ |
D | csum.json | 4 "name": "Add csum iph action", 7 "csum" 11 "$TC actions flush action csum", 17 "cmdUnderTest": "$TC actions add action csum iph index 800", 19 "verifyCmd": "$TC actions get action csum index 800", 20 "matchPattern": "action order [0-9]*: csum \\(iph\\) action pass.*index 800 ref", 23 "$TC actions flush action csum" 28 "name": "Add csum ip4h action", 31 "csum" 35 "$TC actions flush action csum", [all …]
|
D | tunnel_key.json | 449 …+: tunnel_key.*set.*src_ip 192.168.10.1.*dst_ip 192.168.20.2.*key_id 123.*csum continue.*index 1.*… 473 …+: tunnel_key.*set.*src_ip 192.168.10.1.*dst_ip 192.168.20.2.*key_id 123.*csum continue.*index 1.*… 515 "name": "Add tunnel_key action with csum option", 528 …t": "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.20.2 id 1 csum index 99", 531 …ion order [0-9]+: tunnel_key.*src_ip 10.10.10.1.*dst_ip 20.20.20.2.*key_id 1.*csum pipe.*index 99", 608 … [0-9]+: tunnel_key.*set.*src_ip 10.10.10.1.*dst_ip 10.10.10.2.*key_id 7.*csum pipe.*index 4 ref.*… 796 …ions add action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.20.2 dst_port 3128 csum id 1 index 1" 823 …on tunnel_key set src_ip 11.11.11.1 dst_ip 21.21.21.2 dst_port 3129 id 11 csum reclassify index 1 … 826 …key.*set.*src_ip 11.11.11.1.*dst_ip 21.21.21.2.*key_id 11.*dst_port 3129.*csum reclassify.*index 1… 847 …d action tunnel_key set src_ip 11.10.10.1 dst_ip 21.20.20.2 dst_port 3129 csum id 2 jump 10 index … [all …]
|
/Linux-v6.1/arch/s390/include/asm/ |
D | checksum.h | 49 u32 csum = (__force u32) sum; in csum_fold() local 51 csum += (csum >> 16) | (csum << 16); in csum_fold() 52 csum >>= 16; in csum_fold() 53 return (__force __sum16) ~csum; 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() 71 csum += *ptr++; in ip_fast_csum() [all …]
|
/Linux-v6.1/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 …]
|
/Linux-v6.1/include/net/ |
D | checksum.h | 57 static __always_inline __wsum csum_add(__wsum csum, __wsum addend) in csum_add() argument 59 u32 res = (__force u32)csum; in csum_add() 65 static __always_inline __wsum csum_sub(__wsum csum, __wsum addend) in csum_sub() argument 67 return csum_add(csum, ~addend); in csum_sub() 70 static __always_inline __sum16 csum16_add(__sum16 csum, __be16 addend) in csum16_add() argument 72 u16 res = (__force u16)csum; in csum16_add() 78 static __always_inline __sum16 csum16_sub(__sum16 csum, __be16 addend) in csum16_sub() argument 80 return csum16_add(csum, ~addend); in csum16_sub() 94 csum_block_add(__wsum csum, __wsum csum2, int offset) in csum_block_add() argument 96 return csum_add(csum, csum_shift(csum2, offset)); in csum_block_add() [all …]
|
D | udp.h | 37 * @partial_cov: if set indicates partial csum coverage 131 __wsum csum = csum_partial(skb_transport_header(skb), in udp_csum_outgoing() local 134 csum = csum_add(csum, skb->csum); in udp_csum_outgoing() 136 return csum; in udp_csum_outgoing() 141 __wsum csum = csum_partial(skb_transport_header(skb), in udp_csum() local 142 sizeof(struct udphdr), skb->csum); in udp_csum() 145 csum = csum_add(csum, skb->csum); in udp_csum() 147 return csum; in udp_csum() 162 skb->csum = csum_partial(skb->data, sizeof(struct udphdr), in udp_csum_pull_header() 163 skb->csum); in udp_csum_pull_header() [all …]
|
D | gro.h | 79 __wsum csum; member 192 NAPI_GRO_CB(skb)->csum = wsum_negate(csum_partial(start, len, in skb_gro_postpull_rcsum() 193 wsum_negate(NAPI_GRO_CB(skb)->csum))); in skb_gro_postpull_rcsum() 224 !csum_fold(csum_add(psum, NAPI_GRO_CB(skb)->csum))) in __skb_gro_checksum_validate_complete() 227 NAPI_GRO_CB(skb)->csum = psum; in __skb_gro_checksum_validate_complete() 277 NAPI_GRO_CB(skb)->csum = ~pseudo; in __skb_gro_checksum_convert() 319 delta = remcsum_adjust(ptr + hdrlen, NAPI_GRO_CB(skb)->csum, in skb_gro_remcsum_process() 322 /* Adjust skb->csum since we changed the packet */ in skb_gro_remcsum_process() 323 NAPI_GRO_CB(skb)->csum = csum_add(NAPI_GRO_CB(skb)->csum, delta); in skb_gro_remcsum_process()
|
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()
|
/Linux-v6.1/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 …]
|
/Linux-v6.1/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 …]
|
/Linux-v6.1/arch/powerpc/lib/ |
D | checksum_wrappers.c | 17 __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() 30 __wsum csum; in csum_and_copy_to_user() local 35 csum = csum_partial_copy_generic(src, (void __force *)dst, len); in csum_and_copy_to_user() 38 return csum; in csum_and_copy_to_user()
|
/Linux-v6.1/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()
|
/Linux-v6.1/arch/s390/kernel/ |
D | os_info.c | 42 os_info.csum = os_info_csum(&os_info); in os_info_crashkernel_add() 52 os_info.entry[nr].csum = (__force u32)csum_partial(ptr, size, 0); in os_info_entry_add() 53 os_info.csum = os_info_csum(&os_info); in os_info_entry_add() 67 os_info.csum = os_info_csum(&os_info); in os_info_init() 84 u32 csum; in os_info_old_alloc() local 102 csum = (__force u32)csum_partial(buf_align, size, 0); in os_info_old_alloc() 103 if (csum != os_info_old->entry[nr].csum) { in os_info_old_alloc() 142 if (os_info_old->csum != os_info_csum(os_info_old)) in os_info_old_init()
|
/Linux-v6.1/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 …]
|
/Linux-v6.1/fs/btrfs/ |
D | file-item.c | 260 * Return 0 for the range [disk_bytenr, disk_bytenr + sectorsize) has no csum 281 /* Check if the current csum item covers disk_bytenr */ in search_csum_tree() 364 * Lookup the checksum for the read bio in csum tree. 371 * btrfs_bio(bio)->csum instead. 386 u8 *csum; in btrfs_lookup_bio_sums() local 399 * - All our csums should only be in csum tree in btrfs_lookup_bio_sums() 416 bbio->csum = kmalloc_array(nblocks, csum_size, GFP_NOFS); in btrfs_lookup_bio_sums() 417 if (!bbio->csum) { in btrfs_lookup_bio_sums() 422 bbio->csum = bbio->csum_inline; in btrfs_lookup_bio_sums() 424 csum = bbio->csum; in btrfs_lookup_bio_sums() [all …]
|
/Linux-v6.1/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()
|
/Linux-v6.1/block/partitions/ |
D | sgi.c | 32 __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() 64 printk(KERN_WARNING "Dev %s SGI disklabel: csum bad, label corrupted\n", in sgi_partition()
|
D | sun.c | 24 __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() 87 printk("Dev %s Sun disklabel: Csum bad, label corrupted\n", in sun_partition()
|
/Linux-v6.1/net/netfilter/ipvs/ |
D | ip_vs_proto_udp.c | 166 /* ret=2: csum update is needed after payload mangling */ in udp_snat_handler() 184 /* Only port and addr are changed, do fast csum update */ in udp_snat_handler() 193 skb->csum = skb_checksum(skb, udphoff, skb->len - udphoff, 0); in udp_snat_handler() 199 cp->protocol, skb->csum); in udp_snat_handler() 206 skb->csum); in udp_snat_handler() 210 IP_VS_DBG(11, "O-pkt: %s O-csum=%d (+%zd)\n", in udp_snat_handler() 250 /* ret=2: csum update is needed after payload mangling */ in udp_dnat_handler() 268 /* Only port and addr are changed, do fast csum update */ in udp_dnat_handler() 277 skb->csum = skb_checksum(skb, udphoff, skb->len - udphoff, 0); in udp_dnat_handler() 283 cp->protocol, skb->csum); in udp_dnat_handler() [all …]
|
/Linux-v6.1/arch/csky/include/asm/ |
D | checksum.h | 9 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-v6.1/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_ras_eeprom.c | 231 u8 *pp, csum; in __calc_hdr_byte_sum() local 237 csum = 0; in __calc_hdr_byte_sum() 239 csum += *pp; in __calc_hdr_byte_sum() 241 return csum; in __calc_hdr_byte_sum() 251 u8 csum; in amdgpu_ras_eeprom_correct_header_tag() local 253 csum = -hdr->checksum; in amdgpu_ras_eeprom_correct_header_tag() 256 csum -= (hh[0] + hh[1] + hh[2] + hh[3]); in amdgpu_ras_eeprom_correct_header_tag() 258 csum += hh[0] + hh[1] + hh[2] + hh[3]; in amdgpu_ras_eeprom_correct_header_tag() 259 csum = -csum; in amdgpu_ras_eeprom_correct_header_tag() 262 hdr->checksum = csum; in amdgpu_ras_eeprom_correct_header_tag() [all …]
|
/Linux-v6.1/drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/ |
D | csum.c | 20 "TC csum action is only offloaded with pedit"); in csum_offload_supported() 22 "TC csum action is only offloaded with pedit\n"); in csum_offload_supported() 28 "can't offload TC csum action for some header/s"); in csum_offload_supported() 30 "can't offload TC csum action for some header/s - flags %#x\n", in csum_offload_supported()
|
/Linux-v6.1/drivers/net/ethernet/qualcomm/rmnet/ |
D | rmnet_map_data.c | 169 u16 *csum; in rmnet_map_complement_ipv4_txporthdr_csum_field() local 174 csum = (u16 *)rmnet_map_get_csum_field(ip4h->protocol, txphdr); in rmnet_map_complement_ipv4_txporthdr_csum_field() 175 *csum = ~(*csum); in rmnet_map_complement_ipv4_txporthdr_csum_field() 204 u16 *csum; in rmnet_map_complement_ipv6_txporthdr_csum_field() local 209 csum = (u16 *)rmnet_map_get_csum_field(ip6h->nexthdr, txphdr); in rmnet_map_complement_ipv6_txporthdr_csum_field() 210 *csum = ~(*csum); in rmnet_map_complement_ipv6_txporthdr_csum_field() 307 /* Set next_hdr bit for csum offload packets */ in rmnet_map_add_map_header() 365 /* Mapv5 data pkt without csum hdr is invalid */ in rmnet_map_deaggregate() 516 /* Pull csum v5 header */ in rmnet_map_process_next_hdr_packet()
|
/Linux-v6.1/arch/powerpc/include/asm/ |
D | checksum.h | 95 static __always_inline __wsum csum_add(__wsum csum, __wsum addend) in csum_add() argument 98 u64 res = (__force u64)csum; in csum_add() 103 if (__builtin_constant_p(csum) && csum == 0) in csum_add() 106 return csum; in csum_add() 110 : "+r" (csum) : "r" (addend) : "xer"); in csum_add() 111 return csum; in csum_add()
|
/Linux-v6.1/drivers/net/ethernet/sgi/ |
D | ioc3-eth.c | 303 u32 csum, ehsum; in ioc3_tcpudp_checksum() local 330 /* Same as tx - compute csum of pseudo header */ in ioc3_tcpudp_checksum() 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() [all …]
|