Home
last modified time | relevance | path

Searched refs:len (Results 1 – 25 of 791) sorted by relevance

12345678910>>...32

/net/dccp/
Doptions.c22 u64 dccp_decode_value_var(const u8 *bf, const u8 len) in dccp_decode_value_var() argument
26 if (len >= DCCP_OPTVAL_MAXLEN) in dccp_decode_value_var()
28 if (len > 4) in dccp_decode_value_var()
30 if (len > 3) in dccp_decode_value_var()
32 if (len > 2) in dccp_decode_value_var()
34 if (len > 1) in dccp_decode_value_var()
36 if (len > 0) in dccp_decode_value_var()
58 unsigned char opt, len; in dccp_parse_options() local
67 opt = len = 0; in dccp_parse_options()
70 len = 0; in dccp_parse_options()
[all …]
/net/sunrpc/
Dxdr.c28 unsigned int quadlen = XDR_QUADLEN(obj->len); in xdr_encode_netobj()
31 *p++ = cpu_to_be32(obj->len); in xdr_encode_netobj()
32 memcpy(p, obj->data, obj->len); in xdr_encode_netobj()
33 return p + XDR_QUADLEN(obj->len); in xdr_encode_netobj()
40 unsigned int len; in xdr_decode_netobj() local
42 if ((len = be32_to_cpu(*p++)) > XDR_MAX_NETOBJ) in xdr_decode_netobj()
44 obj->len = len; in xdr_decode_netobj()
46 return p + XDR_QUADLEN(len); in xdr_decode_netobj()
106 u32 len; in xdr_decode_string_inplace() local
108 len = be32_to_cpu(*p++); in xdr_decode_string_inplace()
[all …]
Dsocklib.c31 xdr_skb_read_bits(struct xdr_skb_reader *desc, void *to, size_t len) in xdr_skb_read_bits() argument
33 if (len > desc->count) in xdr_skb_read_bits()
34 len = desc->count; in xdr_skb_read_bits()
35 if (unlikely(skb_copy_bits(desc->skb, desc->offset, to, len))) in xdr_skb_read_bits()
37 desc->count -= len; in xdr_skb_read_bits()
38 desc->offset += len; in xdr_skb_read_bits()
39 return len; in xdr_skb_read_bits()
50 static size_t xdr_skb_read_and_csum_bits(struct xdr_skb_reader *desc, void *to, size_t len) in xdr_skb_read_and_csum_bits() argument
55 if (len > desc->count) in xdr_skb_read_and_csum_bits()
56 len = desc->count; in xdr_skb_read_and_csum_bits()
[all …]
Dsvcsock.c191 int len = 0; in svc_send_common() local
193 slen = xdr->len; in svc_send_common()
198 len = kernel_sendpage(sock, headpage, headoffset, in svc_send_common()
200 if (len != xdr->head[0].iov_len) in svc_send_common()
213 len += result; in svc_send_common()
228 len += result; in svc_send_common()
232 return len; in svc_send_common()
249 int len = 0; in svc_sendto() local
271 len = svc_send_common(sock, xdr, rqstp->rq_respages[0], headoff, in svc_sendto()
277 xdr->len, len, svc_print_addr(rqstp, buf, sizeof(buf))); in svc_sendto()
[all …]
/net/caif/
Dcfpkt_skbuff.c79 static struct cfpkt *cfpkt_create_pfx(u16 len, u16 pfx) in cfpkt_create_pfx() argument
83 skb = alloc_skb(len + pfx, GFP_ATOMIC); in cfpkt_create_pfx()
91 inline struct cfpkt *cfpkt_create(u16 len) in cfpkt_create() argument
93 return cfpkt_create_pfx(len + PKT_POSTFIX, PKT_PREFIX); in cfpkt_create()
105 return skb->len > 0; in cfpkt_more()
108 int cfpkt_peek_head(struct cfpkt *pkt, void *data, u16 len) in cfpkt_peek_head() argument
111 if (skb_headlen(skb) >= len) { in cfpkt_peek_head()
112 memcpy(data, skb->data, len); in cfpkt_peek_head()
115 return !cfpkt_extr_head(pkt, data, len) && in cfpkt_peek_head()
116 !cfpkt_add_head(pkt, data, len); in cfpkt_peek_head()
[all …]
/net/core/
Dskbuff.c105 msg, addr, skb->len, sz, skb->head, skb->data, in skb_panic()
424 struct sk_buff *__netdev_alloc_skb(struct net_device *dev, unsigned int len, in __netdev_alloc_skb() argument
432 len += NET_SKB_PAD; in __netdev_alloc_skb()
434 if ((len > SKB_WITH_OVERHEAD(PAGE_SIZE)) || in __netdev_alloc_skb()
436 skb = __alloc_skb(len, gfp_mask, SKB_ALLOC_RX, NUMA_NO_NODE); in __netdev_alloc_skb()
442 len += SKB_DATA_ALIGN(sizeof(struct skb_shared_info)); in __netdev_alloc_skb()
443 len = SKB_DATA_ALIGN(len); in __netdev_alloc_skb()
450 data = page_frag_alloc(nc, len, gfp_mask); in __netdev_alloc_skb()
455 data = page_frag_alloc(nc, len, gfp_mask); in __netdev_alloc_skb()
463 skb = __build_skb(data, len); in __netdev_alloc_skb()
[all …]
Dpktgen.c803 int len; in get_labels() local
808 len = hex32_arg(&buffer[i], 8, &tmp); in get_labels()
809 if (len <= 0) in get_labels()
810 return len; in get_labels()
814 i += len; in get_labels()
862 int i, max, len; in pktgen_if_write() local
886 len = strn_len(&user_buffer[i], sizeof(name) - 1); in pktgen_if_write()
887 if (len < 0) in pktgen_if_write()
888 return len; in pktgen_if_write()
891 if (copy_from_user(name, &user_buffer[i], len)) in pktgen_if_write()
[all …]
Ddatagram.c185 if (peek_at_off && _off >= skb->len && in __skb_try_recv_from_queue()
187 _off -= skb->len; in __skb_try_recv_from_queue()
190 if (!skb->len) { in __skb_try_recv_from_queue()
333 void __skb_free_datagram_locked(struct sock *sk, struct sk_buff *skb, int len) in __skb_free_datagram_locked() argument
338 sk_peek_offset_bwd(sk, len); in __skb_free_datagram_locked()
343 sk_peek_offset_bwd(sk, len); in __skb_free_datagram_locked()
411 struct iov_iter *to, int len, bool fault_short, in __skb_datagram_iter() argument
421 if (copy > len) in __skb_datagram_iter()
422 copy = len; in __skb_datagram_iter()
427 if ((len -= copy) == 0) in __skb_datagram_iter()
[all …]
/net/sunrpc/auth_gss/
Dgss_krb5_keys.c157 if ((inkey->len != keylength) || (outkey->len != keylength)) in krb5_derive_key()
163 if (crypto_sync_skcipher_setkey(cipher, inkey->data, inkey->len)) in krb5_derive_key()
182 inblock.len = blocksize; in krb5_derive_key()
185 outblock.len = blocksize; in krb5_derive_key()
189 if (in_constant->len == inblock.len) { in krb5_derive_key()
190 memcpy(inblock.data, in_constant->data, inblock.len); in krb5_derive_key()
192 krb5_nfold(in_constant->len * 8, in_constant->data, in krb5_derive_key()
193 inblock.len * 8, inblock.data); in krb5_derive_key()
201 outblock.data, inblock.len); in krb5_derive_key()
203 if ((keybytes - n) <= outblock.len) { in krb5_derive_key()
[all …]
Dsvcauth_gss.c69 return a->len == b->len && 0 == memcmp(a->data, b->data, a->len); in netobj_equal()
111 return hash_mem(item->in_handle.data, item->in_handle.len, RSI_HASHBITS) in rsi_hash()
112 ^ hash_mem(item->in_token.data, item->in_token.len, RSI_HASHBITS); in rsi_hash()
123 static int dup_to_netobj(struct xdr_netobj *dst, char *src, int len) in dup_to_netobj() argument
125 dst->len = len; in dup_to_netobj()
126 dst->data = (len ? kmemdup(src, len, GFP_KERNEL) : NULL); in dup_to_netobj()
127 if (len && !dst->data) in dup_to_netobj()
134 return dup_to_netobj(dst, src->data, src->len); in dup_netobj()
143 new->out_handle.len = 0; in rsi_init()
145 new->out_token.len = 0; in rsi_init()
[all …]
/net/sctp/
Dtsnmap.c31 __u16 len, __u16 *start, __u16 *end);
35 struct sctp_tsnmap *sctp_tsnmap_init(struct sctp_tsnmap *map, __u16 len, in sctp_tsnmap_init() argument
39 map->tsn_map = kzalloc(len>>3, gfp); in sctp_tsnmap_init()
43 map->len = len; in sctp_tsnmap_init()
45 bitmap_zero(map->tsn_map, map->len); in sctp_tsnmap_init()
59 map->len = 0; in sctp_tsnmap_free()
87 if (gap < map->len && test_bit(gap, map->tsn_map)) in sctp_tsnmap_check()
105 if (gap >= map->len && !sctp_tsnmap_grow(map, gap + 1)) in sctp_tsnmap_mark()
164 sctp_tsnmap_find_gap_ack(map->tsn_map, offset, map->len, in sctp_tsnmap_next_gap_ack()
169 end_ = map->len - 1; in sctp_tsnmap_next_gap_ack()
[all …]
/net/netfilter/
Dnf_conntrack_h323_asn1.c298 int len; in decode_oid() local
306 len = *bs->cur++; in decode_oid()
307 bs->cur += len; in decode_oid()
317 unsigned int len; in decode_int() local
333 len = get_bits(bs, 2) + 1; in decode_int()
336 unsigned int v = get_uint(bs, len) + f->lb; in decode_int()
340 bs->cur += len; in decode_int()
346 len = get_len(bs); in decode_int()
347 bs->cur += len; in decode_int()
380 unsigned int len; in decode_bitstr() local
[all …]
Dnf_conntrack_amanda.c60 size_t len; member
65 .len = 8,
69 .len = 1,
73 .len = 5,
77 .len = 5,
81 .len = 6,
85 .len = 6,
98 u_int16_t len; in amanda_help() local
113 if (dataoff >= skb->len) { in amanda_help()
114 net_err_ratelimited("amanda_help: skblen = %u\n", skb->len); in amanda_help()
[all …]
/net/rose/
Drose_subr.c106 int len, faclen; in rose_write_internal() local
110 len = ROSE_MIN_LEN; in rose_write_internal()
114 len += 1 + ROSE_ADDR_LEN + ROSE_ADDR_LEN; in rose_write_internal()
120 len += 2; in rose_write_internal()
124 skb = alloc_skb(reserve + len + maxfaclen, GFP_ATOMIC); in rose_write_internal()
133 dptr = skb_put(skb, len); in rose_write_internal()
239 static int rose_parse_national(unsigned char *p, struct rose_facilities_struct *facilities, int len) in rose_parse_national() argument
248 if (len < 2) in rose_parse_national()
252 len -= 2; in rose_parse_national()
256 if (len < 3) in rose_parse_national()
[all …]
/net/bridge/
Dbr_sysfs_br.c28 const char *buf, size_t len, in store_bridge_parm() argument
51 return err ? err : len; in store_bridge_parm()
64 const char *buf, size_t len) in forward_delay_store() argument
66 return store_bridge_parm(d, buf, len, br_set_forward_delay); in forward_delay_store()
79 size_t len) in hello_time_store() argument
81 return store_bridge_parm(d, buf, len, br_set_hello_time); in hello_time_store()
93 const char *buf, size_t len) in max_age_store() argument
95 return store_bridge_parm(d, buf, len, br_set_max_age); in max_age_store()
113 const char *buf, size_t len) in ageing_time_store() argument
115 return store_bridge_parm(d, buf, len, set_ageing_time); in ageing_time_store()
[all …]
/net/mac80211/
Dfils_aead.c26 size_t num_elem, const u8 *addr[], size_t len[], u8 *v) in aes_s2v() argument
40 crypto_shash_digest(desc, addr[i], len[i], tmp); in aes_s2v()
46 if (len[i] >= AES_BLOCK_SIZE) { in aes_s2v()
49 crypto_shash_update(desc, addr[i], len[i] - AES_BLOCK_SIZE); in aes_s2v()
50 crypto_xor(d, addr[i] + len[i] - AES_BLOCK_SIZE, in aes_s2v()
56 crypto_xor(d, addr[i], len[i]); in aes_s2v()
57 d[len[i]] ^= 0x80; in aes_s2v()
69 size_t len[], u8 *out) in aes_siv_encrypt() argument
82 len[num_elem] = plain_len; in aes_siv_encrypt()
93 res = aes_s2v(tfm, num_elem, addr, len, v); in aes_siv_encrypt()
[all …]
/net/bluetooth/
Da2mp.c23 static struct a2mp_cmd *__a2mp_build(u8 code, u8 ident, u16 len, void *data) in __a2mp_build() argument
28 plen = sizeof(*cmd) + len; in __a2mp_build()
35 cmd->len = cpu_to_le16(len); in __a2mp_build()
37 memcpy(cmd->data, data, len); in __a2mp_build()
42 static void a2mp_send(struct amp_mgr *mgr, u8 code, u8 ident, u16 len, void *data) in a2mp_send() argument
46 u16 total_len = len + sizeof(*cmd); in a2mp_send()
50 cmd = __a2mp_build(code, ident, len, data); in a2mp_send()
120 if (le16_to_cpu(hdr->len) < sizeof(*rej)) in a2mp_command_rej()
134 u16 len = le16_to_cpu(hdr->len); in a2mp_discover_req() local
140 if (len < sizeof(*req)) in a2mp_discover_req()
[all …]
/net/bluetooth/cmtp/
Dcore.c114 size = (skb) ? skb->len + count : count; in cmtp_add_msgpart()
122 if (skb && (skb->len > 0)) in cmtp_add_msgpart()
123 skb_copy_from_linear_data(skb, skb_put(nskb, skb->len), skb->len); in cmtp_add_msgpart()
135 __u16 len; in cmtp_recv_frame() local
137 BT_DBG("session %p skb %p len %d", session, skb, skb->len); in cmtp_recv_frame()
139 while (skb->len > 0) { in cmtp_recv_frame()
145 len = skb->data[1]; in cmtp_recv_frame()
149 len = skb->data[1] | (skb->data[2] << 8); in cmtp_recv_frame()
153 len = 0; in cmtp_recv_frame()
159 BT_DBG("hdr 0x%02x hdrlen %d len %d id %d", hdr, hdrlen, len, id); in cmtp_recv_frame()
[all …]
/net/x25/
Dx25_facilities.c45 unsigned int len; in x25_parse_facilities() local
63 len = skb->data[0]; in x25_parse_facilities()
65 if (!pskb_may_pull(skb, 1 + len)) in x25_parse_facilities()
70 while (len > 0) { in x25_parse_facilities()
73 if (len < 2) in x25_parse_facilities()
115 len -= 2; in x25_parse_facilities()
118 if (len < 3) in x25_parse_facilities()
138 len -= 3; in x25_parse_facilities()
141 if (len < 4) in x25_parse_facilities()
147 len -= 4; in x25_parse_facilities()
[all …]
/net/smc/
Dsmc_tx.c133 int smc_tx_sendmsg(struct smc_sock *smc, struct msghdr *msg, size_t len) in smc_tx_sendmsg() argument
135 size_t copylen, send_done = 0, send_remaining = len; in smc_tx_sendmsg()
186 chunk_len = min_t(size_t, copylen, conn->sndbuf_desc->len - in smc_tx_sendmsg()
212 smc_curs_add(conn->sndbuf_desc->len, &prep, copylen); in smc_tx_sendmsg()
226 (conn->sndbuf_desc->len >> 1))) in smc_tx_sendmsg()
249 int smcd_tx_ism_write(struct smc_connection *conn, void *data, size_t len, in smcd_tx_ism_write() argument
260 rc = smc_ism_write(conn->lgr->smcd, &pos, data, len); in smcd_tx_ism_write()
296 size_t len) in smc_tx_advance_cursors() argument
298 smc_curs_add(conn->peer_rmbe_size, prod, len); in smc_tx_advance_cursors()
302 atomic_sub(len, &conn->peer_rmbe_space); in smc_tx_advance_cursors()
[all …]
/net/ceph/
Dpagevec.c63 loff_t off, size_t len) in ceph_copy_user_to_page_vector() argument
67 int left = len; in ceph_copy_user_to_page_vector()
83 return len; in ceph_copy_user_to_page_vector()
89 loff_t off, size_t len) in ceph_copy_to_page_vector() argument
93 size_t left = len; in ceph_copy_to_page_vector()
112 loff_t off, size_t len) in ceph_copy_from_page_vector() argument
116 size_t left = len; in ceph_copy_from_page_vector()
137 void ceph_zero_page_vector_range(int off, int len, struct page **pages) in ceph_zero_page_vector_range() argument
143 dout("zero_page_vector_page %u~%u\n", off, len); in ceph_zero_page_vector_range()
147 int end = min((int)PAGE_SIZE, off + len); in ceph_zero_page_vector_range()
[all …]
/net/ipv4/
Dxfrm4_input.c65 iph->tot_len = htons(skb->len); in xfrm4_transport_finish()
92 int iphlen, len; in xfrm4_udp_encap_rcv() local
104 len = skb->len - sizeof(struct udphdr); in xfrm4_udp_encap_rcv()
105 if (!pskb_may_pull(skb, sizeof(struct udphdr) + min(len, 8))) in xfrm4_udp_encap_rcv()
117 if (len == 1 && udpdata[0] == 0xff) { in xfrm4_udp_encap_rcv()
119 } else if (len > sizeof(struct ip_esp_hdr) && udpdata32[0] != 0) { in xfrm4_udp_encap_rcv()
121 len = sizeof(struct udphdr); in xfrm4_udp_encap_rcv()
128 if (len == 1 && udpdata[0] == 0xff) { in xfrm4_udp_encap_rcv()
130 } else if (len > 2 * sizeof(u32) + sizeof(struct ip_esp_hdr) && in xfrm4_udp_encap_rcv()
134 len = sizeof(struct udphdr) + 2 * sizeof(u32); in xfrm4_udp_encap_rcv()
[all …]
/net/ipv6/
Dmcast_snoop.c17 unsigned int len; in ipv6_mc_check_ip6hdr() local
28 len = offset + ntohs(ip6h->payload_len); in ipv6_mc_check_ip6hdr()
29 if (skb->len < len || len <= offset) in ipv6_mc_check_ip6hdr()
66 unsigned int len = skb_transport_offset(skb); in ipv6_mc_check_mld_reportv2() local
68 len += sizeof(struct mld2_report); in ipv6_mc_check_mld_reportv2()
70 return ipv6_mc_may_pull(skb, len) ? 0 : -EINVAL; in ipv6_mc_check_mld_reportv2()
77 unsigned int len; in ipv6_mc_check_mld_query() local
89 len = skb_transport_offset(skb) + sizeof(struct mld2_query); in ipv6_mc_check_mld_query()
90 if (!ipv6_mc_may_pull(skb, len)) in ipv6_mc_check_mld_query()
108 unsigned int len = skb_transport_offset(skb) + sizeof(struct mld_msg); in ipv6_mc_check_mld_msg() local
[all …]
/net/decnet/
Dsysctl_net_decnet.c141 size_t len; in dn_node_address_handler() local
150 len = (*lenp < DN_ASCBUF_LEN) ? *lenp : (DN_ASCBUF_LEN-1); in dn_node_address_handler()
152 if (copy_from_user(addr, buffer, len)) in dn_node_address_handler()
155 addr[len] = 0; in dn_node_address_handler()
167 *ppos += len; in dn_node_address_handler()
173 len = strlen(addr); in dn_node_address_handler()
174 addr[len++] = '\n'; in dn_node_address_handler()
176 if (len > *lenp) len = *lenp; in dn_node_address_handler()
178 if (copy_to_user(buffer, addr, len)) in dn_node_address_handler()
181 *lenp = len; in dn_node_address_handler()
[all …]
/net/dsa/
Dmaster.c18 int len; in dsa_master_get_regs_len() local
21 len = ops->get_regs_len(dev); in dsa_master_get_regs_len()
22 if (len < 0) in dsa_master_get_regs_len()
23 return len; in dsa_master_get_regs_len()
24 ret += len; in dsa_master_get_regs_len()
31 len = ds->ops->get_regs_len(ds, port); in dsa_master_get_regs_len()
32 if (len < 0) in dsa_master_get_regs_len()
33 return len; in dsa_master_get_regs_len()
34 ret += len; in dsa_master_get_regs_len()
49 int len; in dsa_master_get_regs() local
[all …]

12345678910>>...32