Lines Matching full:hsr

7  * Frame router for HSR and PRP.
20 /* The uses I can see for these HSR supervision frames are:
35 static bool is_supervision_frame(struct hsr_priv *hsr, struct sk_buff *skb) in is_supervision_frame() argument
48 hsr->sup_multicast_addr)) in is_supervision_frame()
63 if (hsr_V1_hdr->hsr.encap_proto != htons(ETH_P_PRP)) in is_supervision_frame()
120 static bool is_proxy_supervision_frame(struct hsr_priv *hsr, in is_proxy_supervision_frame() argument
129 /* Get the HSR protocol revision. */ in is_proxy_supervision_frame()
142 /* For RedBox (HSR-SAN) check if we have received the supervision in is_proxy_supervision_frame()
145 return hsr_is_node_in_db(&hsr->proxy_node_db, in is_proxy_supervision_frame()
232 lane_id |= port->hsr->net_id; in prp_set_lan_id()
273 if (port->hsr->prot_version) { in hsr_set_path_id()
296 /* pad to minimum packet size which is 60 + 6 (HSR tag) */ in hsr_fill_tag()
311 * the hsr tag is after the vlan tag. in hsr_fill_tag()
328 /* If the original frame was an HSR tagged frame, just clone it to be sent
349 /* Create the new skb with enough headroom to fit the HSR tag */ in hsr_create_tagged_frame()
371 return hsr_fill_tag(skb, frame, port, port->hsr->prot_version); in hsr_create_tagged_frame()
432 /* When HSR node is used as RedBox - the frame received from HSR ring in hsr_xmit()
438 port->hsr->macaddress_redbox); in hsr_xmit()
460 * Do not send HSR supervisory frames to SAN devices in hsr_drop_frame()
465 /* Do not forward to other HSR port (A or B) unicast frames which in hsr_drop_frame()
471 hsr_is_node_in_db(&port->hsr->proxy_node_db, in hsr_drop_frame()
484 hsr_is_node_in_db(&port->hsr->node_db, in hsr_drop_frame()
498 hsr_is_node_in_db(&port->hsr->proxy_node_db, in hsr_drop_frame()
509 * - If it's a HSR frame: through a device where it has passed before
511 * - To the local HSR master only if the frame is directly addressed to it, or
514 * HSR slave devices should insert a HSR tag into the frame, or forward the
515 * frame unchanged if it's already tagged. Interlink devices should strip HSR
516 * tags if they're of the non-HSR type (but only after duplicate discard). The
517 * master device always strips HSR tags.
525 hsr_for_each_port(frame->port_rcv->hsr, port) { in hsr_forward_do()
526 struct hsr_priv *hsr = port->hsr; in hsr_forward_do() local
549 hsr->proto_ops->register_frame_out && in hsr_forward_do()
550 hsr->proto_ops->register_frame_out(port, frame)) in hsr_forward_do()
560 * between ports, or sending HSR supervision to RedBox. in hsr_forward_do()
562 if (hsr->proto_ops->drop_frame && in hsr_forward_do()
563 hsr->proto_ops->drop_frame(frame, port)) in hsr_forward_do()
568 skb = hsr->proto_ops->create_tagged_frame(frame, port); in hsr_forward_do()
570 skb = hsr->proto_ops->get_untagged_frame(frame, port); in hsr_forward_do()
589 static void check_local_dest(struct hsr_priv *hsr, struct sk_buff *skb, in check_local_dest() argument
592 if (hsr_addr_is_self(hsr, eth_hdr(skb)->h_dest)) { in check_local_dest()
612 struct hsr_priv *hsr = port->hsr; in handle_std_frame() local
624 lockdep_assert_held(&hsr->seqnr_lock); in handle_std_frame()
625 frame->sequence_nr = hsr->sequence_nr; in handle_std_frame()
626 hsr->sequence_nr++; in handle_std_frame()
634 struct hsr_priv *hsr = port->hsr; in hsr_fill_frame_info() local
637 if ((!hsr->prot_version && proto == htons(ETH_P_PRP)) || in hsr_fill_frame_info()
643 /* HSR tagged frame :- Data or Supervision */ in hsr_fill_frame_info()
679 struct hsr_priv *hsr = port->hsr; in fill_frame_info() local
691 frame->is_supervision = is_supervision_frame(port->hsr, skb); in fill_frame_info()
692 if (frame->is_supervision && hsr->redbox) in fill_frame_info()
694 is_proxy_supervision_frame(port->hsr, skb); in fill_frame_info()
696 n_db = &hsr->node_db; in fill_frame_info()
698 n_db = &hsr->proxy_node_db; in fill_frame_info()
724 ret = hsr->proto_ops->fill_frame_info(proto, skb, frame); in fill_frame_info()
728 check_local_dest(port->hsr, skb, frame); in fill_frame_info()