From 16b654bf5d71d35c26da69eed02a676f3b256b96 Mon Sep 17 00:00:00 2001 From: NSMBot Date: Fri, 18 Mar 2022 08:06:51 +0000 Subject: [PATCH 1/3] Update go.mod and go.sum to latest version from networkservicemesh/sdk-vpp@main PR link: https://github.com/networkservicemesh/sdk-vpp/pull/530 Commit: 9984c7c Author: Artem Glazychev Date: 2022-03-18 15:04:18 +0700 Message: - Add options to the forwarder to use it with an external vpp (#530) * Add options to the forwarder to use it with an external vpp Signed-off-by: Artem Glazychev * Add default values Signed-off-by: NSMBot --- go.mod | 4 ++-- go.sum | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index f117e407..c74d90ab 100644 --- a/go.mod +++ b/go.mod @@ -13,10 +13,10 @@ require ( github.com/golang/protobuf v1.5.2 github.com/kelseyhightower/envconfig v1.4.0 github.com/networkservicemesh/api v1.2.1-0.20220315001249-f33f8c3f2feb - github.com/networkservicemesh/sdk v0.5.1-0.20220316101237-288caa7bbc1c + github.com/networkservicemesh/sdk v0.5.1-0.20220316105041-b88289b9022e github.com/networkservicemesh/sdk-k8s v0.0.0-20220316102251-ecbf32113a5c github.com/networkservicemesh/sdk-sriov v0.0.0-20220314174029-8ee6d6181d09 - github.com/networkservicemesh/sdk-vpp v0.0.0-20220318000218-652ab0bc2621 + github.com/networkservicemesh/sdk-vpp v0.0.0-20220318080418-9984c7c6df6e github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.8.1 github.com/spiffe/go-spiffe/v2 v2.0.0-beta.2 diff --git a/go.sum b/go.sum index 4fb9ab48..e30a0697 100644 --- a/go.sum +++ b/go.sum @@ -382,8 +382,9 @@ github.com/networkservicemesh/api v1.2.1-0.20220314135017-fe3ca7556bdc/go.mod h1 github.com/networkservicemesh/api v1.2.1-0.20220315001249-f33f8c3f2feb h1:5047nbh591kIjLNlFrO0NbpRVkOtCGRSvkKKjQyEDyI= github.com/networkservicemesh/api v1.2.1-0.20220315001249-f33f8c3f2feb/go.mod h1:B6meq/SWjWR6bGXZdXPfbOeaBK+T1JayLdtEJQCsXKU= github.com/networkservicemesh/sdk v0.5.1-0.20220314173321-130992f19d87/go.mod h1:f/f0fiMhDclV4yNwsU0r4mc94Onq+EhLKZc5SOhpQgA= -github.com/networkservicemesh/sdk v0.5.1-0.20220316101237-288caa7bbc1c h1:R0DVEMRYMg5SAuPQ48R3lTUD5Dpu+epJfrsmbDMY8mw= github.com/networkservicemesh/sdk v0.5.1-0.20220316101237-288caa7bbc1c/go.mod h1:fK/G5mfEDIefFXxRSNXqj1jjd8SEUeZMpQUdCuc7owY= +github.com/networkservicemesh/sdk v0.5.1-0.20220316105041-b88289b9022e h1:IXzvAfoU6tCTEZxAGfJGbKjVfome2Iymm1vkiM9MhZ8= +github.com/networkservicemesh/sdk v0.5.1-0.20220316105041-b88289b9022e/go.mod h1:fK/G5mfEDIefFXxRSNXqj1jjd8SEUeZMpQUdCuc7owY= github.com/networkservicemesh/sdk-k8s v0.0.0-20220316102251-ecbf32113a5c h1:O6PbevWW5ukL/OVSMj3NQXJKPppQTBYs8Jy1esP68iA= github.com/networkservicemesh/sdk-k8s v0.0.0-20220316102251-ecbf32113a5c/go.mod h1:8B4HAjyuXRA1Uus9Mmmcr3Hzk22e7jqChv7s4vZ+5zU= github.com/networkservicemesh/sdk-kernel v0.0.0-20220314173549-613436de9ab3/go.mod h1:bQ7VrJlqjSAxF4o8vaeTO82EuUEP+Blfa13XBD9ijq4= @@ -391,8 +392,8 @@ github.com/networkservicemesh/sdk-kernel v0.0.0-20220316101641-0103343013f0 h1:P github.com/networkservicemesh/sdk-kernel v0.0.0-20220316101641-0103343013f0/go.mod h1:nbwaNH+kCji5C8R0RxdZHqAPTNXvX7St/NUJ+bwmbIs= github.com/networkservicemesh/sdk-sriov v0.0.0-20220314174029-8ee6d6181d09 h1:uBGp8clCteS/cKsVl2rq5yc5YwLQgan7kLyXEh4mftQ= github.com/networkservicemesh/sdk-sriov v0.0.0-20220314174029-8ee6d6181d09/go.mod h1:Oa2ZyplOs5wDAHd5X0g7Sn+dlfY04PUlj/57Gfmr1MU= -github.com/networkservicemesh/sdk-vpp v0.0.0-20220318000218-652ab0bc2621 h1:bcQ6rAP38aDzXSLSra0MV/GwsfZgP/7tXrFP4NxEfpY= -github.com/networkservicemesh/sdk-vpp v0.0.0-20220318000218-652ab0bc2621/go.mod h1:NrIe17i36dcoif2L5Ja4s+MDMAQeVF6nELdxOYfpkj8= +github.com/networkservicemesh/sdk-vpp v0.0.0-20220318080418-9984c7c6df6e h1:/HoqC+vuK2IfPI907K/ayKRWH6wlD+gCKfsya11u2aM= +github.com/networkservicemesh/sdk-vpp v0.0.0-20220318080418-9984c7c6df6e/go.mod h1:Un+rRfUnFbRPqIKhM9M73KDhTYnjxRCTdzj05zIkDuo= 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= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= From 970130610175c8fd33fca227c6e36c5ed113f08e Mon Sep 17 00:00:00 2001 From: Network Service Mesh Bot <60070799+nsmbot@users.noreply.github.com> Date: Wed, 16 Mar 2022 05:42:45 -0500 Subject: [PATCH 2/3] Update forwarder to use it with an external vpp Signed-off-by: Artem Glazychev --- go.mod | 1 + internal/config/config.go | 4 +- internal/imports/imports_linux.go | 4 ++ internal/xconnectns/options.go | 113 ++++++++++++++++++++++++++++++ internal/xconnectns/server.go | 50 ++++++++++--- main.go | 68 +++++++++++++----- 6 files changed, 211 insertions(+), 29 deletions(-) create mode 100644 internal/xconnectns/options.go diff --git a/go.mod b/go.mod index c74d90ab..7261004d 100644 --- a/go.mod +++ b/go.mod @@ -11,6 +11,7 @@ require ( github.com/edwarnicke/grpcfd v1.1.2 github.com/edwarnicke/vpphelper v0.0.0-20210512223648-f914b171f679 github.com/golang/protobuf v1.5.2 + github.com/google/uuid v1.2.0 github.com/kelseyhightower/envconfig v1.4.0 github.com/networkservicemesh/api v1.2.1-0.20220315001249-f33f8c3f2feb github.com/networkservicemesh/sdk v0.5.1-0.20220316105041-b88289b9022e diff --git a/internal/config/config.go b/internal/config/config.go index 2e31eea7..33954a05 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -46,8 +46,8 @@ type Config struct { 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"` + VppAPISocket string `default:"/var/run/vpp-ext/vpp-api.sock" 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:"NONE" desc:"type of VPP initialization. Must be NONE or AF_PACKET" split_words:"true"` ResourcePollTimeout time.Duration `default:"30s" desc:"device plugin polling timeout" split_words:"true"` DevicePluginPath string `default:"/var/lib/kubelet/device-plugins/" desc:"path to the device plugin directory" split_words:"true"` diff --git a/internal/imports/imports_linux.go b/internal/imports/imports_linux.go index ebfabd70..fddd95fe 100644 --- a/internal/imports/imports_linux.go +++ b/internal/imports/imports_linux.go @@ -21,6 +21,7 @@ import ( _ "github.com/edwarnicke/grpcfd" _ "github.com/edwarnicke/vpphelper" _ "github.com/golang/protobuf/ptypes/empty" + _ "github.com/google/uuid" _ "github.com/kelseyhightower/envconfig" _ "github.com/networkservicemesh/api/pkg/api/networkservice" _ "github.com/networkservicemesh/api/pkg/api/networkservice/mechanisms/cls" @@ -48,12 +49,14 @@ import ( _ "github.com/networkservicemesh/sdk-vpp/pkg/networkservice/mechanisms/vxlan" _ "github.com/networkservicemesh/sdk-vpp/pkg/networkservice/mechanisms/wireguard" _ "github.com/networkservicemesh/sdk-vpp/pkg/networkservice/pinhole" + _ "github.com/networkservicemesh/sdk-vpp/pkg/networkservice/stats" _ "github.com/networkservicemesh/sdk-vpp/pkg/networkservice/tag" _ "github.com/networkservicemesh/sdk-vpp/pkg/networkservice/up" _ "github.com/networkservicemesh/sdk-vpp/pkg/tools/types" _ "github.com/networkservicemesh/sdk/pkg/networkservice/chains/client" _ "github.com/networkservicemesh/sdk/pkg/networkservice/chains/endpoint" _ "github.com/networkservicemesh/sdk/pkg/networkservice/common/authorize" + _ "github.com/networkservicemesh/sdk/pkg/networkservice/common/cleanup" _ "github.com/networkservicemesh/sdk/pkg/networkservice/common/mechanisms" _ "github.com/networkservicemesh/sdk/pkg/networkservice/common/mechanisms/kernel" _ "github.com/networkservicemesh/sdk/pkg/networkservice/common/mechanisms/recvfd" @@ -99,6 +102,7 @@ import ( _ "net/url" _ "os" _ "os/signal" + _ "path" _ "path/filepath" _ "runtime" _ "strings" diff --git a/internal/xconnectns/options.go b/internal/xconnectns/options.go new file mode 100644 index 00000000..3405c8c3 --- /dev/null +++ b/internal/xconnectns/options.go @@ -0,0 +1,113 @@ +// Copyright (c) 2022 Cisco and/or its affiliates. +// +// SPDX-License-Identifier: Apache-2.0 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at: +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +build linux + +package xconnectns + +import ( + "net/url" + "time" + + "google.golang.org/grpc" + + "github.com/networkservicemesh/api/pkg/api/networkservice" + "github.com/networkservicemesh/sdk/pkg/networkservice/common/cleanup" + + "github.com/networkservicemesh/sdk-vpp/pkg/networkservice/mechanisms/vxlan" + "github.com/networkservicemesh/sdk-vpp/pkg/networkservice/stats" +) + +type xconnOptions struct { + name string + authorizeServer networkservice.NetworkServiceServer + clientURL *url.URL + dialTimeout time.Duration + domain2Device map[string]string + statsOpts []stats.Option + cleanupOpts []cleanup.Option + vxlanOpts []vxlan.Option + dialOpts []grpc.DialOption +} + +// Option is an option pattern for forwarder +type Option func(o *xconnOptions) + +// WithName - set a forwarder name +func WithName(name string) Option { + return func(o *xconnOptions) { + o.name = name + } +} + +// WithAuthorizeServer sets authorization server chain element +func WithAuthorizeServer(authorizeServer networkservice.NetworkServiceServer) Option { + if authorizeServer == nil { + panic("Authorize server cannot be nil") + } + return func(o *xconnOptions) { + o.authorizeServer = authorizeServer + } +} + +// WithClientURL sets clientURL. +func WithClientURL(clientURL *url.URL) Option { + return func(c *xconnOptions) { + c.clientURL = clientURL + } +} + +// WithDialTimeout sets dial timeout for the client +func WithDialTimeout(dialTimeout time.Duration) Option { + return func(o *xconnOptions) { + o.dialTimeout = dialTimeout + } +} + +// WithVlanDomain2Device sets vlan option +func WithVlanDomain2Device(domain2Device map[string]string) Option { + return func(o *xconnOptions) { + o.domain2Device = domain2Device + } +} + +// WithStatsOptions sets stats options +func WithStatsOptions(opts ...stats.Option) Option { + return func(o *xconnOptions) { + o.statsOpts = opts + } +} + +// WithCleanupOptions sets cleanup options +func WithCleanupOptions(opts ...cleanup.Option) Option { + return func(o *xconnOptions) { + o.cleanupOpts = opts + } +} + +// WithVxlanOptions sets vxlan options +func WithVxlanOptions(opts ...vxlan.Option) Option { + return func(o *xconnOptions) { + o.vxlanOpts = opts + } +} + +// WithDialOptions sets dial options +func WithDialOptions(opts ...grpc.DialOption) Option { + return func(o *xconnOptions) { + o.dialOpts = opts + } +} diff --git a/internal/xconnectns/server.go b/internal/xconnectns/server.go index 91f277d2..70634552 100644 --- a/internal/xconnectns/server.go +++ b/internal/xconnectns/server.go @@ -1,4 +1,6 @@ -// Copyright (c) 2021 Doc.ai and/or its affiliates. +// Copyright (c) 2021-2022 Doc.ai and/or its affiliates. +// +// Copyright (c) 2022 Cisco and/or its affiliates. // // SPDX-License-Identifier: Apache-2.0 // @@ -25,7 +27,7 @@ import ( "net/url" "time" - "google.golang.org/grpc" + "github.com/google/uuid" "github.com/networkservicemesh/api/pkg/api/networkservice" "github.com/networkservicemesh/api/pkg/api/networkservice/mechanisms/kernel" @@ -40,6 +42,7 @@ import ( sriovtokens "github.com/networkservicemesh/sdk-sriov/pkg/tools/tokens" vppforwarder "github.com/networkservicemesh/sdk-vpp/pkg/networkservice/chains/forwarder" "github.com/networkservicemesh/sdk/pkg/networkservice/chains/endpoint" + "github.com/networkservicemesh/sdk/pkg/networkservice/common/authorize" "github.com/networkservicemesh/sdk/pkg/networkservice/common/mechanisms" "github.com/networkservicemesh/sdk/pkg/networkservice/common/switchcase" "github.com/networkservicemesh/sdk/pkg/tools/token" @@ -48,22 +51,36 @@ import ( // NewServer - returns an implementation of the xconnectns network service func NewServer( ctx context.Context, - name string, - authzServer networkservice.NetworkServiceServer, tokenGenerator token.GeneratorFunc, vppConn vppforwarder.Connection, tunnelIP net.IP, - tunnelPort uint16, pciPool resourcepool.PCIPool, resourcePool resourcepool.ResourcePool, sriovConfig *sriovconfig.Config, - deviceMap map[string]string, vfioDir, cgroupBaseDir string, - clientURL *url.URL, - dialTimeout time.Duration, - clientDialOptions ...grpc.DialOption, + options ...Option, ) endpoint.Endpoint { - vppForwarder := vppforwarder.NewServer(ctx, name, authzServer, tokenGenerator, clientURL, vppConn, tunnelIP, tunnelPort, dialTimeout, deviceMap, clientDialOptions...) + xconnOpts := &xconnOptions{ + name: "forwarder-" + uuid.New().String(), + authorizeServer: authorize.NewServer(authorize.Any()), + clientURL: &url.URL{Scheme: "unix", Host: "connect.to.socket"}, + dialTimeout: time.Millisecond * 200, + domain2Device: make(map[string]string), + } + for _, opt := range options { + opt(xconnOpts) + } + + vppForwarder := vppforwarder.NewServer(ctx, tokenGenerator, vppConn, tunnelIP, + vppforwarder.WithName(xconnOpts.name), + vppforwarder.WithAuthorizeServer(xconnOpts.authorizeServer), + vppforwarder.WithClientURL(xconnOpts.clientURL), + vppforwarder.WithDialTimeout(xconnOpts.dialTimeout), + vppforwarder.WithVlanDomain2Device(xconnOpts.domain2Device), + vppforwarder.WithCleanupOptions(xconnOpts.cleanupOpts...), + vppforwarder.WithStatsOptions(xconnOpts.statsOpts...), + vppforwarder.WithVxlanOptions(xconnOpts.vxlanOpts...), + vppforwarder.WithDialOptions(xconnOpts.dialOpts...)) if sriovConfig == nil { return vppForwarder } @@ -92,6 +109,17 @@ func NewServer( }) }, vppForwarder, - sriovforwarder.NewServer(ctx, name, authzServer, tokenGenerator, pciPool, resourcePool, sriovConfig, vfioDir, cgroupBaseDir, clientURL, dialTimeout, clientDialOptions...), + sriovforwarder.NewServer(ctx, + xconnOpts.name, + xconnOpts.authorizeServer, + tokenGenerator, + pciPool, + resourcePool, + sriovConfig, + vfioDir, + cgroupBaseDir, + xconnOpts.clientURL, + xconnOpts.dialTimeout, + xconnOpts.dialOpts...), ) } diff --git a/main.go b/main.go index d29df8f8..25a67ef4 100644 --- a/main.go +++ b/main.go @@ -23,6 +23,7 @@ import ( "context" "os" "os/signal" + "path" "syscall" "time" @@ -45,6 +46,7 @@ import ( "github.com/networkservicemesh/sdk-sriov/pkg/sriov/resource" sriovtoken "github.com/networkservicemesh/sdk-sriov/pkg/sriov/token" "github.com/networkservicemesh/sdk/pkg/networkservice/common/authorize" + "github.com/networkservicemesh/sdk/pkg/networkservice/common/cleanup" registryclient "github.com/networkservicemesh/sdk/pkg/registry/chains/client" "github.com/networkservicemesh/sdk/pkg/registry/common/sendfd" "github.com/networkservicemesh/sdk/pkg/tools/grpcutils" @@ -55,6 +57,9 @@ import ( "github.com/networkservicemesh/sdk/pkg/tools/token" "github.com/networkservicemesh/sdk/pkg/tools/tracing" + "github.com/networkservicemesh/sdk-vpp/pkg/networkservice/mechanisms/vxlan" + "github.com/networkservicemesh/sdk-vpp/pkg/networkservice/stats" + "github.com/networkservicemesh/cmd-forwarder-vpp/internal/config" "github.com/networkservicemesh/cmd-forwarder-vpp/internal/devicecfg" "github.com/networkservicemesh/cmd-forwarder-vpp/internal/vppinit" @@ -146,14 +151,30 @@ func main() { var vppConn vpphelper.Connection var vppErrCh <-chan error - if cfg.VppAPISocket != "" { // If we have a VppAPISocket, use that + var statsOpts []stats.Option + cleanupDoneCh := make(chan struct{}) + cleanupOpts := []cleanup.Option{ + cleanup.WithoutGRPCCall(), + } + + if fileExists(cfg.VppAPISocket) { // If we have an external VppAPISocket, use that vppConn = vpphelper.DialContext(ctx, cfg.VppAPISocket) errCh := make(chan error) close(errCh) vppErrCh = errCh + dir, _ := path.Split(cfg.VppAPISocket) + statsOpts = append(statsOpts, stats.WithSocket(path.Join(dir, "stats.sock"))) + cleanupOpts = append(cleanupOpts, cleanup.WithDoneChan(cleanupDoneCh)) + + log.FromContext(ctx).Info("external vpp is being used") } else { // If we don't have a VPPAPISocket, start VPP and use that + if err = cfg.VppInit.Decode("AF_PACKET"); err != nil { + log.FromContext(ctx).Fatalf("VppInit.Decode error: %v", err) + } vppConn, vppErrCh = vpphelper.StartAndDialContext(ctx) exitOnErrCh(ctx, cancel, vppErrCh) + close(cleanupDoneCh) + log.FromContext(ctx).Info("local vpp is being used") } log.FromContext(ctx).WithField("duration", time.Since(now)).Info("completed phase 2: run vpp and get a connection to it") @@ -192,29 +213,35 @@ func main() { // ******************************************************************************** now = time.Now() + dialOptions := []grpc.DialOption{ + grpc.WithBlock(), + grpc.WithTransportCredentials( + grpcfd.TransportCredentials(credentials.NewTLS(tlsconfig.MTLSClientConfig(source, source, tlsconfig.AuthorizeAny())))), + grpc.WithDefaultCallOptions( + grpc.PerRPCCredentials(token.NewPerRPCCredentials(spiffejwt.TokenGeneratorFunc(source, cfg.MaxTokenLifetime))), + ), + grpcfd.WithChainStreamInterceptor(), + grpcfd.WithChainUnaryInterceptor(), + } + endpoint := xconnectns.NewServer( ctx, - cfg.Name, - authorize.NewServer(), spiffejwt.TokenGeneratorFunc(source, cfg.MaxTokenLifetime), vppConn, vppinit.Must(cfg.VppInit.Execute(ctx, vppConn, cfg.TunnelIP)), - cfg.VxlanPort, pciPool, resourcePool, sriovConfig, - deviceMap, cfg.VFIOPath, cfg.CgroupPath, - &cfg.ConnectTo, - cfg.DialTimeout, - grpc.WithBlock(), - grpc.WithTransportCredentials( - grpcfd.TransportCredentials(credentials.NewTLS(tlsconfig.MTLSClientConfig(source, source, tlsconfig.AuthorizeAny())))), - grpc.WithDefaultCallOptions( - grpc.PerRPCCredentials(token.NewPerRPCCredentials(spiffejwt.TokenGeneratorFunc(source, cfg.MaxTokenLifetime))), - ), - grpcfd.WithChainStreamInterceptor(), - grpcfd.WithChainUnaryInterceptor(), + xconnectns.WithName(cfg.Name), + xconnectns.WithAuthorizeServer(authorize.NewServer()), + xconnectns.WithVlanDomain2Device(deviceMap), + xconnectns.WithClientURL(&cfg.ConnectTo), + xconnectns.WithDialTimeout(cfg.DialTimeout), + xconnectns.WithStatsOptions(statsOpts...), + xconnectns.WithCleanupOptions(cleanupOpts...), + xconnectns.WithVxlanOptions(vxlan.WithPort(cfg.VxlanPort)), + xconnectns.WithDialOptions(dialOptions...), ) log.FromContext(ctx).WithField("duration", time.Since(now)).Info("completed phase 7: create xconnect network service endpoint") @@ -276,10 +303,11 @@ func main() { log.FromContext(ctx).Infof("Startup completed in %v", time.Since(starttime)) - // TODO - cleaner shutdown across these three channels + // TODO - cleaner shutdown across these channels <-ctx.Done() <-srvErrCh <-vppErrCh + <-cleanupDoneCh } func setupDeviceMap(ctx context.Context, cfg *config.Config) map[string]string { @@ -383,3 +411,11 @@ func exitOnErrCh(ctx context.Context, cancel context.CancelFunc, errCh <-chan er cancel() }(ctx, errCh) } + +func fileExists(filename string) bool { + info, err := os.Stat(filename) + if os.IsNotExist(err) { + return false + } + return !info.IsDir() +} From ce9f95d43d979e7afef59cd0b6d562f837d67437 Mon Sep 17 00:00:00 2001 From: Artem Glazychev Date: Sun, 20 Mar 2022 10:49:56 +0700 Subject: [PATCH 3/3] Use vpp instead of vpp-ext Signed-off-by: Artem Glazychev --- internal/config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/config/config.go b/internal/config/config.go index 33954a05..1d1249c1 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -46,7 +46,7 @@ type Config struct { 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:"/var/run/vpp-ext/vpp-api.sock" desc:"filename of socket to connect to existing VPP instance. If empty a VPP instance is run in forwarder" split_words:"true"` + VppAPISocket string `default:"/var/run/vpp/vpp-api.sock" 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:"NONE" desc:"type of VPP initialization. Must be NONE or AF_PACKET" split_words:"true"` ResourcePollTimeout time.Duration `default:"30s" desc:"device plugin polling timeout" split_words:"true"`