public inbox for
help / color / mirror / Atom feed
* [newlib-cygwin] Add a place for a driver to report rx timestamps
@ 2018-08-24 13:09 Sebastian Huber
  0 siblings, 0 replies; only message in thread
From: Sebastian Huber @ 2018-08-24 13:09 UTC (permalink / raw)
  To: newlib-cvs;h=7ff81234c4635bc0c2ea25f0b27b80767cc4dd29

commit 7ff81234c4635bc0c2ea25f0b27b80767cc4dd29
Author: kib <>
Date:   Tue Nov 7 09:29:14 2017 +0000

    Add a place for a driver to report rx timestamps
    in nanoseconds from boot for the received packets.
    The rcv_tstmp field overlaps the place of Ln header length indicators,
    not used by received packets.  The basic pkthdr rearrangement change
    in sys/mbuf.h was provided by gallatin.
    There are two accompanying M_ flags: M_TSTMP means that there is the
    timestamp (and it was generated by hardware).
    Another flag M_TSTMP_HPREC indicates that the timestamp is
    high-precision.  Practically M_TSTMP_HPREC means that hardware
    provided additional precision comparing with the stamps when the flag
    is not set.  E.g., for ConnectX all packets are stamped by hardware
    when PCIe transaction to write out the completion descriptor is
    performed, but PTP packet are stamped on port.  For Intel cards, when
    PTP assist is enabled, only PTP packets are stamped in the limited
    number of registers, so if Intel cards ever start support this
    mechanism, they would always set M_TSTMP | M_TSTMP_HPREC if hardware
    timestamp is present for the given packet.
    Add IFCAP_HWRXTSTMP interface capability to indicate the support for
    hardware rx timestamping, and ifconfig(8) command to toggle it.
    Based on the patch by:	gallatin
    Reviewed by:	gallatin (previous version), hselasky
    Sponsored by:	Mellanox Technologies
    MFC after:	2 weeks (? mbuf KBI issue)
    X-Differential revision:

 newlib/libc/sys/rtems/include/net/if.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/newlib/libc/sys/rtems/include/net/if.h b/newlib/libc/sys/rtems/include/net/if.h
index 40f5095..04f828e 100644
--- a/newlib/libc/sys/rtems/include/net/if.h
+++ b/newlib/libc/sys/rtems/include/net/if.h
@@ -240,6 +240,7 @@ struct if_data {
 #define	IFCAP_TXCSUM_IPV6	0x400000  /* can offload checksum on IPv6 TX */
 #define	IFCAP_HWSTATS		0x800000 /* manages counters internally */
 #define	IFCAP_TXRTLMT		0x1000000 /* hardware supports TX rate limiting */
+#define	IFCAP_HWRXTSTMP		0x2000000 /* hardware rx timestamping */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-08-24 13:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-24 13:09 [newlib-cygwin] Add a place for a driver to report rx timestamps Sebastian Huber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).