Home
last modified time | relevance | path

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

12345678910

/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-5.10/include/net/netfilter/
Dnf_tables_ipv6.h37 u32 pkt_len; in __nft_set_pktinfo_ipv6_validate() local
47 pkt_len = ntohs(ip6h->payload_len); in __nft_set_pktinfo_ipv6_validate()
48 if (pkt_len + sizeof(*ip6h) > skb->len) in __nft_set_pktinfo_ipv6_validate()
83 u32 pkt_len; in nft_set_pktinfo_ipv6_ingress() local
92 pkt_len = ntohs(ip6h->payload_len); in nft_set_pktinfo_ipv6_ingress()
93 if (pkt_len + sizeof(*ip6h) > skb->len) { in nft_set_pktinfo_ipv6_ingress()
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/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()
124 pkt_len -= sizeof(*rtap_hdr); in lbs_hard_start_xmit()
133 txpd->tx_packet_length = cpu_to_le16(pkt_len); in lbs_hard_start_xmit()
145 priv->tx_pending_len = pkt_len + sizeof(struct txpd); in lbs_hard_start_xmit()
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/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()
138 if (pkt_len < expectlen) { in cfserl_receive()
151 if (pkt_len > expectlen) in cfserl_receive()
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/
Dtest_xdp_bpf2bpf.c34 int pkt_len; member
52 meta.pkt_len = data_end - data; in BPF_PROG()
54 ((__u64) meta.pkt_len << 32) | in BPF_PROG()
/kernel/linux/linux-5.10/drivers/net/wireless/marvell/mwifiex/
Dsdio.c677 u8 *buffer, u32 pkt_len, u32 port) in mwifiex_write_data_sync() argument
686 BLOCK_MODE) ? (pkt_len / in mwifiex_write_data_sync()
687 MWIFIEX_SDIO_BLOCK_SIZE) : pkt_len; in mwifiex_write_data_sync()
1089 u8 *payload, u32 pkt_len, u32 port) in mwifiex_write_data_to_card() argument
1095 ret = mwifiex_write_data_sync(adapter, payload, pkt_len, port); in mwifiex_write_data_to_card()
1550 u32 total_pkt_len, pkt_len; in mwifiex_deaggr_sdio_pkt() local
1571 pkt_len = get_unaligned_le16((data + in mwifiex_deaggr_sdio_pkt()
1573 if ((pkt_len + SDIO_HEADER_OFFSET) > blk_size) { in mwifiex_deaggr_sdio_pkt()
1577 __func__, pkt_len, blk_size); in mwifiex_deaggr_sdio_pkt()
1581 skb_deaggr = mwifiex_alloc_dma_align_buf(pkt_len, GFP_KERNEL); in mwifiex_deaggr_sdio_pkt()
[all …]
/kernel/linux/linux-5.10/drivers/bluetooth/
Dbtrsi.c95 int pkt_len = get_unaligned_le16(pkt) & 0x0fff; in rsi_hci_recv_pkt() local
97 skb = dev_alloc_skb(pkt_len); in rsi_hci_recv_pkt()
101 memcpy(skb->data, pkt + RSI_FRAME_DESC_SIZE, pkt_len); in rsi_hci_recv_pkt()
102 skb_put(skb, pkt_len); in rsi_hci_recv_pkt()
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/include/net/
Dip6_tunnel.h156 int pkt_len, err; in ip6tunnel_xmit() local
159 pkt_len = skb->len - skb_inner_network_offset(skb); in ip6tunnel_xmit()
164 pkt_len = -1; in ip6tunnel_xmit()
165 iptunnel_xmit_stats(dev, pkt_len); in ip6tunnel_xmit()
/kernel/linux/linux-5.10/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
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/net/sched/
Dsch_fq_pie.c136 u32 pkt_len; in fq_pie_qdisc_enqueue() local
179 pkt_len = qdisc_pkt_len(skb); in fq_pie_qdisc_enqueue()
182 sch->qstats.backlog += pkt_len; in fq_pie_qdisc_enqueue()
193 sel_flow->backlog += pkt_len; in fq_pie_qdisc_enqueue()
234 u32 pkt_len; in fq_pie_qdisc_dequeue() local
254 pkt_len = qdisc_pkt_len(skb); in fq_pie_qdisc_dequeue()
255 sch->qstats.backlog -= pkt_len; in fq_pie_qdisc_dequeue()
270 flow->deficit -= pkt_len; in fq_pie_qdisc_dequeue()
271 flow->backlog -= pkt_len; in fq_pie_qdisc_dequeue()
/kernel/linux/linux-5.10/drivers/net/hamradio/
Dhdlcdrv.c134 int pkt_len; in hdlc_rx_flag() local
141 pkt_len = s->hdlcrx.len - 2 + 1; /* KISS kludge */ in hdlc_rx_flag()
142 if (!(skb = dev_alloc_skb(pkt_len))) { in hdlc_rx_flag()
147 cp = skb_put(skb, pkt_len); in hdlc_rx_flag()
149 memcpy(cp, s->hdlcrx.buffer, pkt_len - 1); in hdlc_rx_flag()
257 int pkt_len; in hdlcdrv_transmitter() local
300 pkt_len = skb->len-1; /* strip KISS byte */ in hdlcdrv_transmitter()
301 if (pkt_len >= HDLCDRV_MAXFLEN || pkt_len < 2) { in hdlcdrv_transmitter()
309 pkt_len); in hdlcdrv_transmitter()
312 append_crc_ccitt(s->hdlctx.buffer, pkt_len); in hdlcdrv_transmitter()
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/huawei/hinic/
Dhinic_rx.c363 u64 pkt_len = 0, rx_bytes = 0; in rxq_recv() local
402 pkt_len = sge.len; in rxq_recv()
404 if (pkt_len <= HINIC_RX_BUF_SZ) { in rxq_recv()
405 __skb_put(skb, pkt_len); in rxq_recv()
408 num_wqes = rx_recv_jumbo_pkt(rxq, skb, pkt_len - in rxq_recv()
432 rx_bytes += pkt_len; in rxq_recv()
440 (u16)(pkt_len >> rxq->rx_buff_shift) + in rxq_recv()
441 ((pkt_len & (rxq->buf_len - 1)) ? 1 : 0); in rxq_recv()
/kernel/linux/linux-5.10/drivers/net/ethernet/8390/
Dlib8390.c671 int pkt_len, pkt_stat; in ei_receive() local
702 pkt_len = rx_frame.count - sizeof(struct e8390_pkt_hdr); in ei_receive()
705 next_frame = this_frame + 1 + ((pkt_len+4)>>8); in ei_receive()
720 if (pkt_len < 60 || pkt_len > 1518) { in ei_receive()
730 skb = netdev_alloc_skb(dev, pkt_len + 2); in ei_receive()
734 pkt_len); in ei_receive()
739 skb_put(skb, pkt_len); /* Make room */ in ei_receive()
740 ei_block_input(dev, pkt_len, skb, current_offset + sizeof(rx_frame)); in ei_receive()
745 dev->stats.rx_bytes += pkt_len; in ei_receive()
/kernel/linux/linux-5.10/tools/bpf/
Dbpf_dbg.c470 static void bpf_dump_pkt(uint8_t *pkt, uint32_t pkt_caplen, uint32_t pkt_len) in bpf_dump_pkt() argument
472 if (pkt_caplen != pkt_len) in bpf_dump_pkt()
473 rl_printf("cap: %u, len: %u\n", pkt_caplen, pkt_len); in bpf_dump_pkt()
475 rl_printf("len: %u\n", pkt_len); in bpf_dump_pkt()
634 uint32_t pkt_len) in bpf_single_step() argument
713 r->A = pkt_len; in bpf_single_step()
716 r->A = pkt_len; in bpf_single_step()
856 uint32_t pkt_len) in bpf_handle_breakpoint() argument
861 bpf_dump_pkt(pkt, pkt_caplen, pkt_len); in bpf_handle_breakpoint()
867 uint32_t pkt_caplen, uint32_t pkt_len) in bpf_run_all() argument
[all …]
/kernel/linux/linux-5.10/arch/xtensa/platforms/iss/
Dnetwork.c275 int pkt_len; in iss_net_rx() local
297 pkt_len = lp->tp.read(lp, &skb); in iss_net_rx()
298 skb_put(skb, pkt_len); in iss_net_rx()
300 if (pkt_len > 0) { in iss_net_rx()
301 skb_trim(skb, pkt_len); in iss_net_rx()
307 return pkt_len; in iss_net_rx()
310 return pkt_len; in iss_net_rx()
/kernel/linux/linux-5.10/drivers/input/touchscreen/
Degalax_ts_serial.c72 int pkt_len; in egalax_interrupt() local
77 pkt_len = egalax->data[0] & EGALAX_FORMAT_PRESSURE_BIT ? 6 : 5; in egalax_interrupt()
78 if (pkt_len == egalax->idx) { in egalax_interrupt()

12345678910