diff options
author | Murali Karicheri <m-karicheri2@ti.com> | 2020-07-22 10:40:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-27 12:20:40 -0700 |
commit | 451d8123f89791bb628277c0bdb4cae34a3563e6 (patch) | |
tree | 73021c2bce5b0a2b3939694a385e9c1407d740e9 /net/hsr/hsr_slave.h | |
parent | fa4dc89531360de760359bf94086b04dada98d4e (diff) | |
download | linux-451d8123f89791bb628277c0bdb4cae34a3563e6.tar.bz2 |
net: prp: add packet handling support
DAN-P (Dual Attached Nodes PRP) nodes are expected to receive
traditional IP packets as well as PRP (Parallel Redundancy
Protocol) tagged (trailer) packets. PRP trailer is 6 bytes
of PRP protocol unit called RCT, Redundancy Control Trailer
(RCT) similar to HSR tag. PRP network can have traditional
devices such as bridges/switches or PC attached to it and
should be able to communicate. Regular Ethernet devices treat
the RCT as pads. This patch adds logic to format L2 frames
from network stack to add a trailer (RCT) and send it as
duplicates over the slave interfaces when the protocol is
PRP as per IEC 62439-3. At the ingress, it strips the trailer,
do duplicate detection and rejection and forward a stripped
frame up the network stack. PRP device should accept frames
from Singly Attached Nodes (SAN) and thus the driver mark
the link where the frame came from in the node table.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/hsr/hsr_slave.h')
-rw-r--r-- | net/hsr/hsr_slave.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/hsr/hsr_slave.h b/net/hsr/hsr_slave.h index 9708a4f0ec09..edc4612bb009 100644 --- a/net/hsr/hsr_slave.h +++ b/net/hsr/hsr_slave.h @@ -32,4 +32,6 @@ static inline struct hsr_port *hsr_port_get_rcu(const struct net_device *dev) rcu_dereference(dev->rx_handler_data) : NULL; } +bool hsr_invalid_dan_ingress_frame(__be16 protocol); + #endif /* __HSR_SLAVE_H */ |