| /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/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/net/ipv6/ |
| H A D | seg6_iptunnel.c | 148 int hdrlen, tot_len, err; in __seg6_do_srh_encap() local 152 tot_len = hdrlen + sizeof(*hdr); in __seg6_do_srh_encap() 154 err = skb_cow_head(skb, tot_len + dst_dev_overhead(cache_dst, skb)); in __seg6_do_srh_encap() 161 skb_push(skb, tot_len); in __seg6_do_srh_encap() 210 skb_postpush_rcsum(skb, hdr, tot_len); in __seg6_do_srh_encap() 238 int tot_len, err; in seg6_do_srh_encap_red() local 254 tot_len = red_hdrlen + sizeof(struct ipv6hdr); in seg6_do_srh_encap_red() 256 err = skb_cow_head(skb, tot_len + dst_dev_overhead(cache_dst, skb)); in seg6_do_srh_encap_red() 263 skb_push(skb, tot_len); in seg6_do_srh_encap_red() 338 skb_postpush_rcsum(skb, hdr, tot_len); in seg6_do_srh_encap_red()
|
| H A D | exthdrs.c | 1222 opt2 = sock_kmemdup(sk, opt, opt->tot_len, GFP_ATOMIC); in ipv6_dup_options() 1280 int tot_len = 0; in ipv6_renew_options() local 1286 tot_len += CMSG_ALIGN(ipv6_optlen(opt->hopopt)); in ipv6_renew_options() 1288 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst0opt)); in ipv6_renew_options() 1290 tot_len += CMSG_ALIGN(ipv6_optlen(opt->srcrt)); in ipv6_renew_options() 1292 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst1opt)); in ipv6_renew_options() 1296 tot_len += CMSG_ALIGN(ipv6_optlen(newopt)); in ipv6_renew_options() 1298 if (!tot_len) in ipv6_renew_options() 1301 tot_len += sizeof(*opt2); in ipv6_renew_options() 1302 opt2 = sock_kmalloc(sk, tot_len, GFP_ATOMIC); in ipv6_renew_options() [all …]
|
| /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 | 101 tuple.tot_len = bpf_ntohs(iph->tot_len); in xdp_flowtable_do_lookup() 126 tuple.tot_len = bpf_ntohs(ip6h->payload_len); in xdp_flowtable_do_lookup()
|
| H A D | test_tc_tunnel.c | 121 iph_inner.tot_len = bpf_htons(sizeof(iph6_inner) + in __encap_ipv4() 182 h_outer.l4hdr.udp.len = bpf_htons(bpf_ntohs(iph_inner.tot_len) + in __encap_ipv4() 224 h_outer.ip.tot_len = bpf_htons(olen + in __encap_ipv4() 225 bpf_ntohs(h_outer.ip.tot_len)); in __encap_ipv4() 264 __u16 tot_len; in __encap_ipv6() 312 tot_len = bpf_ntohs(iph_inner.payload_len) + sizeof(iph_inner) + in __encap_ipv6() 315 h_outer.l4hdr.udp.len = bpf_htons(tot_len); in __encap_ipv6() 402 h_outer.ip.payload_len = iph_inner.tot_len; in encap_ipv6_ipip6() 271 __u16 tot_len; __encap_ipv6() local
|
| 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_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()
|
| H A D | test_xdp_dynptr.c | 114 payload_len = bpf_ntohs(iph->tot_len); in handle_ipv4() 143 iph->tot_len = bpf_htons(payload_len + iphdr_sz); in handle_ipv4()
|
| H A D | test_lwt_ip_encap.c | 39 hdr.iph.tot_len = bpf_htons(skb->len + sizeof(struct encap_hdr)); in bpf_lwt_encap_gre()
|
| /linux/drivers/net/ethernet/fungible/funeth/ |
| H A D | funeth_rx.c | 296 static int fun_gather_pkt(struct funeth_rxq *q, unsigned int tot_len, in fun_gather_pkt() argument 304 buf = get_buf(q, buf, tot_len); in fun_gather_pkt() 317 frag_len = min_t(unsigned int, tot_len, in fun_gather_pkt() 329 tot_len -= frag_len; in fun_gather_pkt() 330 if (!tot_len) in fun_gather_pkt() 368 unsigned int i, tot_len, pkt_len = be32_to_cpu(rxreq->pkt_len); in fun_handle_cqe_pkt() local 387 tot_len = pkt_len; in fun_handle_cqe_pkt() 390 tot_len += FUN_RX_TAILROOM + headroom; in fun_handle_cqe_pkt() 392 ref_ok = fun_gather_pkt(q, tot_len, frags); in fun_handle_cqe_pkt() 406 skb = napi_build_skb(va, ALIGN(tot_len, FUN_EPRQ_PKT_ALIGN)); in fun_handle_cqe_pkt()
|
| 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/net/dccp/ |
| H A D | options.c | |
| /linux/net/ipv4/ |
| H A D | xfrm4_input.c | 63 iph->tot_len = htons(skb->len); in xfrm4_transport_finish() 136 iph->tot_len = htons(ntohs(iph->tot_len) - len); in __xfrm4_udp_encap_rcv()
|
| H A D | af_inet.c | 1375 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/sched/ |
| H A D | act_csum.c | 401 ntohs(iph->tot_len))) in tcf_csum_ipv4() 407 ntohs(iph->tot_len))) in tcf_csum_ipv4() 413 ntohs(iph->tot_len))) in tcf_csum_ipv4() 419 ntohs(iph->tot_len), 0)) in tcf_csum_ipv4() 425 ntohs(iph->tot_len), 1)) in tcf_csum_ipv4() 430 !tcf_csum_sctp(skb, iph->ihl * 4, ntohs(iph->tot_len))) in tcf_csum_ipv4()
|
| /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/net/psp/ |
| H A D | psp_main.c | 242 be16_add_cpu(&ip_hdr(skb)->tot_len, PSP_ENCAP_HLEN); in psp_dev_encapsulate() 352 iph->tot_len = htons(ntohs(iph->tot_len) - encap); in psp_dev_rcv()
|
| /linux/tools/testing/selftests/drivers/net/ |
| H A D | gro.c | |
| /linux/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
| H A D | ipsec_rxtx.c | 66 ipv4hdr->tot_len = htons(ntohs(ipv4hdr->tot_len) - trailer_len); in mlx5e_ipsec_remove_trailer()
|