/kernel/linux/linux-5.10/tools/testing/selftests/net/ |
D | ip_defrag.c | 36 static int payload_len; variable 59 ret = recv(fd_udp, recv_buff, payload_len, 0); in recv_validate_udp() 75 payload_len, max_frag_len); in recv_validate_udp() 76 if (ret != payload_len) in recv_validate_udp() 77 error(1, 0, "recv: wrong size: %d vs %d", (int)ret, payload_len); in recv_validate_udp() 78 if (memcmp(udp_payload, recv_buff, payload_len)) in recv_validate_udp() 107 IPPROTO_UDP + (uint32_t)(UDP_HLEN + payload_len)); in udp_checksum() 109 sum = raw_checksum((uint8_t *)udp_payload, payload_len, sum); in udp_checksum() 126 sum = raw_checksum((uint8_t *)udp_payload, payload_len, sum); in udp6_checksum() 147 udphdr.len = htons(UDP_HLEN + payload_len); in send_fragment() [all …]
|
D | psock_snd.c | 117 static int build_ipv4_header(void *header, int payload_len) in build_ipv4_header() argument 124 iph->tot_len = htons(sizeof(*iph) + sizeof(struct udphdr) + payload_len); in build_ipv4_header() 134 static int build_udp_header(void *header, int payload_len) in build_udp_header() argument 138 int len = sizeof(*udph) + payload_len; in build_udp_header() 153 static int build_packet(int payload_len) in build_packet() argument 159 off += build_ipv4_header(tbuf + off, payload_len); in build_packet() 160 off += build_udp_header(tbuf + off, payload_len); in build_packet() 162 if (off + payload_len > sizeof(tbuf)) in build_packet() 165 memset(tbuf + off, DATA_CHAR, payload_len); in build_packet() 167 return off + payload_len; in build_packet()
|
/kernel/linux/linux-5.10/drivers/net/wireless/ath/ath10k/ |
D | swap.c | 24 u32 payload_len; in ath10k_swap_code_seg_fill() local 35 payload_len = __le32_to_cpu(swap_item->tlv.length); in ath10k_swap_code_seg_fill() 36 if ((payload_len > size_left) || in ath10k_swap_code_seg_fill() 37 (payload_len == 0 && in ath10k_swap_code_seg_fill() 40 payload_len); in ath10k_swap_code_seg_fill() 44 if (payload_len == 0) { in ath10k_swap_code_seg_fill() 55 memcpy(virt_addr, swap_item->tlv.data, payload_len); in ath10k_swap_code_seg_fill() 56 virt_addr += payload_len; in ath10k_swap_code_seg_fill() 57 length = payload_len + sizeof(struct ath10k_swap_code_seg_tlv); in ath10k_swap_code_seg_fill() 60 total_payload_len += payload_len; in ath10k_swap_code_seg_fill()
|
/kernel/linux/linux-5.10/drivers/hid/intel-ish-hid/ |
D | ishtp-hid-client.c | 30 size_t cur_pos, size_t payload_len) in report_bad_packet() argument 45 (unsigned int)payload_len, client_data->multi_packet_cnt, in report_bad_packet() 65 size_t payload_len, total_len, cur_pos, raw_len; in process_recv() local 91 payload_len = recv_msg->hdr.size; in process_recv() 94 if (cur_pos + payload_len + sizeof(struct hostif_msg) > in process_recv() 98 payload_len); in process_recv() 113 payload_len); in process_recv() 132 payload_len) { in process_recv() 136 * i, payload_len); in process_recv() 162 payload_len); in process_recv() [all …]
|
/kernel/linux/linux-5.10/security/integrity/ima/ |
D | ima_queue_keys.c | 68 size_t payload_len) in ima_alloc_key_entry() argument 76 entry->payload = kmemdup(payload, payload_len, GFP_KERNEL); in ima_alloc_key_entry() 79 entry->payload_len = payload_len; in ima_alloc_key_entry() 104 size_t payload_len) in ima_queue_key() argument 109 entry = ima_alloc_key_entry(keyring, payload, payload_len); in ima_queue_key() 162 entry->payload_len, in ima_process_queued_keys()
|
D | ima_asymmetric_keys.c | 28 const void *payload, size_t payload_len, in ima_post_key_create_or_update() argument 37 if (!payload || (payload_len == 0)) in ima_post_key_create_or_update() 41 queued = ima_queue_key(keyring, payload, payload_len); in ima_post_key_create_or_update() 61 process_buffer_measurement(NULL, payload, payload_len, in ima_post_key_create_or_update()
|
/kernel/linux/linux-5.10/drivers/scsi/libfc/ |
D | fc_frame.c | 62 struct fc_frame *fc_frame_alloc_fill(struct fc_lport *lp, size_t payload_len) in fc_frame_alloc_fill() argument 67 fill = payload_len % 4; in fc_frame_alloc_fill() 70 fp = _fc_frame_alloc(payload_len + fill); in fc_frame_alloc_fill() 72 memset((char *) fr_hdr(fp) + payload_len, 0, fill); in fc_frame_alloc_fill() 75 payload_len + sizeof(struct fc_frame_header)); in fc_frame_alloc_fill()
|
/kernel/linux/linux-5.10/drivers/scsi/libsas/ |
D | sas_host_smp.c | 233 if (job->request_payload.payload_len < 8 || in sas_smp_host_handler() 234 job->reply_payload.payload_len < 8) in sas_smp_host_handler() 238 req_data = kzalloc(job->request_payload.payload_len, GFP_KERNEL); in sas_smp_host_handler() 243 job->request_payload.payload_len); in sas_smp_host_handler() 247 resp_data = kzalloc(max(job->reply_payload.payload_len, 128U), in sas_smp_host_handler() 282 if (job->request_payload.payload_len < 16) in sas_smp_host_handler() 294 if (job->request_payload.payload_len < 16) in sas_smp_host_handler() 309 if (job->request_payload.payload_len < in sas_smp_host_handler() 326 if (job->request_payload.payload_len < 44) in sas_smp_host_handler() 345 job->reply_payload.payload_len); in sas_smp_host_handler()
|
/kernel/linux/common_modules/newip/third_party/linux-5.10/net/newip/ |
D | nndisc.c | 238 int payload_len) in nip_get_nndisc_send_checksum() argument 245 nph.check_len = htons(payload_len); in nip_get_nndisc_send_checksum() 247 payload_len, &nph); in nip_get_nndisc_send_checksum() 301 const int payload_len) in nndisc_send_skb() argument 309 skb_reserve(skb, payload_len); in nndisc_send_skb() 313 skb->len = head->hdr_buf_pos + payload_len; in nndisc_send_skb() 321 checksum = nip_get_nndisc_send_checksum(skb, head, payload_len); in nndisc_send_skb() 330 struct nip_hdr_encap *head, int payload_len) in nndisc_alloc_skb() argument 333 int len = NIP_ETH_HDR_LEN + NIP_HDR_MAX + payload_len; in nndisc_alloc_skb() 358 head->total_len = head->hdr_buf_pos + payload_len; in nndisc_alloc_skb() [all …]
|
/kernel/linux/linux-5.10/net/ipv6/netfilter/ |
D | nf_conntrack_reasm.c | 172 unsigned int payload_len; in nf_ct_frag6_queue() local 183 payload_len = ntohs(ipv6_hdr(skb)->payload_len); in nf_ct_frag6_queue() 186 end = offset + (payload_len - in nf_ct_frag6_queue() 272 if (payload_len > fq->q.max_size) in nf_ct_frag6_queue() 273 fq->q.max_size = payload_len; in nf_ct_frag6_queue() 319 int payload_len; in nf_ct_frag6_reasm() local 332 payload_len = ((skb->data - skb_network_header(skb)) - in nf_ct_frag6_reasm() 335 if (payload_len > IPV6_MAXPLEN) { in nf_ct_frag6_reasm() 337 payload_len); in nf_ct_frag6_reasm() 355 ipv6_hdr(skb)->payload_len = htons(payload_len); in nf_ct_frag6_reasm() [all …]
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
D | test_xdp.c | 89 __u16 payload_len; in handle_ipv4() local 106 payload_len = bpf_ntohs(iph->tot_len); in handle_ipv4() 136 iph->tot_len = bpf_htons(payload_len + sizeof(*iph)); in handle_ipv4() 161 __u16 payload_len; in handle_ipv6() local 176 payload_len = ip6h->payload_len; in handle_ipv6() 202 ip6h->payload_len = bpf_htons(bpf_ntohs(payload_len) + sizeof(*ip6h)); in handle_ipv6()
|
D | test_xdp_loop.c | 85 __u16 payload_len; in handle_ipv4() local 102 payload_len = bpf_ntohs(iph->tot_len); in handle_ipv4() 132 iph->tot_len = bpf_htons(payload_len + sizeof(*iph)); in handle_ipv4() 157 __u16 payload_len; in handle_ipv6() local 172 payload_len = ip6h->payload_len; in handle_ipv6() 198 ip6h->payload_len = bpf_htons(bpf_ntohs(payload_len) + sizeof(*ip6h)); in handle_ipv6()
|
/kernel/linux/linux-5.10/samples/bpf/ |
D | xdp_tx_iptunnel_kern.c | 86 u16 payload_len; in handle_ipv4() local 103 payload_len = ntohs(iph->tot_len); in handle_ipv4() 135 iph->tot_len = htons(payload_len + sizeof(*iph)); in handle_ipv4() 160 __u16 payload_len; in handle_ipv6() local 175 payload_len = ip6h->payload_len; in handle_ipv6() 204 ip6h->payload_len = htons(ntohs(payload_len) + sizeof(*ip6h)); in handle_ipv6()
|
/kernel/linux/linux-5.10/net/tls/ |
D | tls_device_fallback.c | 236 int payload_len = skb->len - tcp_payload_offset; in fill_sg_in() local 286 if (skb_to_sgvec(skb, &sg_in[i], tcp_payload_offset, payload_len) < 0) in fill_sg_in() 296 int payload_len, in fill_sg_out() argument 301 sg_set_buf(&sg_out[1], nskb->data + tcp_payload_offset, payload_len); in fill_sg_out() 315 int payload_len = skb->len - tcp_payload_offset; in tls_enc_skb() local 348 payload_len, sync_size, dummy_buf); in tls_enc_skb() 351 rcd_sn, sync_size + payload_len) < 0) in tls_enc_skb() 377 int payload_len = skb->len - tcp_payload_offset; in tls_sw_fallback() local 391 if (!payload_len) in tls_sw_fallback() 403 if (sync_size < 0 && payload_len <= -sync_size) in tls_sw_fallback()
|
/kernel/linux/linux-5.10/net/core/ |
D | drop_monitor.c | 556 static size_t net_dm_packet_report_size(size_t payload_len) in net_dm_packet_report_size() argument 578 nla_total_size(payload_len); in net_dm_packet_report_size() 607 size_t payload_len) in net_dm_packet_report_fill() argument 641 if (!payload_len) in net_dm_packet_report_fill() 647 attr = skb_put(msg, nla_total_size(payload_len)); in net_dm_packet_report_fill() 649 attr->nla_len = nla_attr_size(payload_len); in net_dm_packet_report_fill() 650 if (skb_copy_bits(skb, 0, nla_data(attr), payload_len)) in net_dm_packet_report_fill() 668 size_t payload_len; in net_dm_packet_report() local 678 payload_len = min_t(size_t, skb->len, NET_DM_MAX_PACKET_SIZE); in net_dm_packet_report() 680 payload_len = min_t(size_t, net_dm_trunc_len, payload_len); in net_dm_packet_report() [all …]
|
/kernel/linux/linux-5.10/net/ipv6/ |
D | reassembly.c | 122 end = offset + (ntohs(ipv6_hdr(skb)->payload_len) - in ip6_frag_queue() 160 *prob_offset = offsetof(struct ipv6hdr, payload_len); in ip6_frag_queue() 256 int payload_len; in ip6_frag_reasm() local 269 payload_len = ((skb->data - skb_network_header(skb)) - in ip6_frag_reasm() 272 if (payload_len > IPV6_MAXPLEN) in ip6_frag_reasm() 290 ipv6_hdr(skb)->payload_len = htons(payload_len); in ip6_frag_reasm() 309 net_dbg_ratelimited("ip6_frag_reasm: payload len = %d\n", payload_len); in ip6_frag_reasm() 336 if (hdr->payload_len == 0) in ipv6_frag_rcv() 354 IP6CB(skb)->frag_max_size = ntohs(hdr->payload_len) + in ipv6_frag_rcv()
|
D | ip6_offload.c | 81 unsigned int payload_len; in ipv6_gso_segment() local 128 payload_len = skb_shinfo(skb)->gso_size + in ipv6_gso_segment() 132 payload_len = skb->len - nhoff - sizeof(*ipv6h); in ipv6_gso_segment() 133 ipv6h->payload_len = htons(payload_len); in ipv6_gso_segment() 147 offset += (ntohs(ipv6h->payload_len) - in ipv6_gso_segment() 210 flush += ntohs(iph->payload_len) != skb_gro_len(skb); in ipv6_gro_receive() 333 iph->payload_len = htons(skb->len - nhoff - sizeof(*iph)); in ipv6_gro_complete()
|
/kernel/linux/linux-5.10/net/mac80211/ |
D | tkip.h | 16 u8 *payload, size_t payload_len); 26 u8 *payload, size_t payload_len, u8 *ta,
|
D | tkip.c | 225 u8 *payload, size_t payload_len) in ieee80211_tkip_encrypt_data() argument 232 payload, payload_len); in ieee80211_tkip_encrypt_data() 241 u8 *payload, size_t payload_len, u8 *ta, in ieee80211_tkip_decrypt_data() argument 252 if (payload_len < 12) in ieee80211_tkip_decrypt_data() 309 res = ieee80211_wep_decrypt_data(ctx, rc4key, 16, pos, payload_len - 12); in ieee80211_tkip_decrypt_data()
|
/kernel/linux/linux-5.10/drivers/net/wireless/quantenna/qtnfmac/ |
D | event.c | 26 size_t payload_len; in qtnf_event_handle_sta_assoc() local 60 payload_len = len - sizeof(*sta_assoc); in qtnf_event_handle_sta_assoc() 62 qlink_for_each_tlv(tlv, sta_assoc->ies, payload_len) { in qtnf_event_handle_sta_assoc() 87 if (!qlink_tlv_parsing_ok(tlv, sta_assoc->ies, payload_len)) { in qtnf_event_handle_sta_assoc() 145 size_t payload_len; in qtnf_event_handle_bss_join() local 228 payload_len = len - sizeof(*join_info); in qtnf_event_handle_bss_join() 230 qlink_for_each_tlv(tlv, join_info->ies, payload_len) { in qtnf_event_handle_bss_join() 264 if (!qlink_tlv_parsing_ok(tlv, join_info->ies, payload_len)) in qtnf_event_handle_bss_join() 347 size_t payload_len; in qtnf_event_handle_scan_results() local 367 payload_len = len - sizeof(*sr); in qtnf_event_handle_scan_results() [all …]
|
/kernel/linux/linux-5.10/drivers/scsi/bfa/ |
D | bfad_bsg.c | 151 unsigned int payload_len) in bfad_iocmd_ioc_get_fwstats() argument 158 if (bfad_chk_iocmd_sz(payload_len, in bfad_iocmd_ioc_get_fwstats() 320 unsigned int payload_len) in bfad_iocmd_port_get_stats() argument 327 if (bfad_chk_iocmd_sz(payload_len, in bfad_iocmd_port_get_stats() 553 unsigned int payload_len) in bfad_iocmd_lport_get_rports() argument 564 if (bfad_chk_iocmd_sz(payload_len, in bfad_iocmd_lport_get_rports() 870 unsigned int payload_len) in bfad_iocmd_fabric_get_lports() argument 884 if (bfad_chk_iocmd_sz(payload_len, in bfad_iocmd_fabric_get_lports() 1377 bfad_iocmd_cee_attr(struct bfad_s *bfad, void *cmd, unsigned int payload_len) in bfad_iocmd_cee_attr() argument 1385 if (bfad_chk_iocmd_sz(payload_len, in bfad_iocmd_cee_attr() [all …]
|
/kernel/linux/linux-5.10/drivers/net/usb/ |
D | sierra_net.c | 257 struct param payload_len; member 271 curp = save16bit(&hh->payload_len, curp); in parse_hip() 283 hh->payload_len.word &= 0x3FFF; /* 14 bits */ in parse_hip() 290 hh->payload_len.word &= 0x07FF; /* 11 bits */ in parse_hip() 296 hh->payload_len.word--; in parse_hip() 300 if (buflen < (hh->hdrlen + hh->payload_len.word)) in parse_hip() 419 hh->payload_len.word); in sierra_net_handle_lsi() 505 if (len != hh.hdrlen + hh.payload_len.word) { in sierra_net_kevent() 508 hh.hdrlen + hh.payload_len.word); in sierra_net_kevent() 843 if (hh.payload_len.word == skb->len) in sierra_net_rx_fixup() [all …]
|
/kernel/linux/linux-5.10/drivers/vhost/ |
D | vsock.c | 105 size_t iov_len, payload_len; in vhost_transport_do_send_pkt() local 158 payload_len = pkt->len - pkt->off; in vhost_transport_do_send_pkt() 163 if (payload_len > iov_len - sizeof(pkt->hdr)) in vhost_transport_do_send_pkt() 164 payload_len = iov_len - sizeof(pkt->hdr); in vhost_transport_do_send_pkt() 167 pkt->hdr.len = cpu_to_le32(payload_len); in vhost_transport_do_send_pkt() 176 nbytes = copy_to_iter(pkt->buf + pkt->off, payload_len, in vhost_transport_do_send_pkt() 178 if (nbytes != payload_len) { in vhost_transport_do_send_pkt() 189 vhost_add_used(vq, head, sizeof(pkt->hdr) + payload_len); in vhost_transport_do_send_pkt() 192 pkt->off += payload_len; in vhost_transport_do_send_pkt() 193 total_len += payload_len; in vhost_transport_do_send_pkt()
|
/kernel/linux/linux-5.10/drivers/staging/most/net/ |
D | net.c | 81 unsigned int payload_len = skb->len - ETH_HLEN; in skb_to_mamac() local 82 unsigned int mdp_len = payload_len + MDP_HDR_LEN; in skb_to_mamac() 113 *buff++ = HB(payload_len + 6); in skb_to_mamac() 114 *buff++ = LB(payload_len + 6); in skb_to_mamac() 123 *buff++ = PMS_TELID_UNSEGM_MAMAC << 4 | HB(payload_len); in skb_to_mamac() 124 *buff++ = LB(payload_len); in skb_to_mamac() 126 memcpy(buff, skb->data + ETH_HLEN, payload_len); in skb_to_mamac()
|
/kernel/linux/linux-5.10/drivers/net/wireless/ath/ath11k/ |
D | htc.c | 241 u16 payload_len; in ath11k_htc_rx_completion_handler() local 259 payload_len = FIELD_GET(HTC_HDR_PAYLOADLEN, hdr->htc_info); in ath11k_htc_rx_completion_handler() 261 if (payload_len + sizeof(*hdr) > ATH11K_HTC_MAX_LEN) { in ath11k_htc_rx_completion_handler() 263 payload_len + sizeof(*hdr)); in ath11k_htc_rx_completion_handler() 267 if (skb->len < payload_len) { in ath11k_htc_rx_completion_handler() 269 skb->len, payload_len); in ath11k_htc_rx_completion_handler() 284 (trailer_len > payload_len)) { in ath11k_htc_rx_completion_handler() 292 trailer += payload_len; in ath11k_htc_rx_completion_handler() 302 if (trailer_len >= payload_len) in ath11k_htc_rx_completion_handler()
|