Hi, in order to reduce code duplication in the ptp code of DSA drivers, move the header parsing function to ptp_classify. This way the Marvell and the hellcreek drivers can share the same implementation. And probably more drivers can benefit from it. Implemented as discussed [1] [2].
@DSA maintainers: Please, have a look the Marvell code. I don't have hardware to test it. I've tested this series only on the Hirschmann switch. Thanks, Kurt [1] - https://lkml.kernel.org/netdev/20200713140112.GB27934@hoboy/ [2] - https://lkml.kernel.org/netdev/20200720142146.GB16001@hoboy/ Kurt Kanzenbach (2): ptp: Add generic ptp v2 header parsing function net: dsa: mv88e6xxx: Use generic ptp header parsing function drivers/net/dsa/mv88e6xxx/Kconfig | 1 + drivers/net/dsa/mv88e6xxx/hwtstamp.c | 59 ++++++---------------------- include/linux/ptp_classify.h | 38 ++++++++++++++++++ net/core/ptp_classifier.c | 30 ++++++++++++++ 4 files changed, 82 insertions(+), 46 deletions(-) -- 2.20.1