Home
last modified time | relevance | path

Searched refs:length (Results 1 – 25 of 147) sorted by relevance

123456

/net/sunrpc/auth_gss/
Dgss_generic_token.c76 der_length_size( int length) in der_length_size() argument
78 if (length < (1<<7)) in der_length_size()
80 else if (length < (1<<8)) in der_length_size()
86 else if (length < (1<<16)) in der_length_size()
88 else if (length < (1<<24)) in der_length_size()
96 der_write_length(unsigned char **buf, int length) in der_write_length() argument
98 if (length < (1<<7)) { in der_write_length()
99 *(*buf)++ = (unsigned char) length; in der_write_length()
101 *(*buf)++ = (unsigned char) (der_length_size(length)+127); in der_write_length()
103 if (length >= (1<<24)) in der_write_length()
[all …]
Dgss_krb5_crypto.c108 int length) in krb5_encrypt() argument
115 if (length % crypto_sync_skcipher_blocksize(tfm) != 0) in krb5_encrypt()
127 memcpy(out, in, length); in krb5_encrypt()
128 sg_init_one(sg, out, length); in krb5_encrypt()
132 skcipher_request_set_crypt(req, sg, sg, length, local_iv); in krb5_encrypt()
163 int length) in krb5_decrypt() argument
170 if (length % crypto_sync_skcipher_blocksize(tfm) != 0) in krb5_decrypt()
181 memcpy(out, in, length); in krb5_decrypt()
182 sg_init_one(sg, out, length); in krb5_decrypt()
186 skcipher_request_set_crypt(req, sg, sg, length, local_iv); in krb5_decrypt()
[all …]
Dgss_rpc_xdr.c65 u32 length; in gssx_dec_buffer() local
72 length = be32_to_cpup(p); in gssx_dec_buffer()
73 p = xdr_inline_decode(xdr, length); in gssx_dec_buffer()
81 if (length > buf->len) in gssx_dec_buffer()
85 buf->data = kmemdup(p, length, GFP_KERNEL); in gssx_dec_buffer()
89 memcpy(buf->data, p, length); in gssx_dec_buffer()
91 buf->len = length; in gssx_dec_buffer()
171 u32 length; in gssx_dec_linux_creds() local
181 length = be32_to_cpup(p); in gssx_dec_linux_creds()
183 if (length > (3 + NGROUPS_MAX) * sizeof(u32)) in gssx_dec_linux_creds()
[all …]
/net/sctp/
Dsm_make_chunk.c152 err.length = htons(len); in sctp_init_cause()
287 if (auth_hmacs->length) in sctp_make_init()
288 chunksize += SCTP_PAD4(ntohs(auth_hmacs->length)); in sctp_make_init()
294 if (auth_chunks->length) in sctp_make_init()
295 chunksize += SCTP_PAD4(ntohs(auth_chunks->length)); in sctp_make_init()
336 sat.param_hdr.length = htons(SCTP_SAT_LEN(num_types)); in sctp_make_init()
348 ext_param.param_hdr.length = htons(sizeof(ext_param) + num_ext); in sctp_make_init()
358 aiparam.param_hdr.length = htons(sizeof(aiparam)); in sctp_make_init()
368 sctp_addto_chunk(retval, ntohs(auth_hmacs->length), in sctp_make_init()
371 sctp_addto_chunk(retval, ntohs(auth_chunks->length), in sctp_make_init()
[all …]
Dauth.c195 random_len = ntohs(random->param_hdr.length); in sctp_auth_make_key_vector()
196 hmacs_len = ntohs(hmacs->param_hdr.length); in sctp_auth_make_key_vector()
198 chunks_len = ntohs(chunks->param_hdr.length); in sctp_auth_make_key_vector()
542 n_elt = (ntohs(hmacs->param_hdr.length) - in sctp_auth_asoc_get_hmac()
594 n_elt = (ntohs(hmacs->param_hdr.length) - in sctp_auth_asoc_verify_hmac_id()
618 n_params = (ntohs(hmacs->param_hdr.length) - in sctp_auth_asoc_set_default_hmac()
644 if (!param || param->param_hdr.length == 0) in __sctp_auth_cid()
647 len = ntohs(param->param_hdr.length) - sizeof(struct sctp_paramhdr); in __sctp_auth_cid()
767 param_len = ntohs(p->param_hdr.length); in sctp_auth_ep_add_chunkid()
773 p->param_hdr.length = htons(param_len + 1); in sctp_auth_ep_add_chunkid()
[all …]
/net/ethtool/
Deeprom.c11 u32 length; member
19 u32 length; member
34 u32 length = request->length; in fallback_set_params() local
47 eeprom->len = length; in fallback_set_params()
79 reply->length = eeprom.len; in eeprom_fallback()
114 page_data.length = request->length; in eeprom_prepare_data()
118 page_data.data = kmalloc(page_data.length, GFP_KERNEL); in eeprom_prepare_data()
130 reply->length = ret; in eeprom_prepare_data()
159 request->length = nla_get_u32(tb[ETHTOOL_A_MODULE_EEPROM_LENGTH]); in eeprom_parse_request()
175 request->offset + request->length > ETH_MODULE_EEPROM_PAGE_LEN) { in eeprom_parse_request()
[all …]
/net/wireless/
Dwext-priv.c27 if (wrqu->data.length < dev->wireless_handlers->num_private_args) { in iw_handler_get_private()
31 wrqu->data.length = dev->wireless_handlers->num_private_args; in iw_handler_get_private()
36 wrqu->data.length = dev->wireless_handlers->num_private_args; in iw_handler_get_private()
40 sizeof(struct iw_priv_args) * wrqu->data.length); in iw_handler_get_private()
67 int num = iwp->length; in adjust_priv_size()
147 if (!iwp->pointer && iwp->length != 0) in ioctl_private_iw_point()
150 if (iwp->length > (descr->set_args & IW_PRIV_SIZE_MASK)) in ioctl_private_iw_point()
160 if (IW_IS_SET(cmd) && (iwp->length != 0)) { in ioctl_private_iw_point()
232 iwp.length = iwp_compat->length; in compat_private_call()
239 iwp_compat->length = iwp.length; in compat_private_call()
Dwext-core.c513 if (wrqu->data.length > descr->max_tokens) { in wireless_send_event()
515 cmd, wrqu->data.length); in wireless_send_event()
518 if (wrqu->data.length < descr->min_tokens) { in wireless_send_event()
520 cmd, wrqu->data.length); in wireless_send_event()
525 extra_len = wrqu->data.length * descr->token_size; in wireless_send_event()
618 compat_wrqu.length = wrqu->data.length; in wireless_send_event()
690 wrqu->data.length = sizeof(struct iw_statistics); in iw_handler_get_iwstats()
758 if (iwp->length == descr->max_tokens + 1) in ioctl_standard_iw_point()
760 else if (IW_IS_SET(cmd) && (iwp->length != 0)) { in ioctl_standard_iw_point()
763 len = iwp->length * descr->token_size; in ioctl_standard_iw_point()
[all …]
Dwext-spy.c52 if (wrqu->data.length > 0) { in iw_handler_set_spy()
56 for (i = 0; i < wrqu->data.length; i++) in iw_handler_set_spy()
68 spydata->spy_number = wrqu->data.length; in iw_handler_set_spy()
87 wrqu->data.length = spydata->spy_number; in iw_handler_get_spy()
170 wrqu.data.length = 1; in iw_send_thrspy_event()
/net/nsh/
Dnsh.c18 size_t length = nsh_hdr_len(pushed_nh); in nsh_push() local
30 if (skb_cow_head(skb, length) < 0) in nsh_push()
33 skb_push(skb, length); in nsh_push()
35 memcpy(nh, pushed_nh, length); in nsh_push()
37 skb_postpush_rcsum(skb, nh, length); in nsh_push()
51 size_t length; in nsh_pop() local
57 length = nsh_hdr_len(nh); in nsh_pop()
58 if (length < NSH_BASE_HDR_LEN) in nsh_pop()
61 if (!pskb_may_pull(skb, length)) in nsh_pop()
67 skb_pull_rcsum(skb, length); in nsh_pop()
/net/sunrpc/xprtrdma/
Dsvc_rdma_pcl.c70 u32 handle, u32 length, u64 offset) in pcl_set_read_segment() argument
76 segment->rs_length = length; in pcl_set_read_segment()
81 chunk->ch_length += length; in pcl_set_read_segment()
110 u32 position, handle, length; in pcl_alloc_call() local
115 &length, &offset); in pcl_alloc_call()
130 pcl_set_read_segment(rctxt, chunk, handle, length, offset); in pcl_alloc_call()
164 u32 position, handle, length; in pcl_alloc_read() local
169 &length, &offset); in pcl_alloc_read()
181 pcl_set_read_segment(rctxt, chunk, handle, length, offset); in pcl_alloc_read()
233 unsigned int offset, unsigned int length, in pcl_process_region() argument
[all …]
Dsvc_rdma_rw.c559 unsigned long length) in svc_rdma_pages_write() argument
564 length); in svc_rdma_pages_write()
860 unsigned int start, length; in svc_rdma_read_multiple_chunks() local
865 length = chunk->ch_position; in svc_rdma_read_multiple_chunks()
866 ret = svc_rdma_copy_inline_range(info, start, length); in svc_rdma_read_multiple_chunks()
879 start += length; in svc_rdma_read_multiple_chunks()
880 length = next->ch_position - info->ri_totalbytes; in svc_rdma_read_multiple_chunks()
881 ret = svc_rdma_copy_inline_range(info, start, length); in svc_rdma_read_multiple_chunks()
886 start += length; in svc_rdma_read_multiple_chunks()
887 length = head->rc_byte_len - start; in svc_rdma_read_multiple_chunks()
[all …]
Dsvc_rdma_sendto.c248 ctxt->sc_sges[i].length, in svc_rdma_send_ctxt_put()
252 ctxt->sc_sges[i].length); in svc_rdma_send_ctxt_put()
323 wr->sg_list[0].length, in svc_rdma_send()
386 u32 length; in svc_rdma_encode_write_segment() local
393 length = min_t(u32, *remaining, segment->rs_length); in svc_rdma_encode_write_segment()
394 *remaining -= length; in svc_rdma_encode_write_segment()
395 xdr_encode_rdma_segment(p, segment->rs_handle, length, in svc_rdma_encode_write_segment()
397 trace_svcrdma_encode_wseg(sctxt, segno, segment->rs_handle, length, in svc_rdma_encode_write_segment()
491 unsigned int length) in svc_rdma_encode_reply_chunk() argument
499 if (length > chunk->ch_length) in svc_rdma_encode_reply_chunk()
[all …]
Drpc_rdma.c548 ib_dma_unmap_page(rdmab_device(rb), sge->addr, sge->length, in rpcrdma_sendctx_unmap()
564 sge->length = len; in rpcrdma_prepare_hdr_sge()
567 ib_dma_sync_single_for_device(rdmab_device(rb), sge->addr, sge->length, in rpcrdma_prepare_hdr_sge()
585 sge->length = len; in rpcrdma_prepare_head_iov()
588 ib_dma_sync_single_for_device(rdmab_device(rb), sge->addr, sge->length, in rpcrdma_prepare_head_iov()
616 sge->length = len; in rpcrdma_prepare_pagelist()
650 sge->length = len; in rpcrdma_prepare_tail_iov()
1168 static int decode_rdma_segment(struct xdr_stream *xdr, u32 *length) in decode_rdma_segment() argument
1178 xdr_decode_rdma_segment(p, &handle, length, &offset); in decode_rdma_segment()
1179 trace_xprtrdma_decode_seg(handle, *length, offset); in decode_rdma_segment()
[all …]
/net/ceph/
Dmessenger.c725 size_t length) in ceph_msg_data_bio_cursor_init() argument
730 cursor->resid = min_t(size_t, length, data->bio_length); in ceph_msg_data_bio_cursor_init()
740 size_t *length) in ceph_msg_data_bio_next() argument
746 *length = bv.bv_len; in ceph_msg_data_bio_next()
781 size_t length) in ceph_msg_data_bvecs_cursor_init() argument
786 cursor->resid = min_t(size_t, length, data->bvec_pos.iter.bi_size); in ceph_msg_data_bvecs_cursor_init()
795 size_t *length) in ceph_msg_data_bvecs_next() argument
801 *length = bv.bv_len; in ceph_msg_data_bvecs_next()
832 size_t length) in ceph_msg_data_pages_cursor_init() argument
840 BUG_ON(!data->length); in ceph_msg_data_pages_cursor_init()
[all …]
Dceph_hash.c23 unsigned int ceph_str_hash_rjenkins(const char *str, unsigned int length) in ceph_str_hash_rjenkins() argument
30 len = length; in ceph_str_hash_rjenkins()
49 c = c + length; in ceph_str_hash_rjenkins()
94 unsigned int ceph_str_hash_linux(const char *str, unsigned int length) in ceph_str_hash_linux() argument
99 while (length--) { in ceph_str_hash_linux()
Dpagelist.c19 pl->length = 0; in ceph_pagelist_alloc()
80 memcpy(pl->mapped_tail + (pl->length & ~PAGE_MASK), in ceph_pagelist_append()
82 pl->length += bit; in ceph_pagelist_append()
91 memcpy(pl->mapped_tail + (pl->length & ~PAGE_MASK), buf, len); in ceph_pagelist_append()
92 pl->length += len; in ceph_pagelist_append()
/net/core/
Dskmsg.c58 sge->offset + sge->length == orig_offset) { in sk_msg_alloc()
59 sge->length += use; in sk_msg_alloc()
96 if (sge->length > off) in sk_msg_clone()
98 off -= sge->length; in sk_msg_clone()
106 sge_len = sge->length - off; in sk_msg_clone()
115 (sg_virt(sge) + off == sg_virt(sgd) + sgd->length)) { in sk_msg_clone()
116 sgd->length += sge_len; in sk_msg_clone()
145 if (bytes < sge->length) { in sk_msg_return_zero()
146 sge->length -= bytes; in sk_msg_return_zero()
152 sk_mem_uncharge(sk, sge->length); in sk_msg_return_zero()
[all …]
/net/nfc/
Dllcp_commands.c81 u8 *tlv, length; in nfc_llcp_build_tlv() local
88 length = llcp_tlv_length[type]; in nfc_llcp_build_tlv()
89 if (length == 0 && value_length == 0) in nfc_llcp_build_tlv()
91 else if (length == 0) in nfc_llcp_build_tlv()
92 length = value_length; in nfc_llcp_build_tlv()
94 *tlv_length = 2 + length; in nfc_llcp_build_tlv()
95 tlv = kzalloc(2 + length, GFP_KERNEL); in nfc_llcp_build_tlv()
100 tlv[1] = length; in nfc_llcp_build_tlv()
101 memcpy(tlv + 2, value, length); in nfc_llcp_build_tlv()
196 u8 type, length, offset = 0; in nfc_llcp_parse_gb_tlv() local
[all …]
/net/atm/
Dproc.c320 int length; in proc_dev_atm_read() local
329 length = -EINVAL; in proc_dev_atm_read()
331 length = dev->ops->proc_read(dev, pos, (char *)page); in proc_dev_atm_read()
332 if (length > count) in proc_dev_atm_read()
333 length = -EINVAL; in proc_dev_atm_read()
335 if (length >= 0) { in proc_dev_atm_read()
336 if (copy_to_user(buf, (char *)page, length)) in proc_dev_atm_read()
337 length = -EFAULT; in proc_dev_atm_read()
341 return length; in proc_dev_atm_read()
/net/netfilter/
Dnf_conntrack_ftp.c154 int length; in try_rfc959() local
157 length = try_number(data, dlen, array, 6, ',', term); in try_rfc959()
158 if (length == 0) in try_rfc959()
164 return length; in try_rfc959()
225 int length; in try_eprt() local
251 length = try_number(data + 3, dlen - 3, array, 4, '.', delim); in try_eprt()
252 if (length != 0) in try_eprt()
257 length = get_ipv6_addr(data + 3, dlen - 3, in try_eprt()
261 if (length == 0) in try_eprt()
265 return get_port(data, 3 + length + 1, dlen, delim, &cmd->u.tcp.port); in try_eprt()
/net/smc/
Dsmc_clc.c360 if (ntohs(hdr->length) != in smc_clc_msg_prop_valid()
368 if (ntohs(hdr->length) != in smc_clc_msg_prop_valid()
398 ntohs(hdr->length) != SMCR_CLC_ACCEPT_CONFIRM_LEN) || in smc_clc_msg_acc_conf_valid()
400 ntohs(hdr->length) != SMCD_CLC_ACCEPT_CONFIRM_LEN)) in smc_clc_msg_acc_conf_valid()
404 ntohs(hdr->length) < SMCD_CLC_ACCEPT_CONFIRM_LEN_V2) in smc_clc_msg_acc_conf_valid()
407 ntohs(hdr->length) < SMCR_CLC_ACCEPT_CONFIRM_LEN_V2) in smc_clc_msg_acc_conf_valid()
422 if (ntohs(hdr->length) != sizeof(struct smc_clc_msg_decline)) in smc_clc_msg_decl_valid()
425 if (ntohs(hdr->length) != sizeof(struct smc_clc_msg_decline_v2)) in smc_clc_msg_decl_valid()
475 ((u8 *)pclc + ntohs(pclc->hdr.length) - sizeof(*trl)); in smc_clc_msg_hdr_valid()
483 ((u8 *)clc_v2 + ntohs(clc_v2->hdr.length) - in smc_clc_msg_hdr_valid()
[all …]
/net/ipv4/
Dip_output.c958 void *from, int length, int transhdrlen, in __ip_append_data() argument
995 if (cork->length + length > maxnonfragsize - fragheaderlen) { in __ip_append_data()
1006 length + fragheaderlen <= mtu && in __ip_append_data()
1012 if ((flags & MSG_ZEROCOPY) && length) { in __ip_append_data()
1029 uarg = msg_zerocopy_realloc(sk, length, skb_zcopy(skb)); in __ip_append_data()
1042 } else if ((flags & MSG_SPLICE_PAGES) && length) { in __ip_append_data()
1053 cork->length += length; in __ip_append_data()
1065 while (length > 0) { in __ip_append_data()
1068 if (copy < length) in __ip_append_data()
1089 datalen = length + fraggap; in __ip_append_data()
[all …]
Dtcp_bpf.c50 size = (apply && apply_bytes < sge->length) ? in bpf_tcp_ingress()
51 apply_bytes : sge->length; in bpf_tcp_ingress()
61 if (sge->length) in bpf_tcp_ingress()
68 if (sge->length) in bpf_tcp_ingress()
103 size = (apply && apply_bytes < sge->length) ? in tcp_bpf_push()
104 apply_bytes : sge->length; in tcp_bpf_push()
115 if (size < sge->length && msg->sg.start != msg->sg.end) in tcp_bpf_push()
128 sge->length -= ret; in tcp_bpf_push()
136 if (!sge->length) { in tcp_bpf_push()
209 if (!sge->length) { in is_next_msg_fin()
[all …]
/net/ipv6/
Dip6_output.c1473 cork->base.length = 0; in ip6_setup_cork()
1487 void *from, size_t length, int transhdrlen, in __ip6_append_data() argument
1548 if (cork->length + length > mtu - headersize && ipc6->dontfrag && in __ip6_append_data()
1562 if (cork->length + length > maxnonfragsize - headersize) { in __ip6_append_data()
1574 length <= mtu - headersize && in __ip6_append_data()
1579 if ((flags & MSG_ZEROCOPY) && length) { in __ip6_append_data()
1596 uarg = msg_zerocopy_realloc(sk, length, skb_zcopy(skb)); in __ip6_append_data()
1609 } else if ((flags & MSG_SPLICE_PAGES) && length) { in __ip6_append_data()
1636 cork->length += length; in __ip6_append_data()
1640 while (length > 0) { in __ip6_append_data()
[all …]

123456