Lines Matching +full:we +full:- +full:on +full:- +full:ns
1 .. SPDX-License-Identifier: GPL-2.0
18 based on the architecture type and time_t representation of libc.
27 based on the architecture type and time_t representation of libc.
32 IP_MULTICAST_LOOP + SO_TIMESTAMP[NS]
37 Generates timestamps on reception, transmission or both. Supports
43 -------------------------------------------------------------
45 This socket option enables timestamping of datagrams on the reception
56 on 32 bit machines.
59 -------------------------------------------------------------------
62 Its struct timespec allows for higher resolution (ns) timestamps than the
69 on 32 bit machines.
72 ----------------------------------------------------------------------
127 timestamp taken immediately before send() from this timestamp. On
138 over-report measurement, because the timestamp is generated when all
177 based on timestamp order or payload inspection alone, then.
181 is derived from a per-socket u32 counter (that wraps). For datagram
204 always be set too. On datagram sockets the option has no effect.
208 a timestamp with counter N-1. SOF_TIMESTAMPING_OPT_ID_TCP
216 The difference is due to being based on snd_una versus write_seq.
218 depends on factors outside of process control, such as network RTT.
229 are already supported unconditionally on all packets with receive
230 timestamps and on IPv6 packets with transmit timestamp. This option
258 received the packet and its length at layer 2. A valid (non-zero)
283 ignore the unexpected non-zero value. But it makes behavior subtly
284 dependent on other sockets. This flag isolates the socket for more
293 Then pass option SOF_TIMESTAMPING_OPT_CMSG. This option depends on
310 cmsg->cmsg_level = SOL_SOCKET;
311 cmsg->cmsg_type = SO_TIMESTAMPING;
312 cmsg->cmsg_len = CMSG_LEN(sizeof(__u32));
330 -------------------------
340 correlating a timestamp with data is non-trivial. A range of bytes
351 because performance debugging often needs to focus on such outliers.
356 different from deciding on a strategy for IP fragmentation. There, the
358 bytestreams, we chose that a timestamp is generated only when all
364 On the host, TCP can also break the simple 1:1 mapping from buffer to
369 relevant sequence number in skb_shinfo(skb)->tskey. Because an skbuff
378 autocork. After linux-4.7, a better way to prevent coalescing is
400 ----------------------------
420 on 32 bit machines.
423 feature. At least one field is non-zero at any time. Most timestamps
427 Instead, expose the hardware clock device on the NIC directly as
430 as linuxptp. For the PTP clock API, see Documentation/driver-api/ptp.rst.
436 on hardware transmit timestamps.
467 is the first if ts[2] is non-zero, the second otherwise, in which
485 error queue mechanism is just a method to piggyback the timestamp on.
488 accordingly. Until the process calls recvmsg() on the error queue,
495 Reading from the error queue is always a non-blocking operation. To
496 block waiting on a timestamp, use poll or select. poll() will return
497 POLLERR in pollfd.revents if any data is ready on the error queue.
499 ignored on request. See also `man 2 poll`.
505 On reception, there is no reason to read from the socket error queue.
507 on a normal recvmsg(). Since this is not a socket error, it is not
531 the requested fine-grained filtering for incoming packets is not
558 /* possible values for hwtstamp_config->tx_type */
576 /* possible values for hwtstamp_config->rx_filter */
596 --------------------------------------------------------
600 the actual values as described in the section on SIOCSHWTSTAMP. It
616 - In hard_start_xmit(), check if (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)
617 is set no-zero. If yes, then the driver is expected to do hardware time
619 - If this is possible for the skb and requested, then declare
621 SKBTX_IN_PROGRESS in skb_shinfo(skb)->tx_flags , e.g. with::
623 skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
629 - Driver should call skb_tx_timestamp() as close to passing sk_buff to hardware
632 - As soon as the driver has sent the packet and/or obtained a
644 ----------------------------------------------------------
661 interface (redirecting to the host port on TX, and intercepting frames on RX).
667 perform network timestamping on their own MAC, such that path delays only
678 hardware timestamping on it. This is because the SO_TIMESTAMPING API does not
685 - ``.port_txtstamp()``: a hook called prior to the transmission of
687 This is required for two-step timestamping, since the hardware
690 packet so that it can re-enqueue the packet back into the socket's
693 in skb->cb and enqueue a tx skb queue. Typically, a switch will have a
696 key-value pairs of PTP sequence ID/message type/domain number and the
704 One-step TX timestamping do not require packet cloning, since there is
705 no follow-up message required by the PTP protocol (because the
708 to be re-enqueued into its socket's error queue.
710 - ``.port_rxtstamp()``: On RX, the BPF classifier is run by DSA to
714 if that is immediately available, or defer to later. On reception,
715 timestamps might either be available in-band (through metadata in the
716 DSA header, or attached in other ways to the packet), or out-of-band
717 (through another RX timestamping FIFO). Deferral on RX is typically
720 ``netif_rx()`` on the freshly timestamped skb.
732 mii_timestamper`` and add a pointer to it in ``phydev->mii_ts``. The presence
740 - Checking, in ``.ndo_eth_ioctl``, whether ``phy_has_hwtstamp(netdev->phydev)``
742 but instead pass it on to the PHY using ``phy_mii_ioctl()``.
744 - On RX, special intervention may or may not be needed, depending on the
747 ``skb_defer_rx_timestamp(skb)`` is necessary or not - and if it is, don't
749 enabled, and ``skb->dev->phydev->mii_ts`` exists, its ``.rxtstamp()`` hook
760 - On TX, again, special intervention might or might not be needed. The
761 function that calls the ``mii_ts->txtstamp()`` hook is named
782 Stacked PHCs, especially DSA (but not only) - since that doesn't require any
784 all possible code paths - is that they uncover bugs which were impossible to
788 skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
799 the ``.ndo_eth_ioctl`` ("``priv->hwtstamp_tx_enabled == true``") and the
800 current skb requires a TX timestamp ("``skb_shinfo(skb)->tx_flags &
802 "``skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS``" flag. Note: as
810 "``skb_shinfo(skb)->tx_flags & SKBTX_IN_PROGRESS``" was set. With a stacked
817 "``skb_shinfo(skb)->tx_flags & SKBTX_IN_PROGRESS``", but also for
818 "``priv->hwtstamp_tx_enabled == true``". Because the rest of the system ensures