Home
last modified time | relevance | path

Searched refs:pkt_len (Results 1 – 25 of 272) sorted by relevance

1234567891011

/linux-6.6.21/drivers/usb/serial/
Dsafe_serial.c229 int pkt_len; in safe_prepare_write_buffer() local
241 pkt_len = size; in safe_prepare_write_buffer()
242 memset(buf + count, '0', pkt_len - count - trailer_len); in safe_prepare_write_buffer()
244 pkt_len = count + trailer_len; in safe_prepare_write_buffer()
248 buf[pkt_len - 2] = count << 2; in safe_prepare_write_buffer()
249 buf[pkt_len - 1] = 0; in safe_prepare_write_buffer()
252 fcs = fcs_compute10(buf, pkt_len, CRC10_INITFCS); in safe_prepare_write_buffer()
253 buf[pkt_len - 2] |= fcs >> 8; in safe_prepare_write_buffer()
254 buf[pkt_len - 1] |= fcs & 0xff; in safe_prepare_write_buffer()
256 return pkt_len; in safe_prepare_write_buffer()
/linux-6.6.21/drivers/net/ethernet/netronome/nfp/nfd3/
Dxsk.c18 struct nfp_net_xsk_rx_buf *xrxbuf, unsigned int pkt_len, in nfp_nfd3_xsk_tx_xdp() argument
30 pkt_len); in nfp_nfd3_xsk_tx_xdp()
36 txbuf->real_len = pkt_len; in nfp_nfd3_xsk_tx_xdp()
42 txd->dma_len = cpu_to_le16(pkt_len); in nfp_nfd3_xsk_tx_xdp()
44 txd->data_len = cpu_to_le16(pkt_len); in nfp_nfd3_xsk_tx_xdp()
60 unsigned int pkt_len, in nfp_nfd3_xsk_rx_skb() argument
79 nfp_repr_inc_rx_stats(netdev, pkt_len); in nfp_nfd3_xsk_rx_skb()
82 skb = napi_alloc_skb(&r_vec->napi, pkt_len); in nfp_nfd3_xsk_rx_skb()
87 skb_put_data(skb, xrxbuf->xdp->data, pkt_len); in nfp_nfd3_xsk_rx_skb()
129 unsigned int meta_len, data_len, pkt_len, pkt_off; in nfp_nfd3_xsk_rx() local
[all …]
Ddp.c741 void *data, void *pkt, unsigned int pkt_len, int meta_len) in nfp_nfd3_parse_meta() argument
784 pkt_len)) in nfp_nfd3_parse_meta()
836 unsigned int pkt_len, bool *completed) in nfp_nfd3_tx_xdp_buf() argument
844 if (pkt_len + dma_off > dma_map_sz) in nfp_nfd3_tx_xdp_buf()
871 txbuf->real_len = pkt_len; in nfp_nfd3_tx_xdp_buf()
874 pkt_len, DMA_BIDIRECTIONAL); in nfp_nfd3_tx_xdp_buf()
879 txd->dma_len = cpu_to_le16(pkt_len); in nfp_nfd3_tx_xdp_buf()
881 txd->data_len = cpu_to_le16(pkt_len); in nfp_nfd3_tx_xdp_buf()
922 unsigned int meta_len, data_len, meta_off, pkt_len, pkt_off; in nfp_nfd3_rx() local
963 pkt_len = data_len - meta_len; in nfp_nfd3_rx()
[all …]
/linux-6.6.21/drivers/net/ethernet/dec/tulip/
Dinterrupt.c146 short pkt_len; in tulip_poll() local
163 pkt_len = ((status >> 16) & 0x7ff) - 4; in tulip_poll()
177 pkt_len > 1518) { in tulip_poll()
194 if (pkt_len > 1518 || in tulip_poll()
210 if (pkt_len < tulip_rx_copybreak && in tulip_poll()
211 (skb = netdev_alloc_skb(dev, pkt_len + 2)) != NULL) { in tulip_poll()
215 pkt_len, in tulip_poll()
219 pkt_len); in tulip_poll()
220 skb_put(skb, pkt_len); in tulip_poll()
224 pkt_len); in tulip_poll()
[all …]
/linux-6.6.21/include/net/netfilter/
Dnf_tables_ipv6.h35 u32 pkt_len; in __nft_set_pktinfo_ipv6_validate() local
45 pkt_len = ntohs(ip6h->payload_len); in __nft_set_pktinfo_ipv6_validate()
46 if (pkt_len + sizeof(*ip6h) > pkt->skb->len) in __nft_set_pktinfo_ipv6_validate()
79 u32 pkt_len; in nft_set_pktinfo_ipv6_ingress() local
88 pkt_len = ntohs(ip6h->payload_len); in nft_set_pktinfo_ipv6_ingress()
89 if (pkt_len + sizeof(*ip6h) > pkt->skb->len) { in nft_set_pktinfo_ipv6_ingress()
/linux-6.6.21/drivers/net/wireless/ti/wlcore/
Drx.c37 static u32 wlcore_rx_get_align_buf_size(struct wl1271 *wl, u32 pkt_len) in wlcore_rx_get_align_buf_size() argument
40 return ALIGN(pkt_len, WL12XX_BUS_BLOCK_SIZE); in wlcore_rx_get_align_buf_size()
42 return pkt_len; in wlcore_rx_get_align_buf_size()
206 u32 pkt_len, align_pkt_len; in wlcore_rx() local
224 pkt_len = wlcore_rx_get_buf_size(wl, des); in wlcore_rx()
226 pkt_len); in wlcore_rx()
254 pkt_len = wlcore_rx_get_buf_size(wl, des); in wlcore_rx()
264 pkt_len, rx_align, in wlcore_rx()
277 pkt_offset += wlcore_rx_get_align_buf_size(wl, pkt_len); in wlcore_rx()
/linux-6.6.21/drivers/net/wireless/ath/ath5k/
Ddesc.c77 unsigned int pkt_len, unsigned int hdr_len, in ath5k_hw_setup_2word_tx_desc() argument
118 frame_len = pkt_len - padsize + FCS_LEN; in ath5k_hw_setup_2word_tx_desc()
129 pkt_len = roundup(pkt_len, 4); in ath5k_hw_setup_2word_tx_desc()
131 if (pkt_len & ~AR5K_2W_TX_DESC_CTL1_BUF_LEN) in ath5k_hw_setup_2word_tx_desc()
134 tx_ctl->tx_control_1 = pkt_len & AR5K_2W_TX_DESC_CTL1_BUF_LEN; in ath5k_hw_setup_2word_tx_desc()
243 unsigned int pkt_len, unsigned int hdr_len, in ath5k_hw_setup_4word_tx_desc() argument
294 frame_len = pkt_len - padsize + FCS_LEN; in ath5k_hw_setup_4word_tx_desc()
305 pkt_len = roundup(pkt_len, 4); in ath5k_hw_setup_4word_tx_desc()
307 if (pkt_len & ~AR5K_4W_TX_DESC_CTL1_BUF_LEN) in ath5k_hw_setup_4word_tx_desc()
310 txctl1 = pkt_len & AR5K_4W_TX_DESC_CTL1_BUF_LEN; in ath5k_hw_setup_4word_tx_desc()
/linux-6.6.21/drivers/net/wireless/marvell/libertas/
Dtx.c71 uint16_t pkt_len; in lbs_hard_start_xmit() local
114 pkt_len = skb->len; in lbs_hard_start_xmit()
125 pkt_len -= sizeof(*rtap_hdr); in lbs_hard_start_xmit()
134 txpd->tx_packet_length = cpu_to_le16(pkt_len); in lbs_hard_start_xmit()
146 priv->tx_pending_len = pkt_len + sizeof(struct txpd); in lbs_hard_start_xmit()
/linux-6.6.21/net/bridge/
Dbr_netfilter_ipv6.c47 u32 pkt_len; in br_validate_ipv6() local
61 pkt_len = ntohs(hdr->payload_len); in br_validate_ipv6()
62 if (hdr->nexthdr == NEXTHDR_HOP && nf_ip6_check_hbh_len(skb, &pkt_len)) in br_validate_ipv6()
65 if (pkt_len + ip6h_len > skb->len) { in br_validate_ipv6()
70 if (pskb_trim_rcsum(skb, pkt_len + ip6h_len)) { in br_validate_ipv6()
/linux-6.6.21/drivers/net/wireless/rsi/
Drsi_91x_main.c122 u32 pkt_len, in rsi_prepare_skb() argument
128 if (WARN(!pkt_len, "%s: Dummy pkt received", __func__)) in rsi_prepare_skb()
131 if (pkt_len > (RSI_RCV_BUFFER_LEN * 4)) { in rsi_prepare_skb()
133 __func__, pkt_len); in rsi_prepare_skb()
134 pkt_len = RSI_RCV_BUFFER_LEN * 4; in rsi_prepare_skb()
137 pkt_len -= extended_desc; in rsi_prepare_skb()
138 skb = dev_alloc_skb(pkt_len + FRAME_DESC_SZ); in rsi_prepare_skb()
143 skb_put(skb, pkt_len); in rsi_prepare_skb()
/linux-6.6.21/drivers/net/wireless/mediatek/mt7601u/
Dtx.c93 int pkt_len = (unsigned long)info->status.status_driver_data[0]; in mt7601u_tx_skb_remove_dma_overhead() local
99 skb_trim(skb, pkt_len); in mt7601u_tx_skb_remove_dma_overhead()
132 int pkt_len) in mt7601u_push_txwi() argument
184 pkt_len |= FIELD_PREP(MT_TXWI_LEN_PKTID, pkt_id); in mt7601u_push_txwi()
185 txwi->len_ctl = cpu_to_le16(pkt_len); in mt7601u_push_txwi()
200 int pkt_len = skb->len; in mt7601u_tx() local
204 info->status.status_driver_data[0] = (void *)(unsigned long)pkt_len; in mt7601u_tx()
220 txwi = mt7601u_push_txwi(dev, skb, sta, wcid, pkt_len); in mt7601u_tx()
/linux-6.6.21/tools/perf/util/
Dhisi-ptt.c59 int pkt_len; in hisi_ptt_dump() local
67 pkt_len = hisi_ptt_pkt_desc(buf, pos, type); in hisi_ptt_dump()
68 if (!pkt_len) in hisi_ptt_dump()
71 pos += pkt_len; in hisi_ptt_dump()
72 len -= pkt_len; in hisi_ptt_dump()
/linux-6.6.21/tools/testing/selftests/bpf/progs/
Dtest_xdp_bpf2bpf.c34 int pkt_len; member
50 meta.pkt_len = bpf_xdp_get_buff_len((struct xdp_md *)xdp); in BPF_PROG()
52 ((__u64) meta.pkt_len << 32) | in BPF_PROG()
/linux-6.6.21/net/caif/
Dcfserl.c57 u16 pkt_len; in cfserl_receive() local
100 pkt_len = cfpkt_getlen(pkt); in cfserl_receive()
108 if (pkt_len < 2) { in cfserl_receive()
137 if (pkt_len < expectlen) { in cfserl_receive()
150 if (pkt_len > expectlen) in cfserl_receive()
/linux-6.6.21/drivers/hv/
Dring_buffer.c467 u32 bytes_avail, pkt_len, pkt_offset; in hv_pkt_iter_first() local
482 pkt_len = READ_ONCE(desc->len8) << 3; in hv_pkt_iter_first()
489 if (pkt_len < sizeof(struct vmpacket_descriptor) || pkt_len > bytes_avail) in hv_pkt_iter_first()
490 pkt_len = bytes_avail; in hv_pkt_iter_first()
496 if (pkt_offset < sizeof(struct vmpacket_descriptor) || pkt_offset > pkt_len) in hv_pkt_iter_first()
501 memcpy(desc_copy, desc, pkt_len); in hv_pkt_iter_first()
508 desc_copy->len8 = pkt_len >> 3; in hv_pkt_iter_first()
/linux-6.6.21/drivers/net/wireless/marvell/mwifiex/
Dsdio.c703 u8 *buffer, u32 pkt_len, u32 port) in mwifiex_write_data_sync() argument
712 BLOCK_MODE) ? (pkt_len / in mwifiex_write_data_sync()
713 MWIFIEX_SDIO_BLOCK_SIZE) : pkt_len; in mwifiex_write_data_sync()
1125 u8 *payload, u32 pkt_len, u32 port) in mwifiex_write_data_to_card() argument
1131 ret = mwifiex_write_data_sync(adapter, payload, pkt_len, port); in mwifiex_write_data_to_card()
1586 u32 total_pkt_len, pkt_len; in mwifiex_deaggr_sdio_pkt() local
1607 pkt_len = get_unaligned_le16((data + in mwifiex_deaggr_sdio_pkt()
1609 if ((pkt_len + SDIO_HEADER_OFFSET) > blk_size) { in mwifiex_deaggr_sdio_pkt()
1613 __func__, pkt_len, blk_size); in mwifiex_deaggr_sdio_pkt()
1617 skb_deaggr = mwifiex_alloc_dma_align_buf(pkt_len, GFP_KERNEL); in mwifiex_deaggr_sdio_pkt()
[all …]
Dutil.c382 u16 pkt_len; in mwifiex_process_mgmt_packet() local
396 pkt_len = le16_to_cpu(rx_pd->rx_pkt_length); in mwifiex_process_mgmt_packet()
397 if (pkt_len < sizeof(struct ieee80211_hdr) + sizeof(pkt_len)) { in mwifiex_process_mgmt_packet()
403 skb_pull(skb, sizeof(pkt_len)); in mwifiex_process_mgmt_packet()
404 pkt_len -= sizeof(pkt_len); in mwifiex_process_mgmt_packet()
409 pkt_len, rx_pd)) in mwifiex_process_mgmt_packet()
415 pkt_len - sizeof(struct ieee80211_hdr)); in mwifiex_process_mgmt_packet()
417 pkt_len -= ETH_ALEN; in mwifiex_process_mgmt_packet()
418 rx_pd->rx_pkt_length = cpu_to_le16(pkt_len); in mwifiex_process_mgmt_packet()
421 CAL_RSSI(rx_pd->snr, rx_pd->nf), skb->data, pkt_len, in mwifiex_process_mgmt_packet()
/linux-6.6.21/drivers/bluetooth/
Dbtrsi.c94 int pkt_len = get_unaligned_le16(pkt) & 0x0fff; in rsi_hci_recv_pkt() local
96 skb = dev_alloc_skb(pkt_len); in rsi_hci_recv_pkt()
100 memcpy(skb->data, pkt + RSI_FRAME_DESC_SIZE, pkt_len); in rsi_hci_recv_pkt()
101 skb_put(skb, pkt_len); in rsi_hci_recv_pkt()
/linux-6.6.21/drivers/net/ethernet/netronome/nfp/nfdk/
Ddp.c741 void *data, void *pkt, unsigned int pkt_len, int meta_len) in nfp_nfdk_parse_meta() argument
784 pkt_len)) in nfp_nfdk_parse_meta()
899 unsigned int pkt_len, bool *completed) in nfp_nfdk_tx_xdp_buf() argument
910 if (pkt_len + dma_off > dma_map_sz) in nfp_nfdk_tx_xdp_buf()
931 n_descs = nfp_nfdk_headlen_to_segs(pkt_len); in nfp_nfdk_tx_xdp_buf()
934 ((u32)tx_ring->data_pending + pkt_len > in nfp_nfdk_tx_xdp_buf()
957 pkt_len, DMA_BIDIRECTIONAL); in nfp_nfdk_tx_xdp_buf()
961 dma_len = pkt_len; in nfp_nfdk_tx_xdp_buf()
1005 tx_ring->data_pending += pkt_len; in nfp_nfdk_tx_xdp_buf()
1044 unsigned int meta_len, data_len, meta_off, pkt_len, pkt_off; in nfp_nfdk_rx() local
[all …]
/linux-6.6.21/tools/testing/selftests/bpf/prog_tests/
Dxdp_bpf2bpf.c10 int pkt_len; member
29 ASSERT_EQ(meta->pkt_len, tst_ctx->pkt_size, "check_meta_pkt_len"); in on_sample()
33 if (meta->pkt_len > sizeof(pkt_v4)) { in on_sample()
34 for (int i = 0; i < meta->pkt_len - sizeof(pkt_v4); i++) in on_sample()
/linux-6.6.21/drivers/staging/rtl8712/
Dxmit_linux.c42 pfile->pkt_len = pfile->buf_len = pktptr->len; in _r8712_open_pktfile()
53 skb_copy_bits(pfile->pkt, pfile->buf_len - pfile->pkt_len, in _r8712_pktfile_read()
56 pfile->pkt_len -= len; in _r8712_pktfile_read()
62 return (pfile->pkt_len == 0); in r8712_endofpktfile()
/linux-6.6.21/include/net/
Dip6_tunnel.h157 int pkt_len, err; in ip6tunnel_xmit() local
160 pkt_len = skb->len - skb_inner_network_offset(skb); in ip6tunnel_xmit()
165 pkt_len = -1; in ip6tunnel_xmit()
166 iptunnel_xmit_stats(dev, pkt_len); in ip6tunnel_xmit()
/linux-6.6.21/drivers/net/appletalk/
Dcops.c748 int pkt_len = 0; in cops_rx() local
782 pkt_len = inb(ioaddr); in cops_rx()
783 pkt_len |= (inb(ioaddr) << 8); in cops_rx()
788 skb = dev_alloc_skb(pkt_len); in cops_rx()
794 while(pkt_len--) /* Discard packet */ in cops_rx()
800 skb_put(skb, pkt_len); in cops_rx()
803 insb(ioaddr, skb->data, pkt_len); /* Eat the Data */ in cops_rx()
811 if(pkt_len < 0 || pkt_len > MAX_LLAP_SIZE) in cops_rx()
814 dev->name, pkt_len); in cops_rx()
/linux-6.6.21/drivers/net/hamradio/
Dhdlcdrv.c135 int pkt_len; in hdlc_rx_flag() local
142 pkt_len = s->hdlcrx.len - 2 + 1; /* KISS kludge */ in hdlc_rx_flag()
143 if (!(skb = dev_alloc_skb(pkt_len))) { in hdlc_rx_flag()
148 cp = skb_put(skb, pkt_len); in hdlc_rx_flag()
150 memcpy(cp, s->hdlcrx.buffer, pkt_len - 1); in hdlc_rx_flag()
258 int pkt_len; in hdlcdrv_transmitter() local
301 pkt_len = skb->len-1; /* strip KISS byte */ in hdlcdrv_transmitter()
302 if (pkt_len >= HDLCDRV_MAXFLEN || pkt_len < 2) { in hdlcdrv_transmitter()
310 pkt_len); in hdlcdrv_transmitter()
313 append_crc_ccitt(s->hdlctx.buffer, pkt_len); in hdlcdrv_transmitter()
[all …]
/linux-6.6.21/net/vmw_vsock/
Dvirtio_transport_common.c205 u32 pkt_len = info->pkt_len; in virtio_transport_send_pkt_info() local
228 pkt_len = virtio_transport_get_credit(vvs, pkt_len); in virtio_transport_send_pkt_info()
231 if (pkt_len == 0 && info->op == VIRTIO_VSOCK_OP_RW) in virtio_transport_send_pkt_info()
232 return pkt_len; in virtio_transport_send_pkt_info()
234 rest_len = pkt_len; in virtio_transport_send_pkt_info()
273 if (rest_len != pkt_len) in virtio_transport_send_pkt_info()
274 ret = pkt_len - rest_len; in virtio_transport_send_pkt_info()
436 u32 pkt_len = le32_to_cpu(virtio_vsock_hdr(skb)->len); in virtio_transport_stream_do_dequeue() local
438 virtio_transport_dec_rx_pkt(vvs, pkt_len); in virtio_transport_stream_do_dequeue()
548 size_t pkt_len; in virtio_transport_seqpacket_do_dequeue() local
[all …]

1234567891011