Lines Matching +full:frame +full:- +full:number
1 /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
2 /* Copyright 2014-2016 Freescale Semiconductor Inc.
3 * Copyright 2016-2022 NXP
17 #include <soc/fsl/dpaa2-io.h>
18 #include <soc/fsl/dpaa2-fd.h>
20 #include "dpni-cmd.h"
22 #include "dpaa2-eth-trace.h"
23 #include "dpaa2-eth-debugfs.h"
24 #include "dpaa2-mac.h"
30 /* Maximum number of scatter-gather entries in an ingress frame,
31 * considering the maximum receive frame size is 64K
36 * enforced Max Frame Length (currently 10k).
39 #define DPAA2_ETH_MAX_MTU (DPAA2_ETH_MFL - VLAN_ETH_HLEN)
44 * enough number of jumbo frames in the Rx queues (length of the current
45 * frame is not taken into account when making the taildrop decision)
52 /* Maximum number of Tx confirmation frames to be processed
57 /* Maximum number of Tx frames to be processed in a single NAPI
63 /* Buffer qouta per channel. We want to keep in check number of ingress frames
66 * reasonable number of frames will be pending at any given time.
67 * Ingress frame drop due to buffer pool depletion should be a corner case only
71 (DPAA2_ETH_NUM_BUFS - DPAA2_ETH_BUFS_PER_CMD)
73 /* Congestion group taildrop threshold: number of frames allowed to accumulate
84 * When number of pending frames drops below exit threshold transmission of
92 /* Maximum number of buffers that can be acquired/released through a single
104 (DPAA2_ETH_RX_BUF_RAW_SIZE - DPAA2_ETH_RX_BUF_TAILROOM)
119 /* The firmware allows assigning multiple buffer pools to a single DPNI -
128 * in the frame's software annotation. The hardware
133 /* We store different information in the software annotation area of a Tx frame
134 * based on what type of frame it is
193 /* Frame annotation status */
201 /* Frame annotation status word is located in the first 8 bytes
212 /* Frame annotation parse results */
214 /* 64-bit word 1 */
218 /* 64-bit word 2 */
220 /* 64-bit word 3 */
229 /* 64-bit word 4 */
238 /* 64-bit word 5 */
245 /* 64-bit word 6 */
246 u8 reserved[5]; /* Soft-parsing context */
255 /* Frame annotation egress action descriptor */
282 tstamp->sec_lsb = sec & 0xFFFFFFFF; in ns_to_ptp_tstamp()
283 tstamp->sec_msb = (sec >> 32) & 0xFFFF; in ns_to_ptp_tstamp()
284 tstamp->nsec = nsec; in ns_to_ptp_tstamp()
313 /* Error and status bits in the frame annotation status word */
314 /* Debug frame, otherwise supposed to be discarded */
316 /* MACSEC frame */
319 /* Ethernet multicast frame */
321 /* Ethernet broadcast frame */
328 /* Frame length error */
330 /* Frame physical error */
362 /* Number of times to retry a frame enqueue before giving up.
363 * Value determined empirically, in order to minimize the number
368 /* Number of times to retry DPIO portal operations while waiting
377 * These are usually collected per-CPU and aggregated by ethtool.
395 /* Per-FQ statistics */
397 /* Number of frames received on this queue */
401 /* Per-channel statistics */
407 /* Number of CDANs; useful to estimate avg NAPI len */
422 /* Maximum number of queues associated with a DPNI */
619 /* Serializes changes to priv->mac */
624 /* The one-step timestamping configuration on hardware
625 * registers could only be done when no one-step
628 * one-step timestamping packet through TX confirmation
657 ((priv)->dpni_attrs.num_queues > 1)
669 if (priv->dpni_ver_major == ver_major) in dpaa2_eth_cmp_dpni_ver()
670 return priv->dpni_ver_minor - ver_minor; in dpaa2_eth_cmp_dpni_ver()
671 return priv->dpni_ver_major - ver_major; in dpaa2_eth_cmp_dpni_ver()
685 (!((priv)->dpni_attrs.options & DPNI_OPT_NO_FS))
688 ((priv)->dpni_attrs.options & DPNI_OPT_HAS_KEY_MASKING)
691 ((priv)->dpni_attrs.fs_entries)
694 ((priv)->dpni_attrs.num_tcs)
698 ((priv)->num_channels)
751 /* For non-linear skbs we have no headroom requirement, as we build a in dpaa2_eth_needed_headroom()
752 * SG frame with a newly allocated SGT buffer in dpaa2_eth_needed_headroom()
758 if (skb->cb[0]) in dpaa2_eth_needed_headroom()
769 return priv->tx_data_offset - DPAA2_ETH_RX_HWA_SIZE; in dpaa2_eth_rx_head_room()
774 lockdep_assert_held(&priv->mac_lock); in dpaa2_eth_is_type_phy()
776 return dpaa2_mac_is_type_phy(priv->mac); in dpaa2_eth_is_type_phy()
781 lockdep_assert_held(&priv->mac_lock); in dpaa2_eth_has_mac()
783 return priv->mac ? true : false; in dpaa2_eth_has_mac()
856 /* SGT (Scatter-Gather Table) cache management */