Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update vpphelper manually #537

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update vpphelper manually
Signed-off-by: NikitaSkrynnik <[email protected]>
NikitaSkrynnik committed Dec 28, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 40be028e82029552919f898bda58dc4c91bbb5eb
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ require (
github.com/sirupsen/logrus v1.9.3
github.com/spiffe/go-spiffe/v2 v2.1.7
github.com/vishvananda/netlink v1.3.1-0.20240922070040-084abd93d350
go.fd.io/govpp v0.10.0-alpha.0.20240110141843-761adec77524
google.golang.org/grpc v1.60.1
)

@@ -60,7 +61,6 @@ require (
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/yashtewari/glob-intersection v0.1.0 // indirect
github.com/zeebo/errs v1.3.0 // indirect
go.fd.io/govpp v0.10.0-alpha.0.20240110141843-761adec77524 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect
go.opentelemetry.io/otel v1.20.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.43.0 // indirect
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@ import (
"github.com/spiffe/go-spiffe/v2/spiffetls/tlsconfig"
"github.com/spiffe/go-spiffe/v2/svid/x509svid"
"github.com/spiffe/go-spiffe/v2/workloadapi"
"go.fd.io/govpp/api"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"

@@ -134,7 +135,7 @@ func logPhases(ctx context.Context) {
log.FromContext(ctx).Infof("a final success message with start time duration")
}

func createNSEndpoint(ctx context.Context, source x509svid.Source, config *Config, vppConn vpphelper.Connection, ipnet *net.IPNet, cancel context.CancelFunc) (endpoint.Endpoint, ifconfig.Server) {
func createNSEndpoint(ctx context.Context, source x509svid.Source, config *Config, vppConn api.Connection, ipnet *net.IPNet, cancel context.CancelFunc) (endpoint.Endpoint, ifconfig.Server) {
sriovTokenVlanServer := getSriovTokenVlanServerChainElement(getTokenKey(ctx, tokens.FromEnv(os.Environ())))
parentIfName := getParentIfname(config.Name)
ifConfigServer := ifconfig.NewServer(ctx, parentIfName, vppConn)
9 changes: 4 additions & 5 deletions pkg/networkservice/ifconfig/server.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2021-2022 Nordix Foundation.
//
// Copyright (c) 2023 Cisco Foundation.
// Copyright (c) 2023-2024 Cisco Foundation.
//
// SPDX-License-Identifier: Apache-2.0
//
@@ -30,8 +30,7 @@ import (
"github.com/golang/protobuf/ptypes/empty"
"github.com/pkg/errors"
"github.com/vishvananda/netlink"

"github.com/networkservicemesh/vpphelper"
"go.fd.io/govpp/api"

"github.com/networkservicemesh/govpp/binapi/af_packet"
"github.com/networkservicemesh/govpp/binapi/fib_types"
@@ -65,7 +64,7 @@ type ifConfigServer struct {
stop chan interface{}
parentIfName string
swIfIndexesMap map[string]interface_types.InterfaceIndex
vppConn vpphelper.Connection
vppConn api.Connection
clientsRefCount int
connections map[string]interface{}
mutex sync.Mutex
@@ -78,7 +77,7 @@ type Server interface {
}

// NewServer creates new ifconfig server instance
func NewServer(ctx context.Context, parentIfName string, vppConn vpphelper.Connection) Server {
func NewServer(ctx context.Context, parentIfName string, vppConn api.Connection) Server {
ifServer := &ifConfigServer{ifCtx: ctx, parentIfName: parentIfName, ifOps: make(chan ifOp, bufSize),
swIfIndexesMap: make(map[string]interface_types.InterfaceIndex), stop: make(chan interface{}),
vppConn: vppConn, connections: make(map[string]interface{})}