summaryrefslogtreecommitdiffstats
path: root/include/linux/ptp_classify.h
diff options
context:
space:
mode:
authorStefan Sørensen <stefan.sorensen@spectralink.com>2014-06-27 11:59:10 +0200
committerDavid S. Miller <davem@davemloft.net>2014-07-07 16:57:18 -0700
commitae5c6c6d7bcadfbedefb5fc8ff0ebe2bfa83a0a1 (patch)
treed1071ae8d47415a2575f689e54e35119f541befd /include/linux/ptp_classify.h
parentb9c701edc7ff6ddd522497b0194b0bc3ec1b51a9 (diff)
downloadtalos-obmc-linux-ae5c6c6d7bcadfbedefb5fc8ff0ebe2bfa83a0a1.tar.gz
talos-obmc-linux-ae5c6c6d7bcadfbedefb5fc8ff0ebe2bfa83a0a1.zip
ptp: Classify ptp over ip over vlan packets
This extends the ptp bpf to also match ptp over ip over vlan packets. The ptp classes are changed to orthogonal bitfields representing version, transport and vlan values to simplify matching. Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/ptp_classify.h')
-rw-r--r--include/linux/ptp_classify.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/ptp_classify.h b/include/linux/ptp_classify.h
index 7dfed71d76a6..159c987b1853 100644
--- a/include/linux/ptp_classify.h
+++ b/include/linux/ptp_classify.h
@@ -33,8 +33,8 @@
#define PTP_CLASS_IPV4 0x10 /* event in an IPV4 UDP packet */
#define PTP_CLASS_IPV6 0x20 /* event in an IPV6 UDP packet */
#define PTP_CLASS_L2 0x30 /* event in a L2 packet */
-#define PTP_CLASS_VLAN 0x40 /* event in a VLAN tagged L2 packet */
-#define PTP_CLASS_PMASK 0xf0 /* mask for the packet type field */
+#define PTP_CLASS_PMASK 0x30 /* mask for the packet type field */
+#define PTP_CLASS_VLAN 0x40 /* event in a VLAN tagged packet */
#define PTP_CLASS_V1_IPV4 (PTP_CLASS_V1 | PTP_CLASS_IPV4)
#define PTP_CLASS_V1_IPV6 (PTP_CLASS_V1 | PTP_CLASS_IPV6) /* probably DNE */
@@ -54,7 +54,6 @@
#define IP6_HLEN 40
#define UDP_HLEN 8
#define OFF_IHL 14
-#define OFF_PTP6 (ETH_HLEN + IP6_HLEN + UDP_HLEN)
#define IPV4_HLEN(data) (((struct iphdr *)(data + OFF_IHL))->ihl << 2)
#if defined(CONFIG_NET_PTP_CLASSIFY)
OpenPOWER on IntegriCloud