Skip to content

Commit

Permalink
Trivial: Use VxlanAddDelTunnelV3 instead of V2 (#805)
Browse files Browse the repository at this point in the history
VxlanAddDelTunnelV2 was deprecated (see [1]), change it to
VxlanAddDelTunnelV3 and update the related log messages also.

[1]: FDio/govpp@8debdf0

Signed-off-by: Lajos Katona <lajos.katona@est.tech>
  • Loading branch information
elajkat authored Mar 14, 2024
1 parent 9cd334d commit a7d3dd6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pkg/networkservice/mechanisms/vxlan/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
//
// Copyright (c) 2023 Cisco and/or its affiliates.
//
// Copyright (c) 2024 Ericsson Software Technologies and/or its affiliates.
//
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -84,7 +86,7 @@ func addDel(ctx context.Context, conn *networkservice.Connection, vppConn api.Co
WithField("vppapi", "AddNodeNext").Debug("completed")

now = time.Now()
vxlanAddDelTunnel := &vxlan.VxlanAddDelTunnelV2{
vxlanAddDelTunnel := &vxlan.VxlanAddDelTunnelV3{
IsAdd: isAdd,
Instance: ^uint32(0),
SrcAddress: types.ToVppAddress(mechanism.SrcIP()),
Expand All @@ -98,9 +100,10 @@ func addDel(ctx context.Context, conn *networkservice.Connection, vppConn api.Co
vxlanAddDelTunnel.SrcAddress = types.ToVppAddress(mechanism.DstIP())
vxlanAddDelTunnel.DstAddress = types.ToVppAddress(mechanism.SrcIP())
}
rsp, err := vxlan.NewServiceClient(vppConn).VxlanAddDelTunnelV2(ctx, vxlanAddDelTunnel)

rsp, err := vxlan.NewServiceClient(vppConn).VxlanAddDelTunnelV3(ctx, vxlanAddDelTunnel)
if err != nil {
return errors.Wrap(err, "vppapi VxlanAddDelTunnelV2 returned error")
return errors.Wrap(err, "vppapi VxlanAddDelTunnelV3 returned error")
}
log.FromContext(ctx).
WithField("isAdd", isAdd).
Expand All @@ -109,7 +112,7 @@ func addDel(ctx context.Context, conn *networkservice.Connection, vppConn api.Co
WithField("DstAddress", vxlanAddDelTunnel.DstAddress).
WithField("Vni", vxlanAddDelTunnel.Vni).
WithField("duration", time.Since(now)).
WithField("vppapi", "VxlanAddDelTunnel").Debug("completed")
WithField("vppapi", "VxlanAddDelTunnelV3").Debug("completed")
if isAdd {
ifindex.Store(ctx, isClient, rsp.SwIfIndex)
} else {
Expand Down

0 comments on commit a7d3dd6

Please sign in to comment.