Skip to content

Commit

Permalink
[vxlanmgrd]: Add vxlanmgrd (sonic-net#807)
Browse files Browse the repository at this point in the history
* [vxlanmgrd]: Add vxlanmgrd

vxlanmgrd is responsible for vxlan configuration in Linux
It creates vxlan interface for every vxlan entry in Config DB

* [vxlanmgrd]: Change the logic about create/delete Vxlan

Combine vxlan_tunnel and vnet:vni to be a vxlan

* Skipping Vxlan test until daemon start is merged

* [vxlanmgrd]: Change Macro name of CMD_DETACH_BRIDGE_FROM_VXLAN to CMD_DETACH_BRIDGE_FROM_VNET

* [vxlanmgrd]: Change the naming rule of vxlan interfaces and vxlan bridges

* [vxlanmgrd]: Don't remove this event if linux commands fail

If linux commands fail, don't remove this event. print the error log and try it again.

* [vxlanmgrd]: Fix typo , delete useless spaces and modify name

* [vxlanmgrd]: More efficient create vxlan and use struct to replace map
- Change config db polling operation to cache
- Use VxlanInfo struct to replace stl map

* [vxlanmgrd]: Polish log and code

Signed-off-by: Ze Gan <[email protected]>
  • Loading branch information
Pterosaur authored and prsunny committed Apr 23, 2019
1 parent fd5ad50 commit d612d5e
Show file tree
Hide file tree
Showing 10 changed files with 722 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ cfgmgr/teammgrd
cfgmgr/vlanmgrd
cfgmgr/vrfmgrd
cfgmgr/nbrmgrd
cfgmgr/vxlanmgrd
neighsyncd/neighsyncd
portsyncd/portsyncd
orchagent/orchagent
Expand Down
9 changes: 7 additions & 2 deletions cfgmgr/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CFLAGS_SAI = -I /usr/include/sai
LIBNL_CFLAGS = -I/usr/include/libnl3
LIBNL_LIBS = -lnl-genl-3 -lnl-route-3 -lnl-3

bin_PROGRAMS = vlanmgrd teammgrd portmgrd intfmgrd buffermgrd vrfmgrd nbrmgrd
bin_PROGRAMS = vlanmgrd teammgrd portmgrd intfmgrd buffermgrd vrfmgrd nbrmgrd vxlanmgrd

if DEBUG
DBGFLAGS = -ggdb -DDEBUG
Expand Down Expand Up @@ -44,4 +44,9 @@ vrfmgrd_LDADD = -lswsscommon
nbrmgrd_SOURCES = nbrmgrd.cpp nbrmgr.cpp $(top_srcdir)/orchagent/orch.cpp $(top_srcdir)/orchagent/request_parser.cpp shellcmd.h
nbrmgrd_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_SAI) $(LIBNL_CFLAGS)
nbrmgrd_CPPFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_SAI) $(LIBNL_CPPFLAGS)
nbrmgrd_LDADD = -lswsscommon $(LIBNL_LIBS)
nbrmgrd_LDADD = -lswsscommon $(LIBNL_LIBS)

vxlanmgrd_SOURCES = vxlanmgrd.cpp vxlanmgr.cpp $(top_srcdir)/orchagent/orch.cpp $(top_srcdir)/orchagent/request_parser.cpp shellcmd.h
vxlanmgrd_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_SAI)
vxlanmgrd_CPPFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_SAI)
vxlanmgrd_LDADD = -lswsscommon
1 change: 1 addition & 0 deletions cfgmgr/shellcmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#define IP_CMD "/sbin/ip"
#define BRIDGE_CMD "/sbin/bridge"
#define BRCTL_CMD "/sbin/brctl"
#define ECHO_CMD "/bin/echo"
#define BASH_CMD "/bin/bash"
#define GREP_CMD "/bin/grep"
Expand Down
Loading

0 comments on commit d612d5e

Please sign in to comment.