mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
![George McCollister](/assets/img/avatar_default.png)
Add support for offloading of HSR/PRP (IEC 62439-3) tag insertion tag removal, duplicate generation and forwarding. For HSR, insertion involves the switch adding a 6 byte HSR header after the 14 byte Ethernet header. For PRP it adds a 6 byte trailer. Tag removal involves automatically stripping the HSR/PRP header/trailer in the switch. This is possible when the switch also performs auto deduplication using the HSR/PRP header/trailer (making it no longer required). Forwarding involves automatically forwarding between redundant ports in an HSR. This is crucial because delay is accumulated as a frame passes through each node in the ring. Duplication involves the switch automatically sending a single frame from the CPU port to both redundant ports. This is required because the inserted HSR/PRP header/trailer must contain the same sequence number on the frames sent out both redundant ports. Export is_hsr_master so DSA can tell them apart from other devices in dsa_slave_changeupper. Signed-off-by: George McCollister <george.mccollister@gmail.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
31 lines
1.1 KiB
C
31 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright 2011-2014 Autronica Fire and Security AS
|
|
*
|
|
* Author(s):
|
|
* 2011-2014 Arvid Brodin, arvid.brodin@alten.se
|
|
*
|
|
* include file for HSR and PRP.
|
|
*/
|
|
|
|
#ifndef __HSR_FORWARD_H
|
|
#define __HSR_FORWARD_H
|
|
|
|
#include <linux/netdevice.h>
|
|
#include "hsr_main.h"
|
|
|
|
void hsr_forward_skb(struct sk_buff *skb, struct hsr_port *port);
|
|
struct sk_buff *prp_create_tagged_frame(struct hsr_frame_info *frame,
|
|
struct hsr_port *port);
|
|
struct sk_buff *hsr_create_tagged_frame(struct hsr_frame_info *frame,
|
|
struct hsr_port *port);
|
|
struct sk_buff *hsr_get_untagged_frame(struct hsr_frame_info *frame,
|
|
struct hsr_port *port);
|
|
struct sk_buff *prp_get_untagged_frame(struct hsr_frame_info *frame,
|
|
struct hsr_port *port);
|
|
bool prp_drop_frame(struct hsr_frame_info *frame, struct hsr_port *port);
|
|
bool hsr_drop_frame(struct hsr_frame_info *frame, struct hsr_port *port);
|
|
void prp_fill_frame_info(__be16 proto, struct sk_buff *skb,
|
|
struct hsr_frame_info *frame);
|
|
void hsr_fill_frame_info(__be16 proto, struct sk_buff *skb,
|
|
struct hsr_frame_info *frame);
|
|
#endif /* __HSR_FORWARD_H */
|