Home
last modified time | relevance | path

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

1234567891011

/linux/drivers/usb/serial/
A 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/drivers/net/ethernet/dec/tulip/
A Dinterrupt.c146 short pkt_len; in tulip_poll() local
177 pkt_len > 1518) { in tulip_poll()
215 pkt_len, in tulip_poll()
228 pkt_len, in tulip_poll()
382 short pkt_len; in tulip_rx() local
408 pkt_len > 1518) { in tulip_rx()
445 pkt_len, in tulip_rx()
449 pkt_len); in tulip_rx()
454 pkt_len); in tulip_rx()
458 pkt_len, in tulip_rx()
[all …]
/linux/net/bridge/
A 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/include/net/netfilter/
A 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/drivers/net/wireless/ti/wlcore/
A 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/drivers/net/wireless/ath/ath5k/
A 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/drivers/net/wireless/mediatek/mt7601u/
A 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/drivers/net/wireless/rsi/
A Drsi_91x_main.c121 u32 pkt_len, in rsi_prepare_skb() argument
127 if (WARN(!pkt_len, "%s: Dummy pkt received", __func__)) in rsi_prepare_skb()
130 if (pkt_len > (RSI_RCV_BUFFER_LEN * 4)) { in rsi_prepare_skb()
132 __func__, pkt_len); in rsi_prepare_skb()
133 pkt_len = RSI_RCV_BUFFER_LEN * 4; in rsi_prepare_skb()
136 pkt_len -= extended_desc; in rsi_prepare_skb()
137 skb = dev_alloc_skb(pkt_len + FRAME_DESC_SZ); in rsi_prepare_skb()
142 skb_put(skb, pkt_len); in rsi_prepare_skb()
/linux/drivers/net/wireless/marvell/libertas/
A 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()
/linux/drivers/net/wireless/marvell/mwifiex/
A 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()
1550 u32 total_pkt_len, pkt_len; in mwifiex_deaggr_sdio_pkt() local
1584 skb_put(skb_deaggr, pkt_len); in mwifiex_deaggr_sdio_pkt()
1605 u16 pkt_len; in mwifiex_decode_rx_packet() local
1611 skb_trim(skb, pkt_len); in mwifiex_decode_rx_packet()
1711 u32 pkt_len, pkt_type, mport, pind; in mwifiex_sdio_card_to_host_mp_aggr() local
1835 pkt_len, pkt_type); in mwifiex_sdio_card_to_host_mp_aggr()
1849 skb_trim(skb_deaggr, pkt_len); in mwifiex_sdio_card_to_host_mp_aggr()
2303 u32 pkt_len = skb->len; in mwifiex_sdio_host_to_card() local
[all …]
/linux/net/caif/
A 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()
/linux/samples/bpf/
A 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/tools/testing/selftests/bpf/progs/
A 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()
/linux/drivers/hv/
A Dring_buffer.c475 u32 bytes_avail, pkt_len, pkt_offset; in hv_pkt_iter_first() local
487 pkt_len = READ_ONCE(desc->len8) << 3; in hv_pkt_iter_first()
494 if (pkt_len < sizeof(struct vmpacket_descriptor) || pkt_len > bytes_avail) in hv_pkt_iter_first()
495 pkt_len = bytes_avail; in hv_pkt_iter_first()
501 if (pkt_offset < sizeof(struct vmpacket_descriptor) || pkt_offset > pkt_len) in hv_pkt_iter_first()
506 memcpy(desc_copy, desc, pkt_len); in hv_pkt_iter_first()
513 desc_copy->len8 = pkt_len >> 3; in hv_pkt_iter_first()
/linux/drivers/net/hamradio/
A 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 …]
/linux/drivers/net/appletalk/
A 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/drivers/bluetooth/
A 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/drivers/staging/rtl8712/
A 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/net/sched/
A 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()
/linux/include/net/
A 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()
/linux/drivers/net/ethernet/asix/
A Dax88796c_main.c191 info->sop.flags_len = info->pkt_len | in ax88796c_proc_tx_hdr()
202 | info->pkt_len; in ax88796c_proc_tx_hdr()
211 TX_HDR_EOP_SEQNUM) | info->pkt_len; in ax88796c_proc_tx_hdr()
249 u16 pkt_len; in ax88796c_tx_fixup() local
259 pkt_len = skb->len; in ax88796c_tx_fixup()
266 padlen = round_up(pkt_len, 4) - pkt_len; in ax88796c_tx_fixup()
269 info.pkt_len = pkt_len; in ax88796c_tx_fixup()
300 entry->len = pkt_len; in ax88796c_tx_fixup()
308 pkt_len, skb->len, seq_num); in ax88796c_tx_fixup()
496 u16 w_count, pkt_len; in ax88796c_receive() local
[all …]
/linux/net/vmw_vsock/
A Dvirtio_transport_common.c196 u32 pkt_len = info->pkt_len; in virtio_transport_send_pkt_info() local
217 if (pkt_len > VIRTIO_VSOCK_MAX_PKT_BUF_SIZE) in virtio_transport_send_pkt_info()
218 pkt_len = VIRTIO_VSOCK_MAX_PKT_BUF_SIZE; in virtio_transport_send_pkt_info()
221 pkt_len = virtio_transport_get_credit(vvs, pkt_len); in virtio_transport_send_pkt_info()
225 return pkt_len; in virtio_transport_send_pkt_info()
227 pkt = virtio_transport_alloc_pkt(info, pkt_len, in virtio_transport_send_pkt_info()
231 virtio_transport_put_credit(vvs, pkt_len); in virtio_transport_send_pkt_info()
433 size_t pkt_len; in virtio_transport_seqpacket_do_dequeue() local
437 bytes_to_copy = min(user_buf_len, pkt_len); in virtio_transport_seqpacket_do_dequeue()
461 dequeued_len += pkt_len; in virtio_transport_seqpacket_do_dequeue()
[all …]
/linux/tools/bpf/
A Dbpf_dbg.c472 if (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
876 pkt_caplen, pkt_len); in bpf_run_all()
879 pkt_len); in bpf_run_all()
888 uint32_t pkt_len, int next) in bpf_run_stepping() argument
898 pkt_caplen, pkt_len); in bpf_run_stepping()
[all …]
/linux/drivers/net/ethernet/huawei/hinic/
A Dhinic_rx.c360 u64 pkt_len = 0, rx_bytes = 0; in rxq_recv() local
399 pkt_len = sge.len; in rxq_recv()
401 if (pkt_len <= HINIC_RX_BUF_SZ) { in rxq_recv()
402 __skb_put(skb, pkt_len); in rxq_recv()
405 num_wqes = rx_recv_jumbo_pkt(rxq, skb, pkt_len - in rxq_recv()
429 rx_bytes += pkt_len; in rxq_recv()
437 (u16)(pkt_len >> rxq->rx_buff_shift) + in rxq_recv()
438 ((pkt_len & (rxq->buf_len - 1)) ? 1 : 0); in rxq_recv()
/linux/drivers/staging/r8188eu/hal/
A Dusb_ops_linux.c186 static void interrupt_handler_8188eu(struct adapter *adapt, u16 pkt_len, u8 *pbuf) in interrupt_handler_8188eu() argument
190 if (pkt_len != INTERRUPT_MSG_FORMAT_LEN) { in interrupt_handler_8188eu()
191 DBG_88E("%s Invalid interrupt content length (%d)!\n", __func__, pkt_len); in interrupt_handler_8188eu()
253 pkt_offset = RXDESC_SIZE + pattrib->drvinfo_sz + pattrib->shift_sz + pattrib->pkt_len; in recvbuf2recvframe()
255 if ((pattrib->pkt_len <= 0) || (pkt_offset > transfer_len)) { in recvbuf2recvframe()
268 skb_len = pattrib->pkt_len; in recvbuf2recvframe()
341 pattrib->pkt_len, in recvbuf2recvframe()
346 interrupt_handler_8188eu(adapt, pattrib->pkt_len, precvframe->rx_data); in recvbuf2recvframe()

Completed in 39 milliseconds

1234567891011