| /linux/drivers/mtd/lpddr/ |
| H A D | lpddr2_nvm.c | 321 u_long add, current_len, tot_len, target_len, my_data; in lpddr2_nvm_write() local 332 tot_len = 0; in lpddr2_nvm_write() 334 while (tot_len < target_len) { in lpddr2_nvm_write() 336 my_data = write_buf[tot_len]; in lpddr2_nvm_write() 337 my_data += (write_buf[tot_len+1]) << 8; in lpddr2_nvm_write() 339 my_data += (write_buf[tot_len+2]) << 16; in lpddr2_nvm_write() 340 my_data += (write_buf[tot_len+3]) << 24; in lpddr2_nvm_write() 348 tot_len += pcm_data->bus_width; in lpddr2_nvm_write() 350 current_len = min(target_len - tot_len, in lpddr2_nvm_write() 353 0x00, add, current_len, write_buf + tot_len); in lpddr2_nvm_write() [all …]
|
| /linux/include/linux/ |
| H A D | ip.h | 36 return ntohs(ip_hdr(skb)->tot_len) - skb_network_header_len(skb); in ip_transport_len() 41 u32 len = ntohs(iph->tot_len); in iph_totlen() 57 iph->tot_len = len <= IP_MAX_MTU ? htons(len) : 0; in iph_set_totlen()
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | flow_dissector.c | 105 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES), 149 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES), 195 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES), 222 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES), 365 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES), 368 .iph_inner.tot_len = 394 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES), 397 .iph_inner.tot_len = 422 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES), 426 .iph_inner.tot_len = [all …]
|
| /linux/fs/ |
| H A D | read_write.c | 872 size_t tot_len; in vfs_iocb_iter_read() local 882 tot_len = iov_iter_count(iter); in vfs_iocb_iter_read() 883 if (!tot_len) in vfs_iocb_iter_read() 885 ret = rw_verify_area(READ, file, &iocb->ki_pos, tot_len); in vfs_iocb_iter_read() 900 size_t tot_len; in vfs_iter_read() local 910 tot_len = iov_iter_count(iter); in vfs_iter_read() 911 if (!tot_len) in vfs_iter_read() 913 ret = rw_verify_area(READ, file, ppos, tot_len); in vfs_iter_read() 932 size_t tot_len; in vfs_iocb_iter_write() local 942 tot_len = iov_iter_count(iter); in vfs_iocb_iter_write() [all …]
|
| /linux/tools/testing/selftests/net/ |
| H A D | nat6to4.bpf.c | 98 .tot_len = bpf_htons(bpf_ntohs(ip6->payload_len) + sizeof(struct iphdr)), // u16 in sched_cls_ingress6_nat_6_prog() 179 if (bpf_htons(ip4->tot_len) > 0xFFFF - sizeof(struct ipv6hdr)) in sched_cls_egress4_snat4_prog() 196 if (bpf_ntohs(ip4->tot_len) < sizeof(*ip4)) in sched_cls_egress4_snat4_prog() 233 .payload_len = bpf_htons(bpf_ntohs(ip4->tot_len) - 20), // __be16 in sched_cls_egress4_snat4_prog()
|
| /linux/samples/bpf/ |
| H A D | xdp_fwd_kern.c | 76 fib_params.tot_len = ntohs(iph->tot_len); in xdp_fwd_flags() 95 fib_params.tot_len = ntohs(ip6h->payload_len); in xdp_fwd_flags()
|
| H A D | xdp_tx_iptunnel_kern.c | 103 payload_len = ntohs(iph->tot_len); in handle_ipv4() 135 iph->tot_len = htons(payload_len + sizeof(*iph)); in handle_ipv4()
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | xdp_flowtable.c | 104 tuple.tot_len = bpf_ntohs(iph->tot_len); in xdp_flowtable_do_lookup() 129 tuple.tot_len = bpf_ntohs(ip6h->payload_len); in xdp_flowtable_do_lookup()
|
| H A D | test_tc_tunnel.c | 138 iph_inner.tot_len = bpf_htons(sizeof(iph6_inner) + in __encap_ipv4() 199 h_outer.l4hdr.udp.len = bpf_htons(bpf_ntohs(iph_inner.tot_len) + in __encap_ipv4() 241 h_outer.ip.tot_len = bpf_htons(olen + in __encap_ipv4() 242 bpf_ntohs(h_outer.ip.tot_len)); in __encap_ipv4() 281 __u16 tot_len; in __encap_ipv6() local 329 tot_len = bpf_ntohs(iph_inner.payload_len) + sizeof(iph_inner) + in __encap_ipv6() 332 h_outer.l4hdr.udp.len = bpf_htons(tot_len); in __encap_ipv6() 419 h_outer.ip.payload_len = iph_inner.tot_len; in encap_ipv6_ipip6()
|
| H A D | test_tc_neigh_fib.c | 43 fib_params->tot_len = bpf_ntohs(ip4h->tot_len); in fill_fib_params_v4() 71 fib_params->tot_len = bpf_ntohs(ip6h->payload_len); in fill_fib_params_v6()
|
| H A D | test_tc_change_tail_pmtu.c | 70 if (bpf_ntohs(ip->tot_len) <= sizeof(*ip) + tcp->doff * 4) in change_tail_icmp() 116 ip->tot_len = bpf_htons(ICMP_HDRS_LEN + ICMP_SAMPLE_LEN); in change_tail_icmp()
|
| H A D | test_xdp.c | 105 payload_len = bpf_ntohs(iph->tot_len); in handle_ipv4() 135 iph->tot_len = bpf_htons(payload_len + sizeof(*iph)); in handle_ipv4()
|
| H A D | test_xdp_loop.c | 101 payload_len = bpf_ntohs(iph->tot_len); in handle_ipv4() 131 iph->tot_len = bpf_htons(payload_len + sizeof(*iph)); in handle_ipv4()
|
| /linux/drivers/net/netdevsim/ |
| H A D | psample.c | 40 int tot_len, data_len = NSIM_PSAMPLE_L4_DATA_LEN; in nsim_dev_psample_skb_build() local 49 tot_len = sizeof(struct iphdr) + sizeof(struct udphdr) + data_len; in nsim_dev_psample_skb_build() 66 iph->tot_len = htons(tot_len); in nsim_dev_psample_skb_build()
|
| /linux/net/dccp/ |
| H A D | options.c | |
| /linux/net/ipv6/ |
| H A D | exthdrs.c | 1232 opt2 = sock_kmemdup(sk, opt, opt->tot_len, GFP_ATOMIC); in ipv6_dup_options() 1290 int tot_len = 0; in ipv6_renew_options() local 1296 tot_len += CMSG_ALIGN(ipv6_optlen(opt->hopopt)); in ipv6_renew_options() 1298 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst0opt)); in ipv6_renew_options() 1300 tot_len += CMSG_ALIGN(ipv6_optlen(opt->srcrt)); in ipv6_renew_options() 1302 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst1opt)); in ipv6_renew_options() 1306 tot_len += CMSG_ALIGN(ipv6_optlen(newopt)); in ipv6_renew_options() 1308 if (!tot_len) in ipv6_renew_options() 1311 tot_len += sizeof(*opt2); in ipv6_renew_options() 1312 opt2 = sock_kmalloc(sk, tot_len, GFP_ATOMIC); in ipv6_renew_options() [all …]
|
| H A D | seg6_iptunnel.c | 150 int hdrlen, tot_len, err; in __seg6_do_srh_encap() local 154 tot_len = hdrlen + sizeof(*hdr); in __seg6_do_srh_encap() 156 err = skb_cow_head(skb, tot_len + dst_dev_overhead(cache_dst, skb)); in __seg6_do_srh_encap() 163 skb_push(skb, tot_len); in __seg6_do_srh_encap() 212 skb_postpush_rcsum(skb, hdr, tot_len); in __seg6_do_srh_encap() 240 int tot_len, err; in seg6_do_srh_encap_red() local 256 tot_len = red_hdrlen + sizeof(struct ipv6hdr); in seg6_do_srh_encap_red() 258 err = skb_cow_head(skb, tot_len + dst_dev_overhead(cache_dst, skb)); in seg6_do_srh_encap_red() 265 skb_push(skb, tot_len); in seg6_do_srh_encap_red() 340 skb_postpush_rcsum(skb, hdr, tot_len); in seg6_do_srh_encap_red()
|
| /linux/net/ipv4/ |
| H A D | xfrm4_input.c | 63 iph->tot_len = htons(skb->len); in xfrm4_transport_finish() 134 iph->tot_len = htons(ntohs(iph->tot_len) - len); in __xfrm4_udp_encap_rcv()
|
| H A D | af_inet.c | 1372 int proto, tot_len; in inet_gso_segment() local 1432 tot_len = skb->len - nhoff; in inet_gso_segment() 1440 tot_len = skb_shinfo(skb)->gso_size + in inet_gso_segment() 1444 tot_len = skb->len - nhoff; in inet_gso_segment() 1448 tot_len = skb->len - nhoff; in inet_gso_segment() 1450 iph->tot_len = htons(tot_len); in inet_gso_segment() 1601 __be16 totlen = iph->tot_len; in inet_gro_complete() 1611 csum_replace2(&iph->check, totlen, iph->tot_len); in inet_gro_complete()
|
| /linux/net/ipv4/netfilter/ |
| H A D | nf_reject_ipv4.c | 37 len = ntohs(iph->tot_len); in nf_reject_iphdr_validate() 77 niph->tot_len = htons(nskb->len); in nf_reject_skb_v4_tcp_reset() 135 if (pskb_trim_rcsum(oldskb, ntohs(ip_hdr(oldskb)->tot_len))) in nf_reject_skb_v4_unreach() 167 niph->tot_len = htons(nskb->len); in nf_reject_skb_v4_unreach() 331 niph->tot_len = htons(nskb->len); in nf_send_reset()
|
| /linux/net/sched/ |
| H A D | act_csum.c | 405 ntohs(iph->tot_len))) in tcf_csum_ipv4() 411 ntohs(iph->tot_len))) in tcf_csum_ipv4() 417 ntohs(iph->tot_len))) in tcf_csum_ipv4() 423 ntohs(iph->tot_len), 0)) in tcf_csum_ipv4() 429 ntohs(iph->tot_len), 1)) in tcf_csum_ipv4() 434 !tcf_csum_sctp(skb, iph->ihl * 4, ntohs(iph->tot_len))) in tcf_csum_ipv4()
|
| /linux/net/psp/ |
| H A D | psp_main.c | 270 be16_add_cpu(&ip_hdr(skb)->tot_len, PSP_ENCAP_HLEN); in psp_dev_encapsulate() 380 if (unlikely(ntohs(iph->tot_len) < l3_hlen + encap)) in psp_dev_rcv() 384 iph->tot_len = htons(ntohs(iph->tot_len) - encap); in psp_dev_rcv()
|
| /linux/net/netfilter/ |
| H A D | xt_TCPMSS.c | 210 newlen = htons(ntohs(iph->tot_len) + ret); in tcpmss_tg4() 211 csum_replace2(&iph->check, iph->tot_len, newlen); in tcpmss_tg4() 212 iph->tot_len = newlen; in tcpmss_tg4()
|
| /linux/drivers/net/ethernet/fungible/funeth/ |
| H A D | funeth_tx.c | 516 unsigned int idx, nfrags = 1, ndesc = 1, tot_len = xdpf->len; in fun_xdp_tx() local 527 tot_len = xdp_get_frame_len(xdpf); in fun_xdp_tx() 554 req->dataop = FUN_DATAOP_HDR_INIT(nfrags, 0, nfrags, 0, tot_len); in fun_xdp_tx() 561 q->stats.tx_bytes += tot_len; in fun_xdp_tx() 565 trace_funeth_tx(q, tot_len, idx, nfrags); in fun_xdp_tx()
|
| /linux/tools/testing/selftests/drivers/net/ |
| H A D | gro.c | |