Home
last modified time | relevance | path

Searched refs:tot_len (Results 1 – 25 of 174) sorted by relevance

1234567

/openbmc/qemu/hw/i386/
H A Dpc_sysfw_ovmf.c43 int tot_len; in pc_system_parse_ovmf_flash() local
73 if (tot_len < 0 || tot_len > (ptr - flash_ptr)) { in pc_system_parse_ovmf_flash()
78 if (tot_len == 0) { in pc_system_parse_ovmf_flash()
83 ovmf_table = g_malloc(tot_len); in pc_system_parse_ovmf_flash()
84 ovmf_table_len = tot_len; in pc_system_parse_ovmf_flash()
91 memcpy(ovmf_table, ptr - tot_len, tot_len); in pc_system_parse_ovmf_flash()
92 ovmf_table += tot_len; in pc_system_parse_ovmf_flash()
110 int tot_len = ovmf_table_len; in pc_system_ovmf_table_find() local
124 while (tot_len >= sizeof(QemuUUID) + sizeof(uint16_t)) { in pc_system_ovmf_table_find()
144 } else if (len > tot_len) { in pc_system_ovmf_table_find()
[all …]
/openbmc/u-boot/fs/btrfs/
H A Dcompression.c15 u32 tot_len, in_len, res; in decompress_lzo() local
22 tot_len = le32_to_cpu(get_unaligned((u32 *)cbuf)); in decompress_lzo()
25 tot_len -= 4; in decompress_lzo()
27 if (tot_len == 0 && dlen) in decompress_lzo()
29 if (tot_len < 4) in decompress_lzo()
34 while (tot_len > 4) { in decompress_lzo()
39 if (in_len > clen || tot_len < 4 + in_len) in decompress_lzo()
42 tot_len -= 4 + in_len; in decompress_lzo()
/openbmc/linux/drivers/mtd/lpddr/
H A Dlpddr2_nvm.c332 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()
358 tot_len += current_len; in lpddr2_nvm_write()
[all …]
/openbmc/linux/include/linux/
H A Dip.h36 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()
/openbmc/linux/tools/testing/selftests/bpf/prog_tests/
H A Dflow_dissector.c118 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES),
162 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES),
208 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES),
235 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES),
378 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES),
381 .iph_inner.tot_len =
407 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES),
410 .iph_inner.tot_len =
435 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES),
439 .iph_inner.tot_len =
/openbmc/u-boot/lib/libavb/
H A Davb_sha.h34 uint32_t tot_len; member
43 uint32_t tot_len; member
H A Davb_sha256.c94 ctx->tot_len = 0; in avb_sha256_init()
324 ctx->tot_len += (block_nb + 1) << 6; in avb_sha256_update()
338 len_b = (ctx->tot_len + ctx->len) << 3; in avb_sha256_final()
H A Davb_sha512.c125 ctx->tot_len = 0; in avb_sha512_init()
322 ctx->tot_len += (block_nb + 1) << 7; in avb_sha512_update()
337 len_b = (ctx->tot_len + ctx->len) << 3; in avb_sha512_final()
/openbmc/linux/net/ipv4/
H A Dxfrm4_input.c60 iph->tot_len = htons(skb->len); in xfrm4_transport_finish()
151 iph->tot_len = htons(ntohs(iph->tot_len) - len); in xfrm4_udp_encap_rcv()
/openbmc/linux/tools/testing/selftests/net/
H A Dnat6to4.c98 .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()
/openbmc/linux/samples/bpf/
H A Dxdp_fwd_kern.c76 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()
/openbmc/linux/net/ipv6/
H A Dseg6_iptunnel.c134 int hdrlen, tot_len, err; in seg6_do_srh_encap() local
138 tot_len = hdrlen + sizeof(*hdr); in seg6_do_srh_encap()
140 err = skb_cow_head(skb, tot_len + skb->mac_len); in seg6_do_srh_encap()
147 skb_push(skb, tot_len); in seg6_do_srh_encap()
196 skb_postpush_rcsum(skb, hdr, tot_len); in seg6_do_srh_encap()
215 int tot_len, err; in seg6_do_srh_encap_red() local
231 tot_len = red_hdrlen + sizeof(struct ipv6hdr); in seg6_do_srh_encap_red()
233 err = skb_cow_head(skb, tot_len + skb->mac_len); in seg6_do_srh_encap_red()
240 skb_push(skb, tot_len); in seg6_do_srh_encap_red()
315 skb_postpush_rcsum(skb, hdr, tot_len); in seg6_do_srh_encap_red()
H A Dexthdrs.c1209 opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC); in ipv6_dup_options()
1212 memcpy(opt2, opt, opt->tot_len); in ipv6_dup_options()
1268 int tot_len = 0; in ipv6_renew_options() local
1274 tot_len += CMSG_ALIGN(ipv6_optlen(opt->hopopt)); in ipv6_renew_options()
1278 tot_len += CMSG_ALIGN(ipv6_optlen(opt->srcrt)); in ipv6_renew_options()
1284 tot_len += CMSG_ALIGN(ipv6_optlen(newopt)); in ipv6_renew_options()
1286 if (!tot_len) in ipv6_renew_options()
1289 tot_len += sizeof(*opt2); in ipv6_renew_options()
1290 opt2 = sock_kmalloc(sk, tot_len, GFP_ATOMIC); in ipv6_renew_options()
1294 memset(opt2, 0, tot_len); in ipv6_renew_options()
[all …]
/openbmc/linux/drivers/net/slip/
H A Dslhc.c405 if(ip->tot_len != cs->cs_ip.tot_len && in slhc_compress()
406 ntohs(cs->cs_ip.tot_len) == hlen) in slhc_compress()
417 deltaS == ntohs(cs->cs_ip.tot_len) - hlen){ in slhc_compress()
424 if(deltaS == ntohs(cs->cs_ip.tot_len) - hlen){ in slhc_compress()
553 i = ntohs(ip->tot_len) - hdrlen; in slhc_uncompress()
561 ntohs(ip->tot_len) - hdrlen); in slhc_uncompress()
611 ip->tot_len = htons(len); in slhc_uncompress()
/openbmc/linux/tools/testing/selftests/bpf/progs/
H A Dtest_tc_neigh_fib.c43 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 Dtest_tc_tunnel.c125 iph_inner.tot_len = bpf_htons(sizeof(iph6_inner) + in __encap_ipv4()
186 h_outer.l4hdr.udp.len = bpf_htons(bpf_ntohs(iph_inner.tot_len) + in __encap_ipv4()
228 h_outer.ip.tot_len = bpf_htons(olen + in __encap_ipv4()
229 bpf_ntohs(h_outer.ip.tot_len)); in __encap_ipv4()
268 __u16 tot_len; in __encap_ipv6() local
316 tot_len = bpf_ntohs(iph_inner.payload_len) + sizeof(iph_inner) + in __encap_ipv6()
319 h_outer.l4hdr.udp.len = bpf_htons(tot_len); in __encap_ipv6()
407 h_outer.ip.payload_len = iph_inner.tot_len; in encap_ipv6_ipip6()
/openbmc/linux/drivers/net/netdevsim/
H A Dpsample.c40 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()
/openbmc/linux/net/ipv4/netfilter/
H A Dnf_reject_ipv4.c27 len = ntohs(iph->tot_len); in nf_reject_iphdr_validate()
67 niph->tot_len = htons(nskb->len); in nf_reject_skb_v4_tcp_reset()
100 if (pskb_trim_rcsum(oldskb, ntohs(ip_hdr(oldskb)->tot_len))) in nf_reject_skb_v4_unreach()
132 niph->tot_len = htons(nskb->len); in nf_reject_skb_v4_unreach()
298 niph->tot_len = htons(nskb->len); in nf_send_reset()
/openbmc/linux/drivers/net/ethernet/fungible/funeth/
H A Dfuneth_rx.c296 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()
/openbmc/linux/net/dccp/
H A Doptions.c507 u8 tot_len, *to; in dccp_insert_fn_opt() local
517 tot_len = 3 + repeat_first + len; in dccp_insert_fn_opt()
519 if (DCCP_SKB_CB(skb)->dccpd_opt_len + tot_len > DCCP_MAX_OPT_LEN) { in dccp_insert_fn_opt()
523 DCCP_SKB_CB(skb)->dccpd_opt_len += tot_len; in dccp_insert_fn_opt()
525 to = skb_push(skb, tot_len); in dccp_insert_fn_opt()
527 *to++ = tot_len; in dccp_insert_fn_opt()
/openbmc/linux/fs/
H A Dread_write.c779 size_t tot_len; in do_iter_read() local
787 tot_len = iov_iter_count(iter); in do_iter_read()
788 if (!tot_len) in do_iter_read()
807 size_t tot_len; in vfs_iocb_iter_read() local
817 tot_len = iov_iter_count(iter); in vfs_iocb_iter_read()
818 if (!tot_len) in vfs_iocb_iter_read()
844 size_t tot_len; in do_iter_write() local
852 tot_len = iov_iter_count(iter); in do_iter_write()
853 if (!tot_len) in do_iter_write()
871 size_t tot_len; in vfs_iocb_iter_write() local
[all …]
/openbmc/qemu/hw/net/
H A Dnet_rx_pkt.c34 uint32_t tot_len; member
99 pkt->tot_len = pllen + pkt->ehdr_buf_len; in net_rx_pkt_pull_data()
105 pkt->tot_len = pllen; in net_rx_pkt_pull_data()
107 iov, iovcnt, ploff, pkt->tot_len); in net_rx_pkt_pull_data()
163 pkt->tot_len, pkt->ehdr_buf_len, pkt->tci); in net_rx_pkt_dump()
187 return pkt->tot_len; in net_rx_pkt_get_total_len()
/openbmc/linux/net/sched/
H A Dact_csum.c400 ntohs(iph->tot_len))) in tcf_csum_ipv4()
406 ntohs(iph->tot_len))) in tcf_csum_ipv4()
412 ntohs(iph->tot_len))) in tcf_csum_ipv4()
418 ntohs(iph->tot_len), 0)) in tcf_csum_ipv4()
424 ntohs(iph->tot_len), 1)) in tcf_csum_ipv4()
429 !tcf_csum_sctp(skb, iph->ihl * 4, ntohs(iph->tot_len))) in tcf_csum_ipv4()
/openbmc/linux/drivers/infiniband/core/
H A Dud_header.c133 { STRUCT_FIELD(ip4, tot_len),
290 iph.tot_len = header->ip4.tot_len; in ib_ud_ip4_csum()
370 header->ip4.tot_len = in ib_ud_header_init()
/openbmc/linux/net/netfilter/
H A Dxt_TCPMSS.c210 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()

1234567