Lines Matching +full:ts +full:- +full:attached

1 .. SPDX-License-Identifier: GPL-2.0
43 -------------------------------------------------------------
59 -------------------------------------------------------------------
72 ----------------------------------------------------------------------
138 over-report measurement, because the timestamp is generated when all
180 is derived from a per-socket u32 counter (that wraps). For datagram
227 received the packet and its length at layer 2. A valid (non-zero)
262 cmsg->cmsg_level = SOL_SOCKET;
263 cmsg->cmsg_type = SO_TIMESTAMPING;
264 cmsg->cmsg_len = CMSG_LEN(sizeof(__u32));
282 -------------------------
292 correlating a timestamp with data is non-trivial. A range of bytes
321 relevant sequence number in skb_shinfo(skb)->tskey. Because an skbuff
351 ----------------------------
359 struct timespec ts[3];
365 struct __kernel_timespec ts[3];
374 feature. At least one field is non-zero at any time. Most timestamps
375 are passed in ts[0]. Hardware timestamps are passed in ts[2].
377 ts[1] used to hold hardware timestamps converted to system time.
381 as linuxptp. For the PTP clock API, see Documentation/driver-api/ptp.rst.
386 in ts[0] when a real software timestamp is missing. This happens also
393 socket's error queue with the send timestamp(s) attached. A process
397 outgoing data packet with two ancillary messages attached.
418 is the first if ts[2] is non-zero, the second otherwise, in which
419 case the timestamp is stored in ts[0].
446 Reading from the error queue is always a non-blocking operation. To
461 implicitly defined. ts[0] holds a software timestamp if set, ts[1]
462 is again deprecated and ts[2] holds a hardware timestamp if set.
482 the requested fine-grained filtering for incoming packets is not
509 /* possible values for hwtstamp_config->tx_type */
527 /* possible values for hwtstamp_config->rx_filter */
547 --------------------------------------------------------
567 - In hard_start_xmit(), check if (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)
568 is set no-zero. If yes, then the driver is expected to do hardware time
570 - If this is possible for the skb and requested, then declare
572 SKBTX_IN_PROGRESS in skb_shinfo(skb)->tx_flags , e.g. with::
574 skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
580 - Driver should call skb_tx_timestamp() as close to passing sk_buff to hardware
583 - As soon as the driver has sent the packet and/or obtained a
595 ----------------------------------------------------------
614 When a DSA switch is attached to a host port, PTP synchronization has to
626 handling in the driver for the host port it is attached to. However, when the
636 - ``.port_txtstamp()``: a hook called prior to the transmission of
638 This is required for two-step timestamping, since the hardware
641 packet so that it can re-enqueue the packet back into the socket's
644 in skb->cb and enqueue a tx skb queue. Typically, a switch will have a
647 key-value pairs of PTP sequence ID/message type/domain number and the
655 One-step TX timestamping do not require packet cloning, since there is
656 no follow-up message required by the PTP protocol (because the
659 to be re-enqueued into its socket's error queue.
661 - ``.port_rxtstamp()``: On RX, the BPF classifier is run by DSA to
666 timestamps might either be available in-band (through metadata in the
667 DSA header, or attached in other ways to the packet), or out-of-band
683 mii_timestamper`` and add a pointer to it in ``phydev->mii_ts``. The presence
691 - Checking, in ``.ndo_eth_ioctl``, whether ``phy_has_hwtstamp(netdev->phydev)``
695 - On RX, special intervention may or may not be needed, depending on the
698 ``skb_defer_rx_timestamp(skb)`` is necessary or not - and if it is, don't
700 enabled, and ``skb->dev->phydev->mii_ts`` exists, its ``.rxtstamp()`` hook
711 - On TX, again, special intervention might or might not be needed. The
712 function that calls the ``mii_ts->txtstamp()`` hook is named
733 Stacked PHCs, especially DSA (but not only) - since that doesn't require any
735 all possible code paths - is that they uncover bugs which were impossible to
739 skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
750 the ``.ndo_eth_ioctl`` ("``priv->hwtstamp_tx_enabled == true``") and the
751 current skb requires a TX timestamp ("``skb_shinfo(skb)->tx_flags &
753 "``skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS``" flag. Note: as
761 "``skb_shinfo(skb)->tx_flags & SKBTX_IN_PROGRESS``" was set. With a stacked
768 "``skb_shinfo(skb)->tx_flags & SKBTX_IN_PROGRESS``", but also for
769 "``priv->hwtstamp_tx_enabled == true``". Because the rest of the system ensures