• Home
  • Raw
  • Download

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

1 .. SPDX-License-Identifier: GPL-2.0
43 -------------------------------------------------------------
71 ----------------------------------------------------------------------
137 over-report measurement, because the timestamp is generated when all
179 is derived from a per-socket u32 counter (that wraps). For datagram
226 received the packet and its length at layer 2. A valid (non-zero)
261 cmsg->cmsg_level = SOL_SOCKET;
262 cmsg->cmsg_type = SO_TIMESTAMPING;
263 cmsg->cmsg_len = CMSG_LEN(sizeof(__u32));
281 -------------------------
291 correlating a timestamp with data is non-trivial. A range of bytes
320 relevant sequence number in skb_shinfo(skb)->tskey. Because an skbuff
350 ----------------------------
373 feature. At least one field is non-zero at any time. Most timestamps
380 as linuxptp. For the PTP clock API, see Documentation/driver-api/ptp.rst.
417 is the first if ts[2] is non-zero, the second otherwise, in which
445 Reading from the error queue is always a non-blocking operation. To
477 Desired behavior is passed into the kernel and to a specific device by
481 the requested fine-grained filtering for incoming packets is not
508 /* possible values for hwtstamp_config->tx_type */
526 /* possible values for hwtstamp_config->rx_filter */
546 --------------------------------------------------------
566 - In hard_start_xmit(), check if (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)
567 is set no-zero. If yes, then the driver is expected to do hardware time
569 - If this is possible for the skb and requested, then declare
571 SKBTX_IN_PROGRESS in skb_shinfo(skb)->tx_flags , e.g. with::
573 skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
579 - Driver should call skb_tx_timestamp() as close to passing sk_buff to hardware
582 - As soon as the driver has sent the packet and/or obtained a
594 ----------------------------------------------------------
603 3.2.1 DSA (Distributed Switch Architecture) switches
608 a port multiplier with optional forwarding acceleration features. Each DSA
613 When a DSA switch is attached to a host port, PTP synchronization has to
615 jitter between the host port and its PTP partner. For this reason, some DSA
618 measure wire and PHY propagation latencies. Timestamping DSA switches are
620 for the fact that the DSA interfaces are in fact virtual in terms of network
622 interfaces of a DSA switch to share the same PHC.
624 By design, PTP timestamping with a DSA switch does not need any special
626 host port also supports PTP timestamping, DSA will take care of intercepting
630 anybody else except for the DSA switch port must be prevented from doing so.
632 In code, DSA provides for most of the infrastructure for timestamping already,
637 - ``.port_txtstamp()``: The driver is passed a clone of the timestampable skb
645 a pointer to its clone, in ``DSA_SKB_CB(skb)->clone``, to ease the driver's
648 - ``.port_rxtstamp()``: The original (and only) timestampable skb is provided
651 available in-band (through metadata in the DSA header, or attached in other
652 ways to the packet), or out-of-band (through another RX timestamping FIFO).
654 sleepable context. In that case, it is the responsibility of the DSA driver
661 hence they do not have a representation in terms of a network interface as DSA
667 mii_timestamper`` and add a pointer to it in ``phydev->mii_ts``. The presence
672 driver. Therefore, as opposed to DSA switches, modifications need to be done
675 - Checking, in ``.ndo_do_ioctl``, whether ``phy_has_hwtstamp(netdev->phydev)``
679 - On RX, special intervention may or may not be needed, depending on the
682 ``skb_defer_rx_timestamp(skb)`` is necessary or not - and if it is, don't
684 enabled, and ``skb->dev->phydev->mii_ts`` exists, its ``.rxtstamp()`` hook
685 will be called now, to determine, using logic very similar to DSA, whether
686 deferral for RX timestamping is necessary. Again like DSA, it becomes the
695 - On TX, again, special intervention might or might not be needed. The
696 function that calls the ``mii_ts->txtstamp()`` hook is named
717 Stacked PHCs, especially DSA (but not only) - since that doesn't require any
719 all possible code paths - is that they uncover bugs which were impossible to
723 skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
725 Any TX timestamping logic, be it a plain MAC driver, a DSA switch driver, a PHY
734 the ``.ndo_do_ioctl`` ("``priv->hwtstamp_tx_enabled == true``") and the
735 current skb requires a TX timestamp ("``skb_shinfo(skb)->tx_flags &
737 "``skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS``" flag. Note: as
745 "``skb_shinfo(skb)->tx_flags & SKBTX_IN_PROGRESS``" was set. With a stacked
752 "``skb_shinfo(skb)->tx_flags & SKBTX_IN_PROGRESS``", but also for
753 "``priv->hwtstamp_tx_enabled == true``". Because the rest of the system ensures