Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mclag enhacements #1349

Merged
merged 23 commits into from
Jun 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3c48d5b
mclagsyncd enhancements as per HLD at Azure/SONIC#596
gitsabari Jul 9, 2020
b902337
mclagsyncd enhancements as per HLD at Azure/SONIC#596
gitsabari Jul 9, 2020
1999388
mclagsyncd enhancements as per HLD at Azure/SONIC#596
gitsabari Jul 9, 2020
1fa765b
mclagsyncd enhancements as per HLD at Azure/SONIC#596
gitsabari Jul 9, 2020
3779438
updated mclag port isolate platform check function
gitsabari Nov 17, 2020
29464f6
Merge branch 'master' into mclag_enhacements
gitsabari Nov 17, 2020
c201ef9
MCLAG Unique IP Changes.
tapashdas Nov 17, 2020
a6e95c3
updated mclagsyncd
gitsabari Nov 18, 2020
4d3c253
resolved compilation issues with master branch
gitsabari Nov 18, 2020
3d6eb75
updated mclagsyncd merge issue
gitsabari Nov 20, 2020
4f9fd68
Merge branch 'master' into mclag_enhacements
gitsabari Dec 30, 2020
1184638
Merge branch 'master' into mclag_enhacements
gitsabari Jan 4, 2021
e8b6825
Merge branch 'master' into mclag_enhacements
gitsabari Mar 2, 2021
aef7322
addressed review comments
gitsabari Mar 2, 2021
1486024
addressed review comments
gitsabari Apr 5, 2021
f277305
fixed build issues with armhf platform
gitsabari Apr 6, 2021
717c3b5
fixed build issues with armhf platform
gitsabari Apr 6, 2021
55f1147
Merge branch 'mclag_enhacements' of https://github.com/gitsabari/soni…
gitsabari Apr 6, 2021
18e343c
fixed build issue
gitsabari Apr 6, 2021
5b1ce8e
fixed build issue
gitsabari Apr 6, 2021
cdd57a7
addressed review comments
gitsabari May 2, 2021
8d6eb61
addressed review comments
gitsabari May 2, 2021
2fb1d66
removed unused code
gitsabari May 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 45 additions & 6 deletions mclagsyncd/mclag.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,31 @@
#define MCLAG_DEFAULT_IP 0x7f000006

enum MCLAG_FDB_OP_TYPE {
MCLAG_FDB_OPER_ADD =1,
MCLAG_FDB_OPER_ADD = 1,
MCLAG_FDB_OPER_DEL = 2,
};

enum MCLAG_FDB_TYPE {
MCLAG_FDB_TYPE_STATIC = 1,
MCLAG_FDB_TYPE_STATIC = 1,
MCLAG_FDB_TYPE_DYNAMIC = 2,
MCLAG_FDB_TYPE_DYNAMIC_LOCAL = 3, /* Used while sending MAC to Syncd to program with aging enabled. */
};

enum MCLAG_DOMAIN_CFG_OP_TYPE {
MCLAG_CFG_OPER_NONE = 0, //NOP
MCLAG_CFG_OPER_ADD = 1, //Add domain
MCLAG_CFG_OPER_DEL = 2, //Delete domain
MCLAG_CFG_OPER_UPDATE = 3, //update domain
MCLAG_CFG_OPER_ATTR_DEL = 4 //Attribute del
};

enum MCLAG_DOMAIN_CFG_ATTR_BMAP_FLAGS {
MCLAG_CFG_ATTR_NONE = 0x0,
MCLAG_CFG_ATTR_SRC_ADDR = 0x1,
MCLAG_CFG_ATTR_PEER_ADDR = 0x2,
MCLAG_CFG_ATTR_PEER_LINK = 0x4,
MCLAG_CFG_ATTR_KEEPALIVE_INTERVAL = 0x8,
MCLAG_CFG_ATTR_SESSION_TIMEOUT = 0x10
};

