Skip to content
  • Scott McMillan's avatar
    packet_mmap: expose hw packet timestamps to network packet capture utilities · 614f60fa
    Scott McMillan authored
    
    
    This patch adds a setting, PACKET_TIMESTAMP, to specify the packet
    timestamp source that is exported to capture utilities like tcpdump by
    packet_mmap.
    
    PACKET_TIMESTAMP accepts the same integer bit field as
    SO_TIMESTAMPING.  However, only the SOF_TIMESTAMPING_SYS_HARDWARE and
    SOF_TIMESTAMPING_RAW_HARDWARE values are currently recognized by
    PACKET_TIMESTAMP.  SOF_TIMESTAMPING_SYS_HARDWARE takes precedence over
    SOF_TIMESTAMPING_RAW_HARDWARE if both bits are set.
    
    If PACKET_TIMESTAMP is not set, a software timestamp generated inside
    the networking stack is used (the behavior before this setting was
    added).
    
    Signed-off-by: default avatarScott McMillan <scott.a.mcmillan@intel.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    614f60fa