/Linux-v5.10/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-v5.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 …]
|
/Linux-v5.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 …]
|
/Linux-v5.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 | udp.h | 37 * @partial_cov: if set indicates partial csum coverage 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() [all …]
|
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()
|
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 | udplite.h | 58 net_dbg_ratelimited("UDPLite: bad csum coverage %d/%d\n", in udplite_checksum_init() 78 __wsum csum = 0; in udplite_csum_outgoing() local 108 csum = skb_checksum(skb, off, (cscov > len)? len : cscov, csum); in udplite_csum_outgoing() 113 return csum; in udplite_csum_outgoing()
|
/Linux-v5.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 …]
|
/Linux-v5.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 …]
|
/Linux-v5.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()
|
/Linux-v5.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()
|
/Linux-v5.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()
|
/Linux-v5.10/fs/btrfs/ |
D | file-item.c | 251 * btrfs_io_bio(bio)->csum instead. 265 u8 *csum; in btrfs_lookup_bio_sums() local 284 btrfs_bio->csum = kmalloc_array(nblocks, csum_size, in btrfs_lookup_bio_sums() 286 if (!btrfs_bio->csum) { in btrfs_lookup_bio_sums() 291 btrfs_bio->csum = btrfs_bio->csum_inline; in btrfs_lookup_bio_sums() 293 csum = btrfs_bio->csum; in btrfs_lookup_bio_sums() 295 csum = dst; in btrfs_lookup_bio_sums() 305 * between reading the free space cache and updating the csum tree. in btrfs_lookup_bio_sums() 322 disk_bytenr, csum, nblocks); in btrfs_lookup_bio_sums() 337 memset(csum, 0, csum_size); in btrfs_lookup_bio_sums() [all …]
|
D | btrfs_inode.h | 341 u64 logical_start, u8 *csum, u8 *csum_expected, int mirror_num) in btrfs_print_data_csum_error() argument 350 "csum failed root %lld ino %lld off %llu csum " CSUM_FMT " expected csum " CSUM_FMT " mirror %d", in btrfs_print_data_csum_error() 353 CSUM_FMT_VALUE(csum_size, csum), in btrfs_print_data_csum_error() 358 "csum failed root %llu ino %llu off %llu csum " CSUM_FMT " expected csum " CSUM_FMT " mirror %d", in btrfs_print_data_csum_error() 361 CSUM_FMT_VALUE(csum_size, csum), in btrfs_print_data_csum_error()
|
/Linux-v5.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 …]
|
/Linux-v5.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()
|
/Linux-v5.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() 65 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 85 for (csum = 0; ush >= ((__be16 *) label);) in sun_partition() 86 csum ^= *ush--; in sun_partition() 87 if (csum) { in sun_partition() 88 printk("Dev %s Sun disklabel: Csum bad, label corrupted\n", in sun_partition()
|
/Linux-v5.10/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-v5.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()
|
/Linux-v5.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()
|
/Linux-v5.10/drivers/net/ethernet/qualcomm/rmnet/ |
D | rmnet_map_data.c | 91 /* RFC 768 - DL4 1's complement rule for UDP csum 0 */ in rmnet_map_ipv4_dl_csum_trailer() 185 u16 *csum; in rmnet_map_complement_ipv4_txporthdr_csum_field() local 190 csum = (u16 *)rmnet_map_get_csum_field(ip4h->protocol, txphdr); in rmnet_map_complement_ipv4_txporthdr_csum_field() 191 *csum = ~(*csum); in rmnet_map_complement_ipv4_txporthdr_csum_field() 227 u16 *csum; in rmnet_map_complement_ipv6_txporthdr_csum_field() local 232 csum = (u16 *)rmnet_map_get_csum_field(ip6h->nexthdr, txphdr); in rmnet_map_complement_ipv6_txporthdr_csum_field() 233 *csum = ~(*csum); in rmnet_map_complement_ipv6_txporthdr_csum_field()
|
/Linux-v5.10/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 …]
|