Lines Matching +full:tx +full:- +full:sec
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,
39 #define DPAA2_ETH_MAX_MTU (DPAA2_ETH_MFL - VLAN_ETH_HLEN)
49 /* Maximum burst size value for Tx shaping */
52 /* Maximum number of Tx confirmation frames to be processed
57 /* Maximum number of Tx frames to be processed in a single NAPI
71 (DPAA2_ETH_NUM_BUFS - DPAA2_ETH_BUFS_PER_CMD)
104 (DPAA2_ETH_RX_BUF_RAW_SIZE - DPAA2_ETH_RX_BUF_TAILROOM)
106 /* Hardware annotation area in RX/TX buffers */
119 /* The firmware allows assigning multiple buffer pools to a single DPNI -
133 /* We store different information in the software annotation area of a Tx frame
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 */
277 u64 sec, nsec; in ns_to_ptp_tstamp() local
279 sec = ns; in ns_to_ptp_tstamp()
280 nsec = do_div(sec, 1000000000); in ns_to_ptp_tstamp()
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()
364 * of frames dropped on Tx
377 * These are usually collected per-CPU and aggregated by ethtool.
395 /* Per-FQ statistics */
401 /* Per-channel statistics */
575 enum hwtstamp_tx_types tx_tstamp_type; /* Tx timestamping type */
585 * This is the cpu set on which Rx and Tx conf frames are processed
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)
696 /* We have exactly one {Rx, Tx conf} queue per channel */
698 ((priv)->num_channels)
751 /* For non-linear skbs we have no headroom requirement, as we build a in dpaa2_eth_needed_headroom()
757 /* If we have Tx timestamping, need 128B hardware annotation */ 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 */