|
|
@ -43,6 +43,27 @@ |
|
|
|
namespace grpc_core { |
|
|
|
namespace grpc_core { |
|
|
|
|
|
|
|
|
|
|
|
#ifdef GRPC_LINUX_ERRQUEUE |
|
|
|
#ifdef GRPC_LINUX_ERRQUEUE |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Redefining scm_timestamping in the same way that <linux/errqueue.h> defines
|
|
|
|
|
|
|
|
* it, so that code compiles on systems that don't have it. */ |
|
|
|
|
|
|
|
struct scm_timestamping { |
|
|
|
|
|
|
|
struct timespec ts[3]; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
/* Also redefine timestamp types */ |
|
|
|
|
|
|
|
/* The timestamp type for when the driver passed skb to NIC, or HW. */ |
|
|
|
|
|
|
|
constexpr int SCM_TSTAMP_SND = 0; |
|
|
|
|
|
|
|
/* The timestamp type for when data entered the packet scheduler. */ |
|
|
|
|
|
|
|
constexpr int SCM_TSTAMP_SCHED = 1; |
|
|
|
|
|
|
|
/* The timestamp type for when data acknowledged by peer. */ |
|
|
|
|
|
|
|
constexpr int SCM_TSTAMP_ACK = 2; |
|
|
|
|
|
|
|
/* Redefine required constants from <linux/net_tstamp.h> */ |
|
|
|
|
|
|
|
constexpr uint32_t SOF_TIMESTAMPING_TX_SOFTWARE = 1u << 1; |
|
|
|
|
|
|
|
constexpr uint32_t SOF_TIMESTAMPING_SOFTWARE = 1u << 4; |
|
|
|
|
|
|
|
constexpr uint32_t SOF_TIMESTAMPING_OPT_ID = 1u << 7; |
|
|
|
|
|
|
|
constexpr uint32_t SOF_TIMESTAMPING_TX_SCHED = 1u << 8; |
|
|
|
|
|
|
|
constexpr uint32_t SOF_TIMESTAMPING_TX_ACK = 1u << 9; |
|
|
|
|
|
|
|
constexpr uint32_t SOF_TIMESTAMPING_OPT_TSONLY = 1u << 11; |
|
|
|
|
|
|
|
|
|
|
|
constexpr uint32_t kTimestampingSocketOptions = SOF_TIMESTAMPING_SOFTWARE | |
|
|
|
constexpr uint32_t kTimestampingSocketOptions = SOF_TIMESTAMPING_SOFTWARE | |
|
|
|
SOF_TIMESTAMPING_OPT_ID | |
|
|
|
SOF_TIMESTAMPING_OPT_ID | |
|
|
|
SOF_TIMESTAMPING_OPT_TSONLY; |
|
|
|
SOF_TIMESTAMPING_OPT_TSONLY; |
|
|
|