History

psample: Add additional metadata attributes

Extend psample to report the following attributes when available: * Output traffic class as a 16-bit value * Output traffic class occupancy in bytes as a 64-bit value * End-to-end latency of the packet in nanoseconds resolution * Software timestamp in nanoseconds resolution (always available) * Packet's protocol. Needed for packet dissection in user space (always available)

Ido Schimmel committed 5 years ago

Commit 07e1a581 parent a03e99d3 files · +52 −1Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/linux/psample.h+7−0
@@ -16,6 +16,13 @@ enum { · 15 unmodified lines
1616 /* commands attributes */
1717 PSAMPLE_ATTR_GROUP_REFCOUNT,
1818
19+ PSAMPLE_ATTR_PAD,
20+ PSAMPLE_ATTR_OUT_TC, /* u16 */
21+ PSAMPLE_ATTR_OUT_TC_OCC, /* u64, bytes */
22+ PSAMPLE_ATTR_LATENCY, /* u64, nanoseconds */
23+ PSAMPLE_ATTR_TIMESTAMP, /* u64, nanoseconds */
24+ PSAMPLE_ATTR_PROTO, /* u16 */
25+
1926 __PSAMPLE_ATTR_MAX
2027 };
2128