|
|
|
@ -94,6 +94,10 @@
|
|
|
|
|
#include <sys/mman.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_HW_TIMESTAMPING
|
|
|
|
|
#include <linux/net_tstamp.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif /* HAVE_AF_PACKET */
|
|
|
|
|
|
|
|
|
|
extern int max_pending_packets;
|
|
|
|
@ -1669,6 +1673,16 @@ static int AFPSetupRing(AFPThreadVars *ptv, char *devname)
|
|
|
|
|
return AFP_FATAL_ERROR;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_HW_TIMESTAMPING
|
|
|
|
|
int req = SOF_TIMESTAMPING_RAW_HARDWARE;
|
|
|
|
|
if (setsockopt(ptv->socket, SOL_PACKET, PACKET_TIMESTAMP, (void *) &req,
|
|
|
|
|
sizeof(req)) < 0) {
|
|
|
|
|
SCLogWarning(SC_ERR_AFP_CREATE,
|
|
|
|
|
"Can't activate hardware timestamping on packet socket: %s",
|
|
|
|
|
strerror(errno));
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Allocate RX ring */
|
|
|
|
|
#ifdef HAVE_TPACKET_V3
|
|
|
|
|
if (ptv->flags & AFP_TPACKET_V3) {
|
|
|
|
|