• Vladimir Oltean's avatar
    net: mscc: ocelot: annotate which traps need PTP timestamping · 9d75b881
    Vladimir Oltean authored
    The ocelot switch library does not need this information, but the felix
    DSA driver does.
    
    As a reminder, the VSC9959 switch in LS1028A doesn't have an IRQ line
    for packet extraction, so to be notified that a PTP packet needs to be
    dequeued, it receives that packet also over Ethernet, by setting up a
    packet trap. The Felix driver needs to install special kinds of traps
    for packets in need of RX timestamps, such that the packets are
    replicated both over Ethernet and over the CPU port module.
    
    But the Ocelot switch library sets up more than one trap for PTP event
    messages; it also traps PTP general messages, MRP control messages etc.
    Those packets don't need PTP timestamps, so there's no reason for the
    Felix driver to send them to the CPU port module.
    
    By knowing which traps need PTP timestamps, the Felix driver can
    adjust the traps installed using ocelot_trap_add() such that only those
    will actually get delivered to the CPU port module.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9d75b881
ocelot.c 76.3 KB