mirror of https://gitee.com/openkylin/linux.git
net: mrp: move struct definitions out of uapi
None of these are actually used in the kernel/userspace interface - there's a userspace component of implementing MRP, and userspace will need to construct certain frames to put on the wire, but there's no reason the kernel should provide the relevant definitions in a UAPI header. In fact, some of those definitions were broken until previous commit, so only keep the few that are actually referenced in the kernel code, and move them to the br_private_mrp.h header. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
dc090de854
commit
6781939054
|
@ -71,90 +71,4 @@ enum br_mrp_sub_tlv_header_type {
|
|||
BR_MRP_SUB_TLV_HEADER_TEST_AUTO_MGR = 0x3,
|
||||
};
|
||||
|
||||
struct br_mrp_tlv_hdr {
|
||||
__u8 type;
|
||||
__u8 length;
|
||||
};
|
||||
|
||||
struct br_mrp_sub_tlv_hdr {
|
||||
__u8 type;
|
||||
__u8 length;
|
||||
};
|
||||
|
||||
struct br_mrp_end_hdr {
|
||||
struct br_mrp_tlv_hdr hdr;
|
||||
};
|
||||
|
||||
struct br_mrp_common_hdr {
|
||||
__be16 seq_id;
|
||||
__u8 domain[MRP_DOMAIN_UUID_LENGTH];
|
||||
};
|
||||
|
||||
struct br_mrp_ring_test_hdr {
|
||||
__be16 prio;
|
||||
__u8 sa[ETH_ALEN];
|
||||
__be16 port_role;
|
||||
__be16 state;
|
||||
__be16 transitions;
|
||||
__be32 timestamp;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
struct br_mrp_ring_topo_hdr {
|
||||
__be16 prio;
|
||||
__u8 sa[ETH_ALEN];
|
||||
__be16 interval;
|
||||
};
|
||||
|
||||
struct br_mrp_ring_link_hdr {
|
||||
__u8 sa[ETH_ALEN];
|
||||
__be16 port_role;
|
||||
__be16 interval;
|
||||
__be16 blocked;
|
||||
};
|
||||
|
||||
struct br_mrp_sub_opt_hdr {
|
||||
__u8 type;
|
||||
__u8 manufacture_data[MRP_MANUFACTURE_DATA_LENGTH];
|
||||
};
|
||||
|
||||
struct br_mrp_test_mgr_nack_hdr {
|
||||
__be16 prio;
|
||||
__u8 sa[ETH_ALEN];
|
||||
__be16 other_prio;
|
||||
__u8 other_sa[ETH_ALEN];
|
||||
};
|
||||
|
||||
struct br_mrp_test_prop_hdr {
|
||||
__be16 prio;
|
||||
__u8 sa[ETH_ALEN];
|
||||
__be16 other_prio;
|
||||
__u8 other_sa[ETH_ALEN];
|
||||
};
|
||||
|
||||
struct br_mrp_oui_hdr {
|
||||
__u8 oui[MRP_OUI_LENGTH];
|
||||
};
|
||||
|
||||
struct br_mrp_in_test_hdr {
|
||||
__be16 id;
|
||||
__u8 sa[ETH_ALEN];
|
||||
__be16 port_role;
|
||||
__be16 state;
|
||||
__be16 transitions;
|
||||
__be32 timestamp;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
struct br_mrp_in_topo_hdr {
|
||||
__u8 sa[ETH_ALEN];
|
||||
__be16 id;
|
||||
__be16 interval;
|
||||
};
|
||||
|
||||
struct br_mrp_in_link_hdr {
|
||||
__u8 sa[ETH_ALEN];
|
||||
__be16 port_role;
|
||||
__be16 id;
|
||||
__be16 interval;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -88,4 +88,33 @@ int br_mrp_switchdev_send_in_test(struct net_bridge *br, struct br_mrp *mrp,
|
|||
int br_mrp_ring_port_open(struct net_device *dev, u8 loc);
|
||||
int br_mrp_in_port_open(struct net_device *dev, u8 loc);
|
||||
|
||||
/* MRP protocol data units */
|
||||
struct br_mrp_tlv_hdr {
|
||||
__u8 type;
|
||||
__u8 length;
|
||||
};
|
||||
|
||||
struct br_mrp_common_hdr {
|
||||
__be16 seq_id;
|
||||
__u8 domain[MRP_DOMAIN_UUID_LENGTH];
|
||||
};
|
||||
|
||||
struct br_mrp_ring_test_hdr {
|
||||
__be16 prio;
|
||||
__u8 sa[ETH_ALEN];
|
||||
__be16 port_role;
|
||||
__be16 state;
|
||||
__be16 transitions;
|
||||
__be32 timestamp;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
struct br_mrp_in_test_hdr {
|
||||
__be16 id;
|
||||
__u8 sa[ETH_ALEN];
|
||||
__be16 port_role;
|
||||
__be16 state;
|
||||
__be16 transitions;
|
||||
__be32 timestamp;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
#endif /* _BR_PRIVATE_MRP_H */
|
||||
|
|
Loading…
Reference in New Issue