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

L2MCD:IGMP Snooping Implementation First Commit #1211

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
4 changes: 3 additions & 1 deletion orchagent/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ orchagent_SOURCES = \
sfloworch.cpp \
chassisorch.cpp \
debugcounterorch.cpp \
natorch.cpp
natorch.cpp \
l2mcorch.cpp \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Ben,
I didn't find both l2mcorch.cpp and l2mcorch.h in this PR, seems like you forgot to add them.
Could you please kindly take a look? Thanks in advance.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
Due to the requirement to upload as small patches, the changes are uploaded through my other user profile
benzeerbava

https://github.com/benzeerbava/

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your timely response, Ben.
I have checked your profiles, but still didn't find them ( l2mcorch.cpp and l2mcorch.h ).
Could you please kindly share the PR link with me?

l2mcdorch.h

orchagent_SOURCES += flex_counter/flex_counter_manager.cpp flex_counter/flex_counter_stat_manager.cpp
orchagent_SOURCES += debug_counter/debug_counter.cpp debug_counter/drop_counter.cpp
Expand Down
11 changes: 10 additions & 1 deletion orchagent/orchdaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ BufferOrch *gBufferOrch;
SwitchOrch *gSwitchOrch;
Directory<Orch*> gDirectory;
NatOrch *gNatOrch;

L2mcOrch *gL2mcOrch;
bool gIsNatSupported = false;

OrchDaemon::OrchDaemon(DBConnector *applDb, DBConnector *configDb, DBConnector *stateDb) :
Expand Down Expand Up @@ -89,6 +89,13 @@ bool OrchDaemon::init()
TableConnector applDbFdb(m_applDb, APP_FDB_TABLE_NAME);
TableConnector stateDbFdb(m_stateDb, STATE_FDB_TABLE_NAME);
gFdbOrch = new FdbOrch(applDbFdb, stateDbFdb, gPortsOrch);
vector<string> app_l2mc_tables = {
APP_L2MC_VLAN_TABLE_NAME,
APP_L2MC_MEMBER_TABLE_NAME,
APP_L2MC_MROUTER_TABLE_NAME
};

gL2mcOrch = new L2mcOrch(m_applDb, app_l2mc_tables);

vector<string> vnet_tables = {
APP_VNET_RT_TABLE_NAME,
Expand Down Expand Up @@ -282,6 +289,8 @@ bool OrchDaemon::init()
m_orchList.push_back(vnet_orch);
m_orchList.push_back(vnet_rt_orch);
m_orchList.push_back(gNatOrch);
m_orchList.push_back(gL2mcOrch);


m_select = new Select();

Expand Down
1 change: 1 addition & 0 deletions orchagent/orchdaemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "debugcounterorch.h"
#include "directory.h"
#include "natorch.h"
#include "l2mcorch.h"

using namespace swss;

Expand Down
8 changes: 8 additions & 0 deletions orchagent/saihelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ sai_bmtor_api_t* sai_bmtor_api;
sai_samplepacket_api_t* sai_samplepacket_api;
sai_debug_counter_api_t* sai_debug_counter_api;
sai_nat_api_t* sai_nat_api;
sai_l2mc_api_t* sai_l2mc_entry_api;
sai_l2mc_group_api_t* sai_l2mc_group_api;

extern sai_object_id_t gSwitchId;
extern bool gSairedisRecord;
Expand Down Expand Up @@ -136,6 +138,9 @@ void initSaiApi()
sai_api_query(SAI_API_SAMPLEPACKET, (void **)&sai_samplepacket_api);
sai_api_query(SAI_API_DEBUG_COUNTER, (void **)&sai_debug_counter_api);
sai_api_query(SAI_API_NAT, (void **)&sai_nat_api);
sai_api_query(SAI_API_L2MC, (void **)&sai_l2mc_entry_api);
sai_api_query(SAI_API_L2MC_GROUP, (void **)&sai_l2mc_group_api);


sai_log_set(SAI_API_SWITCH, SAI_LOG_LEVEL_NOTICE);
sai_log_set(SAI_API_BRIDGE, SAI_LOG_LEVEL_NOTICE);
Expand Down Expand Up @@ -165,6 +170,9 @@ void initSaiApi()
sai_log_set(SAI_API_SAMPLEPACKET, SAI_LOG_LEVEL_NOTICE);
sai_log_set(SAI_API_DEBUG_COUNTER, SAI_LOG_LEVEL_NOTICE);
sai_log_set((sai_api_t)SAI_API_NAT, SAI_LOG_LEVEL_NOTICE);
sai_log_set(SAI_API_L2MC, SAI_LOG_LEVEL_NOTICE);
sai_log_set(SAI_API_L2MC_GROUP, SAI_LOG_LEVEL_NOTICE);

}

void initSaiRedis(const string &record_location)
Expand Down