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 Oct 7, 2021
1 parent 9932f2e commit 13b6189
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/networkservicemesh/sdk v0.5.1-0.20210929180427-ec235de055f1
github.com/networkservicemesh/sdk-k8s v0.0.0-20210923132245-8709b6f366a4
github.com/networkservicemesh/sdk-sriov v0.0.0-20210924085919-868bbc152fb4
github.com/networkservicemesh/sdk-vpp v0.0.0-20211006045505-512f0e32a3c6
github.com/networkservicemesh/sdk-vpp v0.0.0-20211006205248-a3f3e2c11dd8
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.7.0
github.com/spiffe/go-spiffe/v2 v2.0.0-beta.2
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ github.com/networkservicemesh/sdk-sriov v0.0.0-20210924085919-868bbc152fb4 h1:NA
github.com/networkservicemesh/sdk-sriov v0.0.0-20210924085919-868bbc152fb4/go.mod h1:agnfxvuC9k/LTBT7azseDToGC5GKvJbAwohBy8f40i4=
github.com/networkservicemesh/sdk-vpp v0.0.0-20211006045505-512f0e32a3c6 h1:pmp9VMQzwQTz80bRbCvMC6odhi2jlxfPYjUWDpsyMEY=
github.com/networkservicemesh/sdk-vpp v0.0.0-20211006045505-512f0e32a3c6/go.mod h1:ioaSVCukInghwn6Qq59UviA7e0dq31eNaWL54cwrorw=
github.com/networkservicemesh/sdk-vpp v0.0.0-20211006205248-a3f3e2c11dd8 h1:CgK7RmeYuCtNqOeVziLGeU7qJU/zBTgywN44YGevxBM=
github.com/networkservicemesh/sdk-vpp v0.0.0-20211006205248-a3f3e2c11dd8/go.mod h1:ioaSVCukInghwn6Qq59UviA7e0dq31eNaWL54cwrorw=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
Expand Down
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 @@ -180,6 +180,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 13b6189

Please sign in to comment.