/*
Expand Down Expand Up @@ -66,7 +84,11 @@ typedef struct mclag_msg_hdr_t_ {
/*syncd send msg type to iccpd*/
typedef enum mclag_syncd_msg_type_e_ {
MCLAG_SYNCD_MSG_TYPE_NONE = 0,
MCLAG_SYNCD_MSG_TYPE_FDB_OPERATION = 1
MCLAG_SYNCD_MSG_TYPE_FDB_OPERATION = 1,
MCLAG_SYNCD_MSG_TYPE_CFG_MCLAG_DOMAIN = 2,
MCLAG_SYNCD_MSG_TYPE_CFG_MCLAG_IFACE = 3,
MCLAG_SYNCD_MSG_TYPE_VLAN_MBR_UPDATES = 4,
MCLAG_SYNCD_MSG_TYPE_CFG_MCLAG_UNIQUE_IP = 5
}mclag_syncd_msg_type_e;

/*iccpd send msg type to syncd*/
Expand All @@ -77,8 +99,16 @@ typedef enum mclag_msg_type_e_ {
MCLAG_MSG_TYPE_FLUSH_FDB = 3,
MCLAG_MSG_TYPE_SET_INTF_MAC = 4,
MCLAG_MSG_TYPE_SET_FDB = 5,
MCLAG_MSG_TYPE_FLUSH_FDB_BY_PORT = 6,
MCLAG_MSG_TYPE_GET_FDB_CHANGES = 20
gitsabari marked this conversation as resolved.
Show resolved Hide resolved
MCLAG_MSG_TYPE_SET_TRAFFIC_DIST_ENABLE = 6,
MCLAG_MSG_TYPE_SET_TRAFFIC_DIST_DISABLE = 7,
MCLAG_MSG_TYPE_SET_ICCP_STATE = 8,
MCLAG_MSG_TYPE_SET_ICCP_ROLE = 9,
MCLAG_MSG_TYPE_SET_ICCP_SYSTEM_ID = 10,
MCLAG_MSG_TYPE_DEL_ICCP_INFO = 11,
MCLAG_MSG_TYPE_SET_REMOTE_IF_STATE = 12,
MCLAG_MSG_TYPE_DEL_REMOTE_IF_INFO = 13,
MCLAG_MSG_TYPE_SET_PEER_LINK_ISOLATION = 14,
MCLAG_MSG_TYPE_SET_ICCP_PEER_SYSTEM_ID = 15
}mclag_msg_type_e;

typedef struct mclag_sub_option_hdr_t_ {
Expand All @@ -88,6 +118,7 @@ typedef struct mclag_sub_option_hdr_t_ {
* Length of option value, not including the header.
*/
uint16_t op_len;
uint8_t data[];
}mclag_sub_option_hdr_t;

#define MCLAG_SUB_OPTION_HDR_LEN (sizeof (mclag_sub_option_hdr_t))
Expand All @@ -99,7 +130,14 @@ typedef enum mclag_sub_option_type_e_ {
MCLAG_SUB_OPTION_TYPE_MAC_LEARN_ENABLE = 3,
MCLAG_SUB_OPTION_TYPE_MAC_LEARN_DISABLE = 4,
MCLAG_SUB_OPTION_TYPE_SET_MAC_SRC = 5,
MCLAG_SUB_OPTION_TYPE_SET_MAC_DST = 6
MCLAG_SUB_OPTION_TYPE_SET_MAC_DST = 6,
MCLAG_SUB_OPTION_TYPE_MCLAG_INTF_NAME = 7,
MCLAG_SUB_OPTION_TYPE_MCLAG_ID = 8,
MCLAG_SUB_OPTION_TYPE_ICCP_ROLE = 9,
MCLAG_SUB_OPTION_TYPE_SYSTEM_ID = 10,
MCLAG_SUB_OPTION_TYPE_OPER_STATUS = 11,
MCLAG_SUB_OPTION_TYPE_ISOLATION_STATE = 12,
MCLAG_SUB_OPTION_TYPE_PEER_SYSTEM_ID = 13
} mclag_sub_option_type_e;

static inline size_t
Expand Down Expand Up @@ -162,3 +200,4 @@ mclag_msg_ok (const mclag_msg_hdr_t *hdr, size_t len)


#endif

Loading