Home
last modified time | relevance | path

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

1234567891011

/linux-6.1.9/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.1.9/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.c720 void *data, void *pkt, unsigned int pkt_len, int meta_len) in nfp_nfd3_parse_meta() argument
763 pkt_len)) in nfp_nfd3_parse_meta()
806 unsigned int pkt_len, bool *completed) in nfp_nfd3_tx_xdp_buf() argument
814 if (pkt_len + dma_off > dma_map_sz) in nfp_nfd3_tx_xdp_buf()
841 txbuf->real_len = pkt_len; in nfp_nfd3_tx_xdp_buf()
844 pkt_len, DMA_BIDIRECTIONAL); in nfp_nfd3_tx_xdp_buf()
849 txd->dma_len = cpu_to_le16(pkt_len); in nfp_nfd3_tx_xdp_buf()
851 txd->data_len = cpu_to_le16(pkt_len); in nfp_nfd3_tx_xdp_buf()
893 unsigned int meta_len, data_len, meta_off, pkt_len, pkt_off; in nfp_nfd3_rx() local
934 pkt_len = data_len - meta_len; in nfp_nfd3_rx()
[all …]
/linux-6.1.9/net/bridge/
Dbr_netfilter_ipv6.c49 u32 pkt_len; in br_nf_check_hbh_len() local
74 pkt_len = ntohl(*(__be32 *)(nh + off + 2)); in br_nf_check_hbh_len()
75 if (pkt_len <= IPV6_MAXPLEN || in br_nf_check_hbh_len()
78 if (pkt_len > skb->len - sizeof(struct ipv6hdr)) in br_nf_check_hbh_len()
81 pkt_len + sizeof(struct ipv6hdr))) in br_nf_check_hbh_len()
103 u32 pkt_len; in br_validate_ipv6() local
117 pkt_len = ntohs(hdr->payload_len); in br_validate_ipv6()
119 if (pkt_len || hdr->nexthdr != NEXTHDR_HOP) { in br_validate_ipv6()
120 if (pkt_len + ip6h_len > skb->len) { in br_validate_ipv6()
125 if (pskb_trim_rcsum(skb, pkt_len + ip6h_len)) { in br_validate_ipv6()
/linux-6.1.9/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.1.9/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.1.9/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.1.9/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.1.9/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.1.9/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.1.9/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.1.9/samples/bpf/
Dxdp_sample_pkts_kern.c24 u16 pkt_len; in xdp_sample_prog() member
43 metadata.pkt_len = (u16)(data_end - data); in xdp_sample_prog()
44 sample_size = min(metadata.pkt_len, SAMPLE_SIZE); in xdp_sample_prog()
/linux-6.1.9/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.1.9/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.1.9/tools/testing/selftests/bpf/progs/
Dtest_xdp_bpf2bpf.c34 int pkt_len; member
52 meta.pkt_len = bpf_xdp_get_buff_len((struct xdp_md *)xdp); in BPF_PROG()
54 ((__u64) meta.pkt_len << 32) | in BPF_PROG()
/linux-6.1.9/drivers/net/wireless/marvell/mwifiex/
Dsdio.c673 u8 *buffer, u32 pkt_len, u32 port) in mwifiex_write_data_sync() argument
682 BLOCK_MODE) ? (pkt_len / in mwifiex_write_data_sync()
683 MWIFIEX_SDIO_BLOCK_SIZE) : pkt_len; in mwifiex_write_data_sync()
1085 u8 *payload, u32 pkt_len, u32 port) in mwifiex_write_data_to_card() argument
1091 ret = mwifiex_write_data_sync(adapter, payload, pkt_len, port); in mwifiex_write_data_to_card()
1546 u32 total_pkt_len, pkt_len; in mwifiex_deaggr_sdio_pkt() local
1567 pkt_len = get_unaligned_le16((data + in mwifiex_deaggr_sdio_pkt()
1569 if ((pkt_len + SDIO_HEADER_OFFSET) > blk_size) { in mwifiex_deaggr_sdio_pkt()
1573 __func__, pkt_len, blk_size); in mwifiex_deaggr_sdio_pkt()
1577 skb_deaggr = mwifiex_alloc_dma_align_buf(pkt_len, GFP_KERNEL); in mwifiex_deaggr_sdio_pkt()
[all …]
/linux-6.1.9/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.1.9/drivers/hv/
Dring_buffer.c489 u32 bytes_avail, pkt_len, pkt_offset; in hv_pkt_iter_first() local
504 pkt_len = READ_ONCE(desc->len8) << 3; in hv_pkt_iter_first()
511 if (pkt_len < sizeof(struct vmpacket_descriptor) || pkt_len > bytes_avail) in hv_pkt_iter_first()
512 pkt_len = bytes_avail; in hv_pkt_iter_first()
518 if (pkt_offset < sizeof(struct vmpacket_descriptor) || pkt_offset > pkt_len) in hv_pkt_iter_first()
523 memcpy(desc_copy, desc, pkt_len); in hv_pkt_iter_first()
530 desc_copy->len8 = pkt_len >> 3; in hv_pkt_iter_first()
/linux-6.1.9/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.1.9/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.1.9/drivers/net/ethernet/netronome/nfp/nfdk/
Ddp.c716 void *data, void *pkt, unsigned int pkt_len, int meta_len) in nfp_nfdk_parse_meta() argument
759 pkt_len)) in nfp_nfdk_parse_meta()
865 unsigned int pkt_len, bool *completed) in nfp_nfdk_tx_xdp_buf() argument
876 if (pkt_len + dma_off > dma_map_sz) in nfp_nfdk_tx_xdp_buf()
897 n_descs = nfp_nfdk_headlen_to_segs(pkt_len); in nfp_nfdk_tx_xdp_buf()
900 ((u32)tx_ring->data_pending + pkt_len > in nfp_nfdk_tx_xdp_buf()
923 pkt_len, DMA_BIDIRECTIONAL); in nfp_nfdk_tx_xdp_buf()
927 dma_len = pkt_len; in nfp_nfdk_tx_xdp_buf()
971 tx_ring->data_pending += pkt_len; in nfp_nfdk_tx_xdp_buf()
1010 unsigned int meta_len, data_len, meta_off, pkt_len, pkt_off; in nfp_nfdk_rx() local
[all …]
/linux-6.1.9/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.1.9/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.1.9/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.1.9/drivers/net/ethernet/netronome/nfp/crypto/
Dcrypto.h26 void *pkt, unsigned int pkt_len);
36 void *pkt, unsigned int pkt_len) in nfp_net_tls_rx_resync_req() argument

1234567891011