[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170516124425.6294-2-mlichvar@redhat.com>
Date: Tue, 16 May 2017 14:44:19 +0200
From: Miroslav Lichvar <mlichvar@...hat.com>
To: netdev@...r.kernel.org
Cc: Richard Cochran <richardcochran@...il.com>,
Willem de Bruijn <willemb@...gle.com>
Subject: [PATCH v3 net-next 1/7] net: define receive timestamp filter for NTP
Add HWTSTAMP_FILTER_NTP_ALL to the hwtstamp_rx_filters enum for
timestamping of NTP packets. There is currently only one driver
(phyter) that could support it directly.
CC: Richard Cochran <richardcochran@...il.com>
CC: Willem de Bruijn <willemb@...gle.com>
Signed-off-by: Miroslav Lichvar <mlichvar@...hat.com>
---
include/uapi/linux/net_tstamp.h | 3 +++
net/core/dev_ioctl.c | 2 ++
2 files changed, 5 insertions(+)
diff --git a/include/uapi/linux/net_tstamp.h b/include/uapi/linux/net_tstamp.h
index 464dcca..0749fb1 100644
--- a/include/uapi/linux/net_tstamp.h
+++ b/include/uapi/linux/net_tstamp.h
@@ -125,6 +125,9 @@ enum hwtstamp_rx_filters {
HWTSTAMP_FILTER_PTP_V2_SYNC,
/* PTP v2/802.AS1, any layer, Delay_req packet */
HWTSTAMP_FILTER_PTP_V2_DELAY_REQ,
+
+ /* NTP, UDP, all versions and packet modes */
+ HWTSTAMP_FILTER_NTP_ALL,
};
#endif /* _NET_TIMESTAMPING_H */
diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c
index b94b1d2..8f036a7 100644
--- a/net/core/dev_ioctl.c
+++ b/net/core/dev_ioctl.c
@@ -227,6 +227,8 @@ static int net_hwtstamp_validate(struct ifreq *ifr)
case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:
rx_filter_valid = 1;
break;
+ case HWTSTAMP_FILTER_NTP_ALL:
+ break;
}
if (!tx_type_valid || !rx_filter_valid)
--
2.9.3
Powered by blists - more mailing lists