Skip to content

Commit dd4e409

Browse files
authored
[MACsecMgr]: Add MACsec Manager (sonic-net#1475)
Add MACsec Manager for MACsec feature. MACsecMgr is a daemon in MACsec container, that receives the message from CONFIG DB and uses wpa_cli instructions to manage the functionality of MACsec in the specified port. The below figure is the flow chart of MACsecMgr which shows the MACsec profile management according to MACsec Profile Table and the functionality of MACsec in the specified port according to PortTable. The main functions are defined in class MACsecMgr as follow ``` task_process_status removeProfile(const std::string & profile_name, const TaskArgs & profile_attr); task_process_status loadProfile(const std::string & profile_name, const TaskArgs & profile_attr); task_process_status enableMACsec(const std::string & port_name, const TaskArgs & port_attr); task_process_status disableMACsec(const std::string & port_name, const TaskArgs & port_attr); ``` The HLD of MACsec Manager is at [MACsec HLD](https://github.com/Azure/SONiC/blob/master/doc/macsec/MACsec_hld.md#341-macsec-mgr) Signed-off-by: Ze Gan <[email protected]>
1 parent 91e231c commit dd4e409

File tree

5 files changed

+916
-1
lines changed

5 files changed

+916
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ cfgmgr/vrfmgrd
5151
cfgmgr/vxlanmgrd
5252
cfgmgr/natmgrd
5353
cfgmgr/sflowmgrd
54+
cfgmgr/macsecmgrd
5455
fpmsyncd/fpmsyncd
5556
gearsyncd/gearsyncd
5657
mclagsyncd/mclagsyncd

cfgmgr/Makefile.am

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ CFLAGS_SAI = -I /usr/include/sai
33
LIBNL_CFLAGS = -I/usr/include/libnl3
44
LIBNL_LIBS = -lnl-genl-3 -lnl-route-3 -lnl-3
55

6-
bin_PROGRAMS = vlanmgrd teammgrd portmgrd intfmgrd buffermgrd vrfmgrd nbrmgrd vxlanmgrd sflowmgrd natmgrd coppmgrd tunnelmgrd
6+
bin_PROGRAMS = vlanmgrd teammgrd portmgrd intfmgrd buffermgrd vrfmgrd nbrmgrd vxlanmgrd sflowmgrd natmgrd coppmgrd tunnelmgrd macsecmgrd
77

88
cfgmgrdir = $(datadir)/swss
99

@@ -81,3 +81,7 @@ tunnelmgrd_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_SAI)
8181
tunnelmgrd_CPPFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_SAI)
8282
tunnelmgrd_LDADD = -lswsscommon
8383

84+
macsecmgrd_SOURCES = macsecmgrd.cpp macsecmgr.cpp $(top_srcdir)/orchagent/orch.cpp $(top_srcdir)/orchagent/request_parser.cpp shellcmd.h
85+
macsecmgrd_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_SAI)
86+
macsecmgrd_CPPFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_SAI)
87+
macsecmgrd_LDADD = -lswsscommon

0 commit comments

Comments
 (0)