Lines Matching +full:rx +full:- +full:sample +full:- +full:delay +full:- +full:ns

1 .. SPDX-License-Identifier: GPL-2.0
32 IP_MULTICAST_LOOP + SO_TIMESTAMP[NS]
43 -------------------------------------------------------------
59 -------------------------------------------------------------------
62 Its struct timespec allows for higher resolution (ns) timestamps than the
72 ----------------------------------------------------------------------
102 Request rx timestamps generated by the network adapter.
105 Request rx timestamps when data enters the kernel. These timestamps
122 transmit latency is, if long, often dominated by queuing delay. The
131 grained measurement of queuing delay. This flag can be enabled
138 over-report measurement, because the timestamp is generated when all
180 is derived from a per-socket u32 counter (that wraps). For datagram
207 a timestamp with counter N-1. SOF_TIMESTAMPING_OPT_ID_TCP
257 received the packet and its length at layer 2. A valid (non-zero)
285 Using this feature, applications can sample timestamps per sendmsg()
292 cmsg->cmsg_level = SOL_SOCKET;
293 cmsg->cmsg_type = SO_TIMESTAMPING;
294 cmsg->cmsg_len = CMSG_LEN(sizeof(__u32));
312 -------------------------
322 correlating a timestamp with data is non-trivial. A range of bytes
351 relevant sequence number in skb_shinfo(skb)->tskey. Because an skbuff
360 autocork. After linux-4.7, a better way to prevent coalescing is
382 ----------------------------
405 feature. At least one field is non-zero at any time. Most timestamps
412 as linuxptp. For the PTP clock API, see Documentation/driver-api/ptp.rst.
449 is the first if ts[2] is non-zero, the second otherwise, in which
477 Reading from the error queue is always a non-blocking operation. To
513 the requested fine-grained filtering for incoming packets is not
540 /* possible values for hwtstamp_config->tx_type */
558 /* possible values for hwtstamp_config->rx_filter */
578 --------------------------------------------------------
598 - In hard_start_xmit(), check if (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)
599 is set no-zero. If yes, then the driver is expected to do hardware time
601 - If this is possible for the skb and requested, then declare
603 SKBTX_IN_PROGRESS in skb_shinfo(skb)->tx_flags , e.g. with::
605 skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
611 - Driver should call skb_tx_timestamp() as close to passing sk_buff to hardware
614 - As soon as the driver has sent the packet and/or obtained a
626 ----------------------------------------------------------
643 interface (redirecting to the host port on TX, and intercepting frames on RX).
646 suffer, since the switch's variable queuing delay introduces a path delay
667 - ``.port_txtstamp()``: a hook called prior to the transmission of
669 This is required for two-step timestamping, since the hardware
672 packet so that it can re-enqueue the packet back into the socket's
675 in skb->cb and enqueue a tx skb queue. Typically, a switch will have a
678 key-value pairs of PTP sequence ID/message type/domain number and the
686 One-step TX timestamping do not require packet cloning, since there is
687 no follow-up message required by the PTP protocol (because the
690 to be re-enqueued into its socket's error queue.
692 - ``.port_rxtstamp()``: On RX, the BPF classifier is run by DSA to
697 timestamps might either be available in-band (through metadata in the
698 DSA header, or attached in other ways to the packet), or out-of-band
699 (through another RX timestamping FIFO). Deferral on RX is typically
714 mii_timestamper`` and add a pointer to it in ``phydev->mii_ts``. The presence
722 - Checking, in ``.ndo_eth_ioctl``, whether ``phy_has_hwtstamp(netdev->phydev)``
726 - On RX, special intervention may or may not be needed, depending on the
729 ``skb_defer_rx_timestamp(skb)`` is necessary or not - and if it is, don't
731 enabled, and ``skb->dev->phydev->mii_ts`` exists, its ``.rxtstamp()`` hook
733 deferral for RX timestamping is necessary. Again like DSA, it becomes the
742 - On TX, again, special intervention might or might not be needed. The
743 function that calls the ``mii_ts->txtstamp()`` hook is named
764 Stacked PHCs, especially DSA (but not only) - since that doesn't require any
766 all possible code paths - is that they uncover bugs which were impossible to
770 skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
781 the ``.ndo_eth_ioctl`` ("``priv->hwtstamp_tx_enabled == true``") and the
782 current skb requires a TX timestamp ("``skb_shinfo(skb)->tx_flags &
784 "``skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS``" flag. Note: as
792 "``skb_shinfo(skb)->tx_flags & SKBTX_IN_PROGRESS``" was set. With a stacked
799 "``skb_shinfo(skb)->tx_flags & SKBTX_IN_PROGRESS``", but also for
800 "``priv->hwtstamp_tx_enabled == true``". Because the rest of the system ensures