Skip to content

Commit

Permalink
Make vxlan port configurable (networkservicemesh#341)
Browse files Browse the repository at this point in the history
networkservicemesh/sdk-vpp commit message:
Make vxlan port configurable (see networkservicemesh/sdk-vpp#394)

networkservicemesh/sdk commit message:
Make vxlan port configurable (see networkservicemesh/sdk#1091)

Signed-off-by: Zoltan Lugossy <zoltan.lugossy@est.tech>
  • Loading branch information
zolug committed Sep 29, 2021
1 parent f07927e commit ae6006d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ type Config struct {
LogLevel string `default:"INFO" desc:"Log level" split_words:"true"`

TunnelIP net.IP `desc:"IP to use for tunnels" split_words:"true"`
VxlanPort uint16 `default:"0" desc:"VXLAN port to use" split_words:"true"`
VppAPISocket string `default:"" desc:"filename of socket to connect to existing VPP instance. If empty a VPP instance is run in forwarder" split_words:"true"`
VppInit vppinit.Func `default:"AF_PACKET" desc:"type of VPP initialization. Must be AF_PACKET or NONE" split_words:"true"`

Expand Down
3 changes: 2 additions & 1 deletion internal/xconnectns/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,15 @@ func NewServer(
tokenGenerator token.GeneratorFunc,
vppConn vppxconnectns.Connection,
tunnelIP net.IP,
tunnelPort uint16,
pciPool resourcepool.PCIPool,
resourcePool resourcepool.ResourcePool,
sriovConfig *sriovconfig.Config,
vfioDir, cgroupBaseDir string,
clientURL *url.URL,
clientDialOptions ...grpc.DialOption,
) endpoint.Endpoint {
vppForwarder := vppxconnectns.NewServer(ctx, name, authzServer, tokenGenerator, clientURL, vppConn, tunnelIP, clientDialOptions...)
vppForwarder := vppxconnectns.NewServer(ctx, name, authzServer, tokenGenerator, clientURL, vppConn, tunnelIP, tunnelPort, clientDialOptions...)
if sriovConfig == nil {
return vppForwarder
}
Expand Down
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ func main() {
spiffejwt.TokenGeneratorFunc(source, cfg.MaxTokenLifetime),
vppConn,
vppinit.Must(cfg.VppInit.Execute(ctx, vppConn, cfg.TunnelIP)),
cfg.VxlanPort,
pciPool,
resourcePool,
sriovConfig,
Expand Down

0 comments on commit ae6006d

Please sign in to comment.