Skip to content

Commit

Permalink
support port isolation group in BFN platform (sonic-net#1940)
Browse files Browse the repository at this point in the history
Signed-off-by: Anton <[email protected]>
  • Loading branch information
novikauanton authored and bratashX committed Jun 6, 2022
1 parent f4ecfb6 commit 8592311
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mclagsyncd/mclaglink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "mclagsyncd/mclaglink.h"
#include "mclagsyncd/mclag.h"
#include <set>
#include <unordered_set>
#include <algorithm>
#include "macaddress.h"
#include <string>
Expand Down Expand Up @@ -188,8 +189,13 @@ void MclagLink::mclagsyncdFetchMclagInterfaceConfigFromConfigdb()

void MclagLink::setPortIsolate(char *msg)
{
char *platform = getenv("platform");
if ((NULL != platform) && (strstr(platform, BRCM_PLATFORM_SUBSTRING)))
static const unordered_set<string> supported {
BRCM_PLATFORM_SUBSTRING,
BFN_PLATFORM_SUBSTRING
};

const char *platform = getenv("platform");
if (platform != nullptr && supported.find(string(platform)) != supported.end())
{
mclag_sub_option_hdr_t *op_hdr = NULL;
string isolate_src_port;
Expand Down
2 changes: 2 additions & 0 deletions mclagsyncd/mclaglink.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@
#endif /* INET_ADDRSTRLEN */

#define MAX_L_PORT_NAME 20

#define BRCM_PLATFORM_SUBSTRING "broadcom"
#define BFN_PLATFORM_SUBSTRING "barefoot"

using namespace std;

Expand Down

0 comments on commit 8592311

Please sign in to comment.