• Home
  • Raw
  • Download

Lines Matching +full:dsa +full:- +full:specific

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
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)
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
381 ----------------------------
404 feature. At least one field is non-zero at any time. Most timestamps
411 as linuxptp. For the PTP clock API, see Documentation/driver-api/ptp.rst.
448 is the first if ts[2] is non-zero, the second otherwise, in which
476 Reading from the error queue is always a non-blocking operation. To
508 Desired behavior is passed into the kernel and to a specific device by
512 the requested fine-grained filtering for incoming packets is not
539 /* possible values for hwtstamp_config->tx_type */
557 /* possible values for hwtstamp_config->rx_filter */
577 --------------------------------------------------------
597 - In hard_start_xmit(), check if (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)
598 is set no-zero. If yes, then the driver is expected to do hardware time
600 - If this is possible for the skb and requested, then declare
602 SKBTX_IN_PROGRESS in skb_shinfo(skb)->tx_flags , e.g. with::
604 skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
610 - Driver should call skb_tx_timestamp() as close to passing sk_buff to hardware
613 - As soon as the driver has sent the packet and/or obtained a
625 ----------------------------------------------------------
634 3.2.1 DSA (Distributed Switch Architecture) switches
639 a port multiplier with optional forwarding acceleration features. Each DSA
644 When a DSA switch is attached to a host port, PTP synchronization has to
646 jitter between the host port and its PTP partner. For this reason, some DSA
649 measure wire and PHY propagation latencies. Timestamping DSA switches are
651 for the fact that the DSA interfaces are in fact virtual in terms of network
653 interfaces of a DSA switch to share the same PHC.
655 By design, PTP timestamping with a DSA switch does not need any special
657 host port also supports PTP timestamping, DSA will take care of intercepting
661 anybody else except for the DSA switch port must be prevented from doing so.
663 In the generic layer, DSA provides the following infrastructure for PTP
666 - ``.port_txtstamp()``: a hook called prior to the transmission of
668 This is required for two-step timestamping, since the hardware
671 packet so that it can re-enqueue the packet back into the socket's
674 in skb->cb and enqueue a tx skb queue. Typically, a switch will have a
677 key-value pairs of PTP sequence ID/message type/domain number and the
685 One-step TX timestamping do not require packet cloning, since there is
686 no follow-up message required by the PTP protocol (because the
689 to be re-enqueued into its socket's error queue.
691 - ``.port_rxtstamp()``: On RX, the BPF classifier is run by DSA to
696 timestamps might either be available in-band (through metadata in the
697 DSA header, or attached in other ways to the packet), or out-of-band
700 that case, it is the responsibility of the DSA driver to call
707 hence they do not have a representation in terms of a network interface as DSA
713 mii_timestamper`` and add a pointer to it in ``phydev->mii_ts``. The presence
718 driver. Therefore, as opposed to DSA switches, modifications need to be done
721 - Checking, in ``.ndo_eth_ioctl``, whether ``phy_has_hwtstamp(netdev->phydev)``
725 - On RX, special intervention may or may not be needed, depending on the
728 ``skb_defer_rx_timestamp(skb)`` is necessary or not - and if it is, don't
730 enabled, and ``skb->dev->phydev->mii_ts`` exists, its ``.rxtstamp()`` hook
731 will be called now, to determine, using logic very similar to DSA, whether
732 deferral for RX timestamping is necessary. Again like DSA, it becomes the
741 - On TX, again, special intervention might or might not be needed. The
742 function that calls the ``mii_ts->txtstamp()`` hook is named
763 Stacked PHCs, especially DSA (but not only) - since that doesn't require any
765 all possible code paths - is that they uncover bugs which were impossible to
769 skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
771 Any TX timestamping logic, be it a plain MAC driver, a DSA switch driver, a PHY
780 the ``.ndo_eth_ioctl`` ("``priv->hwtstamp_tx_enabled == true``") and the
781 current skb requires a TX timestamp ("``skb_shinfo(skb)->tx_flags &
783 "``skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS``" flag. Note: as
791 "``skb_shinfo(skb)->tx_flags & SKBTX_IN_PROGRESS``" was set. With a stacked
798 "``skb_shinfo(skb)->tx_flags & SKBTX_IN_PROGRESS``", but also for
799 "``priv->hwtstamp_tx_enabled == true``". Because the rest of the system ensures