From d8aa75f5dbd1aa0de3e2b17c0620403437fe6ca9 Mon Sep 17 00:00:00 2001 From: rewenset Date: Fri, 23 Aug 2019 15:08:26 +0300 Subject: [PATCH 1/7] Add GRE VPP calls. Add GRE type and link to inteface message --- api/models/vpp/interfaces/interface.pb.go | 384 ++++++++++++------ api/models/vpp/interfaces/interface.proto | 15 + plugins/vpp/binapi/vpp1904/gen.go | 1 + plugins/vpp/binapi/vpp1904/gre/gre.ba.go | 184 +++++++++ plugins/vpp/ifplugin/vppcalls/if_vppcalls.go | 19 + .../ifplugin/vppcalls/vpp1901/gre_vppcalls.go | 128 ++++++ .../ifplugin/vppcalls/vpp1904/gre_vppcalls.go | 128 ++++++ .../ifplugin/vppcalls/vpp1908/gre_vppcalls.go | 128 ++++++ tests/integration/vpp/080_gre_test.go | 127 ++++++ 9 files changed, 995 insertions(+), 119 deletions(-) create mode 100644 plugins/vpp/binapi/vpp1904/gre/gre.ba.go create mode 100644 plugins/vpp/ifplugin/vppcalls/vpp1901/gre_vppcalls.go create mode 100644 plugins/vpp/ifplugin/vppcalls/vpp1904/gre_vppcalls.go create mode 100644 plugins/vpp/ifplugin/vppcalls/vpp1908/gre_vppcalls.go create mode 100644 tests/integration/vpp/080_gre_test.go diff --git a/api/models/vpp/interfaces/interface.pb.go b/api/models/vpp/interfaces/interface.pb.go index fe6ddd4593..a8685c1302 100644 --- a/api/models/vpp/interfaces/interface.pb.go +++ b/api/models/vpp/interfaces/interface.pb.go @@ -36,6 +36,7 @@ const ( Interface_IPSEC_TUNNEL Interface_Type = 8 Interface_VMXNET3_INTERFACE Interface_Type = 9 Interface_BOND_INTERFACE Interface_Type = 10 + Interface_GRE Interface_Type = 11 ) var Interface_Type_name = map[int32]string{ @@ -50,6 +51,7 @@ var Interface_Type_name = map[int32]string{ 8: "IPSEC_TUNNEL", 9: "VMXNET3_INTERFACE", 10: "BOND_INTERFACE", + 11: "GRE", } var Interface_Type_value = map[string]int32{ @@ -64,6 +66,7 @@ var Interface_Type_value = map[string]int32{ "IPSEC_TUNNEL": 8, "VMXNET3_INTERFACE": 9, "BOND_INTERFACE": 10, + "GRE": 11, } func (x Interface_Type) String() string { @@ -248,6 +251,34 @@ func (BondLink_LoadBalance) EnumDescriptor() ([]byte, []int) { return fileDescriptor_1ac7cab935c1dc4d, []int{8, 1} } +type GreLink_Type int32 + +const ( + GreLink_L3 GreLink_Type = 0 + GreLink_TEB GreLink_Type = 1 + GreLink_ERSPAN GreLink_Type = 2 +) + +var GreLink_Type_name = map[int32]string{ + 0: "L3", + 1: "TEB", + 2: "ERSPAN", +} + +var GreLink_Type_value = map[string]int32{ + "L3": 0, + "TEB": 1, + "ERSPAN": 2, +} + +func (x GreLink_Type) String() string { + return proto.EnumName(GreLink_Type_name, int32(x)) +} + +func (GreLink_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_1ac7cab935c1dc4d, []int{9, 0} +} + type Interface struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Type Interface_Type `protobuf:"varint,2,opt,name=type,proto3,enum=vpp.interfaces.Interface_Type" json:"type,omitempty"` @@ -269,6 +300,7 @@ type Interface struct { // *Interface_Ipsec // *Interface_VmxNet3 // *Interface_Bond + // *Interface_Gre Link isInterface_Link `protobuf_oneof:"link"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -327,6 +359,9 @@ type Interface_VmxNet3 struct { type Interface_Bond struct { Bond *BondLink `protobuf:"bytes,107,opt,name=bond,proto3,oneof"` } +type Interface_Gre struct { + Gre *GreLink `protobuf:"bytes,108,opt,name=gre,proto3,oneof"` +} func (*Interface_Sub) isInterface_Link() {} func (*Interface_Memif) isInterface_Link() {} @@ -336,6 +371,7 @@ func (*Interface_Vxlan) isInterface_Link() {} func (*Interface_Ipsec) isInterface_Link() {} func (*Interface_VmxNet3) isInterface_Link() {} func (*Interface_Bond) isInterface_Link() {} +func (*Interface_Gre) isInterface_Link() {} func (m *Interface) GetLink() isInterface_Link { if m != nil { @@ -477,6 +513,13 @@ func (m *Interface) GetBond() *BondLink { return nil } +func (m *Interface) GetGre() *GreLink { + if x, ok := m.GetLink().(*Interface_Gre); ok { + return x.Gre + } + return nil +} + // XXX_OneofFuncs is for the internal use of the proto package. func (*Interface) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { return _Interface_OneofMarshaler, _Interface_OneofUnmarshaler, _Interface_OneofSizer, []interface{}{ @@ -488,6 +531,7 @@ func (*Interface) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) err (*Interface_Ipsec)(nil), (*Interface_VmxNet3)(nil), (*Interface_Bond)(nil), + (*Interface_Gre)(nil), } } @@ -535,6 +579,11 @@ func _Interface_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { if err := b.EncodeMessage(x.Bond); err != nil { return err } + case *Interface_Gre: + _ = b.EncodeVarint(108<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Gre); err != nil { + return err + } case nil: default: return fmt.Errorf("Interface.Link has unexpected type %T", x) @@ -609,6 +658,14 @@ func _Interface_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buff err := b.DecodeMessage(msg) m.Link = &Interface_Bond{msg} return true, err + case 108: // link.gre + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(GreLink) + err := b.DecodeMessage(msg) + m.Link = &Interface_Gre{msg} + return true, err default: return false, nil } @@ -658,6 +715,11 @@ func _Interface_OneofSizer(msg proto.Message) (n int) { n += 2 // tag and wire n += proto.SizeVarint(uint64(s)) n += s + case *Interface_Gre: + s := proto.Size(x.Gre) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s case nil: default: panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) @@ -1527,6 +1589,80 @@ func (m *BondLink_BondedInterface) GetIsLongTimeout() bool { func (*BondLink_BondedInterface) XXX_MessageName() string { return "vpp.interfaces.BondLink.BondedInterface" } + +type GreLink struct { + TunnelType GreLink_Type `protobuf:"varint,1,opt,name=tunnel_type,json=tunnelType,proto3,enum=vpp.interfaces.GreLink_Type" json:"tunnel_type,omitempty"` + SrcAddr string `protobuf:"bytes,2,opt,name=src_addr,json=srcAddr,proto3" json:"src_addr,omitempty"` + DstAddr string `protobuf:"bytes,3,opt,name=dst_addr,json=dstAddr,proto3" json:"dst_addr,omitempty"` + OuterFibID uint32 `protobuf:"varint,4,opt,name=outerFibID,proto3" json:"outerFibID,omitempty"` + SessionID uint32 `protobuf:"varint,5,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GreLink) Reset() { *m = GreLink{} } +func (m *GreLink) String() string { return proto.CompactTextString(m) } +func (*GreLink) ProtoMessage() {} +func (*GreLink) Descriptor() ([]byte, []int) { + return fileDescriptor_1ac7cab935c1dc4d, []int{9} +} +func (m *GreLink) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GreLink.Unmarshal(m, b) +} +func (m *GreLink) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GreLink.Marshal(b, m, deterministic) +} +func (m *GreLink) XXX_Merge(src proto.Message) { + xxx_messageInfo_GreLink.Merge(m, src) +} +func (m *GreLink) XXX_Size() int { + return xxx_messageInfo_GreLink.Size(m) +} +func (m *GreLink) XXX_DiscardUnknown() { + xxx_messageInfo_GreLink.DiscardUnknown(m) +} + +var xxx_messageInfo_GreLink proto.InternalMessageInfo + +func (m *GreLink) GetTunnelType() GreLink_Type { + if m != nil { + return m.TunnelType + } + return GreLink_L3 +} + +func (m *GreLink) GetSrcAddr() string { + if m != nil { + return m.SrcAddr + } + return "" +} + +func (m *GreLink) GetDstAddr() string { + if m != nil { + return m.DstAddr + } + return "" +} + +func (m *GreLink) GetOuterFibID() uint32 { + if m != nil { + return m.OuterFibID + } + return 0 +} + +func (m *GreLink) GetSessionID() uint32 { + if m != nil { + return m.SessionID + } + return 0 +} + +func (*GreLink) XXX_MessageName() string { + return "vpp.interfaces.GreLink" +} func init() { proto.RegisterEnum("vpp.interfaces.Interface_Type", Interface_Type_name, Interface_Type_value) proto.RegisterEnum("vpp.interfaces.Interface_RxMode_Type", Interface_RxMode_Type_name, Interface_RxMode_Type_value) @@ -1534,6 +1670,7 @@ func init() { proto.RegisterEnum("vpp.interfaces.MemifLink_MemifMode", MemifLink_MemifMode_name, MemifLink_MemifMode_value) proto.RegisterEnum("vpp.interfaces.BondLink_Mode", BondLink_Mode_name, BondLink_Mode_value) proto.RegisterEnum("vpp.interfaces.BondLink_LoadBalance", BondLink_LoadBalance_name, BondLink_LoadBalance_value) + proto.RegisterEnum("vpp.interfaces.GreLink_Type", GreLink_Type_name, GreLink_Type_value) proto.RegisterType((*Interface)(nil), "vpp.interfaces.Interface") proto.RegisterType((*Interface_Unnumbered)(nil), "vpp.interfaces.Interface.Unnumbered") proto.RegisterType((*Interface_RxMode)(nil), "vpp.interfaces.Interface.RxMode") @@ -1547,6 +1684,7 @@ func init() { proto.RegisterType((*VmxNet3Link)(nil), "vpp.interfaces.VmxNet3Link") proto.RegisterType((*BondLink)(nil), "vpp.interfaces.BondLink") proto.RegisterType((*BondLink_BondedInterface)(nil), "vpp.interfaces.BondLink.BondedInterface") + proto.RegisterType((*GreLink)(nil), "vpp.interfaces.GreLink") } func init() { @@ -1554,123 +1692,131 @@ func init() { } var fileDescriptor_1ac7cab935c1dc4d = []byte{ - // 1880 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x57, 0xcd, 0x72, 0xe3, 0xc6, - 0x11, 0x16, 0x7f, 0x24, 0x02, 0xcd, 0x1f, 0x61, 0x27, 0xb6, 0x83, 0x95, 0x77, 0x6d, 0x85, 0xc9, - 0xc6, 0xa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xa1, 0x86, 0x13, 0x6f, 0x1a, 0xe3, 0x40, 0xaf, 0x1c, 0x96, - 0x8e, 0x14, 0xbb, 0xd8, 0xa2, 0x5f, 0x40, 0x23, 0x9b, 0x5f, 0x13, 0xd7, 0x0b, 0x82, 0x1c, 0x13, - 0xa2, 0x57, 0xf9, 0x49, 0x75, 0x86, 0x19, 0x02, 0x62, 0x2a, 0x51, 0x56, 0x28, 0x60, 0xa2, 0xef, - 0x1e, 0x56, 0x98, 0x4a, 0x94, 0x19, 0x05, 0x84, 0x34, 0xa8, 0xac, 0xf2, 0x99, 0xbe, 0x77, 0x58, - 0x3a, 0x6a, 0xda, 0x6c, 0x89, 0x7e, 0x0d, 0xfb, 0x04, 0x53, 0x37, 0x98, 0xfb, 0x99, 0xeb, 0xc7, - 0x11, 0x4e, 0xa8, 0x5e, 0xe3, 0x27, 0x37, 0x09, 0xa6, 0xbd, 0xb9, 0x9f, 0x9d, 0x73, 0x90, 0x31, - 0x17, 0x74, 0xa9, 0x2b, 0x82, 0xb9, 0xa0, 0x4b, 0xd4, 0x03, 0x58, 0x26, 0xc9, 0x72, 0x31, 0xc5, - 0x39, 0x0e, 0x74, 0xf5, 0xb0, 0x74, 0x54, 0xef, 0xfc, 0xea, 0xe1, 0xaf, 0x9c, 0x6c, 0x74, 0xed, - 0x2d, 0x1e, 0xfa, 0x06, 0x94, 0x7c, 0xed, 0xb2, 0x50, 0x13, 0x1d, 0x0e, 0x2b, 0x47, 0xf5, 0xce, - 0xe1, 0xc3, 0x36, 0xec, 0xf5, 0x65, 0x1a, 0x60, 0xbb, 0x96, 0xf3, 0xff, 0x04, 0xbd, 0x84, 0x66, - 0xbe, 0x76, 0xb3, 0xd8, 0xf3, 0xf1, 0x02, 0x27, 0x94, 0xe8, 0x75, 0x6e, 0xe1, 0xd9, 0x8f, 0x59, - 0x18, 0x15, 0xda, 0x76, 0x23, 0xbf, 0xd9, 0x10, 0xf4, 0x1c, 0x2a, 0x64, 0x39, 0xd5, 0x03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d, 0x45, 0xe4, 0xe7, 0x29, 0xc1, 0xf9, - 0x2a, 0xf2, 0x45, 0x97, 0x55, 0xed, 0x16, 0x4d, 0x2f, 0xb7, 0x50, 0x66, 0x2a, 0x5f, 0xbb, 0x37, - 0x17, 0x5a, 0x15, 0x37, 0x96, 0xaf, 0xed, 0xe2, 0x4a, 0x0f, 0xa1, 0x41, 0xb7, 0x35, 0x44, 0x85, - 0x01, 0xbd, 0xd1, 0x78, 0x0a, 0x20, 0xe6, 0x2d, 0x37, 0x24, 0x29, 0x4f, 0x09, 0xc5, 0x56, 0x05, - 0xf2, 0x2d, 0x49, 0xdb, 0xff, 0xad, 0x80, 0xba, 0x79, 0x05, 0x59, 0x0c, 0x31, 0x49, 0x64, 0x92, - 0xb2, 0x25, 0x0b, 0xbb, 0x97, 0xd0, 0xc8, 0xcd, 0x71, 0x16, 0x7b, 0xd7, 0x45, 0x8b, 0x65, 0x90, - 0xcd, 0x11, 0xf4, 0x18, 0x94, 0x38, 0xf5, 0xbd, 0x98, 0x3d, 0x57, 0x22, 0xc6, 0x35, 0xbe, 0xef, - 0x67, 0x3c, 0x9d, 0xf0, 0x22, 0xa5, 0x98, 0xc9, 0x44, 0x9e, 0x2a, 0x02, 0x10, 0x42, 0xc1, 0x23, - 0x59, 0x54, 0x64, 0x2a, 0x07, 0xc6, 0x59, 0xc4, 0x9c, 0x96, 0x4c, 0x26, 0x15, 0x89, 0x2a, 0x6d, - 0x31, 0xf1, 0x19, 0x80, 0x9f, 0x5f, 0x67, 0x34, 0x75, 0xbd, 0x38, 0xe4, 0x89, 0xda, 0xea, 0x7c, - 0x24, 0xaa, 0x91, 0x8f, 0xb3, 0xe7, 0x5c, 0x68, 0xc4, 0xa1, 0xad, 0xfa, 0xc5, 0x12, 0x1d, 0x81, - 0x26, 0x0e, 0x94, 0xd4, 0x2b, 0x7c, 0xcd, 0xd3, 0x58, 0xb5, 0x5b, 0x1c, 0x17, 0xa4, 0x57, 0xf8, - 0x9a, 0x3d,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 0xab, - 0x2c, 0xdb, 0x8a, 0xff, 0x74, 0x8f, 0xff, 0xd2, 0x3c, 0xfb, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x6f, 0x77, 0x95, 0x46, 0xef, 0x0e, 0x00, 0x00, + // 2001 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x57, 0xdd, 0x72, 0xdb, 0xc6, + 0x15, 0x16, 0x48, 0x8a, 0x04, 0x0f, 0x7f, 0x04, 0x6f, 0x93, 0x14, 0x56, 0xec, 0x44, 0x65, 0xea, + 0x46, 0xd3, 0x4e, 0x24, 0x8b, 0xca, 0x4c, 0xd3, 0x66, 0x7a, 0x01, 0x8a, 0x90, 0x4d, 0x9b, 0x02, + 0x59, 0x10, 0xb4, 0x9d, 0x4e, 0x67, 0x30, 0x20, 0xb1, 0x84, 0x50, 0x81, 0x00, 0x8c, 0x5d, 0x52, + 0x54, 0x66, 0xfa, 0x0c, 0x7d, 0xad, 0x74, 0xa6, 0x17, 0xed, 0x65, 0x2f, 0x3b, 0xbd, 0xec, 0x65, + 0x5f, 0xa0, 0xb3, 0x3f, 0x20, 0x29, 0x59, 0x4a, 0x6f, 0xc8, 0xdd, 0xef, 0x9c, 0x6f, 0x7f, 0xce, + 0x9e, 0xfd, 0xf6, 0x00, 0x9e, 0xcd, 0x13, 0x1f, 0x47, 0xe4, 0x78, 0x99, 0xa6, 0xc7, 0x61, 0x4c, + 0x71, 0x36, 0xf3, 0xa6, 0x98, 0x6c, 0x9a, 0x47, 0x69, 0x96, 0xd0, 0x04, 0x35, 0x97, 0x69, 0x7a, + 0xb4, 0xb1, 0xef, 0x7f, 0x15, 0x84, 0xf4, 0x72, 0x31, 0x39, 0x9a, 0x26, 0xf3, 0xe3, 0x20, 0x09, + 0x92, 0x63, 0xee, 0x36, 0x59, 0xcc, 0x78, 0x8f, 0x77, 0x78, 0x4b, 0xd0, 0xf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 0xd3, 0xfe, 0xdb, 0x65, 0x9a, 0x6e, 0xe5, 0xd8, 0xa4, 0xcc, + 0xbf, 0xc1, 0x4f, 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0x0e, 0xa7, 0xc1, 0x0e, 0x09, 0x10, 0x00, + 0x00, } diff --git a/api/models/vpp/interfaces/interface.proto b/api/models/vpp/interfaces/interface.proto index 0b1a73cf8d..65a86bd783 100644 --- a/api/models/vpp/interfaces/interface.proto +++ b/api/models/vpp/interfaces/interface.proto @@ -22,6 +22,7 @@ message Interface { IPSEC_TUNNEL = 8; VMXNET3_INTERFACE = 9; BOND_INTERFACE = 10; + GRE = 11; }; string name = 1; /* Logical interface name unique across all configured interfaces (mandatory) */ @@ -74,6 +75,7 @@ message Interface { IPSecLink ipsec = 105; /* IPSec tunnel-specific configuration */ VmxNet3Link vmx_net3 = 106; /* VmxNet3-specific configuration */ BondLink bond = 107; /* Bond interface-specific configuration */ + GreLink gre = 108; /* GRE-specific configuration */ }; }; @@ -193,3 +195,16 @@ message BondLink { } repeated BondedInterface bonded_interfaces = 12; } + +message GreLink { + enum Type { + L3 = 0; // L3 GRE (i.e. this tunnel is in L3 mode) + TEB = 1; // Transparent Ethernet Bridging - the tunnel is in L2 mode + ERSPAN = 2; // ERSPAN - the tunnel is for port mirror SPAN output + }; + Type tunnel_type = 1; + string src_addr = 2; + string dst_addr = 3; + uint32 outerFibID = 4; + uint32 sessionID = 5; +} diff --git a/plugins/vpp/binapi/vpp1904/gen.go b/plugins/vpp/binapi/vpp1904/gen.go index d93d39f081..39c7a7f191 100644 --- a/plugins/vpp/binapi/vpp1904/gen.go +++ b/plugins/vpp/binapi/vpp1904/gen.go @@ -20,6 +20,7 @@ package vpp1904 //go:generate binapigen --input-file=/usr/share/vpp/api/core/bfd.api.json //go:generate binapigen --input-file=/usr/share/vpp/api/core/bond.api.json //go:generate binapigen --input-file=/usr/share/vpp/api/core/dhcp.api.json +//go:generate binapigen --input-file=/usr/share/vpp/api/core/gre.api.json //go:generate binapigen --input-file=/usr/share/vpp/api/core/interface.api.json //go:generate binapigen --input-file=/usr/share/vpp/api/core/ip.api.json //go:generate binapigen --input-file=/usr/share/vpp/api/core/ipsec.api.json diff --git a/plugins/vpp/binapi/vpp1904/gre/gre.ba.go b/plugins/vpp/binapi/vpp1904/gre/gre.ba.go new file mode 100644 index 0000000000..95240992d2 --- /dev/null +++ b/plugins/vpp/binapi/vpp1904/gre/gre.ba.go @@ -0,0 +1,184 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. +// source: /usr/share/vpp/api/core/gre.api.json + +/* +Package gre is a generated VPP binary API for 'gre' module. + +It consists of: + 4 messages + 2 services +*/ +package gre + +import ( + bytes "bytes" + context "context" + api "git.fd.io/govpp.git/api" + struc "github.com/lunixbochs/struc" + io "io" + strconv "strconv" +) + +const ( + // ModuleName is the name of this module. + ModuleName = "gre" + // APIVersion is the API version of this module. + APIVersion = "1.0.1" + // VersionCrc is the CRC of this module. + VersionCrc = 0x83d2c14f +) + +// GreAddDelTunnel represents VPP binary API message 'gre_add_del_tunnel'. +type GreAddDelTunnel struct { + IsAdd uint8 + IsIPv6 uint8 + TunnelType uint8 + Instance uint32 + SrcAddress []byte `struc:"[16]byte"` + DstAddress []byte `struc:"[16]byte"` + OuterFibID uint32 + SessionID uint16 +} + +func (*GreAddDelTunnel) GetMessageName() string { + return "gre_add_del_tunnel" +} +func (*GreAddDelTunnel) GetCrcString() string { + return "9f03ede2" +} +func (*GreAddDelTunnel) GetMessageType() api.MessageType { + return api.RequestMessage +} + +// GreAddDelTunnelReply represents VPP binary API message 'gre_add_del_tunnel_reply'. +type GreAddDelTunnelReply struct { + Retval int32 + SwIfIndex uint32 +} + +func (*GreAddDelTunnelReply) GetMessageName() string { + return "gre_add_del_tunnel_reply" +} +func (*GreAddDelTunnelReply) GetCrcString() string { + return "fda5941f" +} +func (*GreAddDelTunnelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +// GreTunnelDetails represents VPP binary API message 'gre_tunnel_details'. +type GreTunnelDetails struct { + SwIfIndex uint32 + Instance uint32 + IsIPv6 uint8 + TunnelType uint8 + SrcAddress []byte `struc:"[16]byte"` + DstAddress []byte `struc:"[16]byte"` + OuterFibID uint32 + SessionID uint16 +} + +func (*GreTunnelDetails) GetMessageName() string { + return "gre_tunnel_details" +} +func (*GreTunnelDetails) GetCrcString() string { + return "1a12b8c1" +} +func (*GreTunnelDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +// GreTunnelDump represents VPP binary API message 'gre_tunnel_dump'. +type GreTunnelDump struct { + SwIfIndex uint32 +} + +func (*GreTunnelDump) GetMessageName() string { + return "gre_tunnel_dump" +} +func (*GreTunnelDump) GetCrcString() string { + return "529cb13f" +} +func (*GreTunnelDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func init() { + api.RegisterMessage((*GreAddDelTunnel)(nil), "gre.GreAddDelTunnel") + api.RegisterMessage((*GreAddDelTunnelReply)(nil), "gre.GreAddDelTunnelReply") + api.RegisterMessage((*GreTunnelDetails)(nil), "gre.GreTunnelDetails") + api.RegisterMessage((*GreTunnelDump)(nil), "gre.GreTunnelDump") +} + +// Messages returns list of all messages in this module. +func AllMessages() []api.Message { + return []api.Message{ + (*GreAddDelTunnel)(nil), + (*GreAddDelTunnelReply)(nil), + (*GreTunnelDetails)(nil), + (*GreTunnelDump)(nil), + } +} + +// RPCService represents RPC service API for gre module. +type RPCService interface { + DumpGreTunnel(ctx context.Context, in *GreTunnelDump) (RPCService_DumpGreTunnelClient, error) + GreAddDelTunnel(ctx context.Context, in *GreAddDelTunnel) (*GreAddDelTunnelReply, error) +} + +type serviceClient struct { + ch api.Channel +} + +func NewServiceClient(ch api.Channel) RPCService { + return &serviceClient{ch} +} + +func (c *serviceClient) DumpGreTunnel(ctx context.Context, in *GreTunnelDump) (RPCService_DumpGreTunnelClient, error) { + stream := c.ch.SendMultiRequest(in) + x := &serviceClient_DumpGreTunnelClient{stream} + return x, nil +} + +type RPCService_DumpGreTunnelClient interface { + Recv() (*GreTunnelDetails, error) +} + +type serviceClient_DumpGreTunnelClient struct { + api.MultiRequestCtx +} + +func (c *serviceClient_DumpGreTunnelClient) Recv() (*GreTunnelDetails, error) { + m := new(GreTunnelDetails) + stop, err := c.MultiRequestCtx.ReceiveReply(m) + if err != nil { + return nil, err + } + if stop { + return nil, io.EOF + } + return m, nil +} + +func (c *serviceClient) GreAddDelTunnel(ctx context.Context, in *GreAddDelTunnel) (*GreAddDelTunnelReply, error) { + out := new(GreAddDelTunnelReply) + err := c.ch.SendRequest(in).ReceiveReply(out) + if err != nil { + return nil, err + } + return out, nil +} + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the GoVPP api package it is being compiled against. +// A compilation error at this line likely means your copy of the +// GoVPP api package needs to be updated. +const _ = api.GoVppAPIPackageIsVersion1 // please upgrade the GoVPP api package + +// Reference imports to suppress errors if they are not otherwise used. +var _ = api.RegisterMessage +var _ = bytes.NewBuffer +var _ = context.Background +var _ = io.Copy +var _ = strconv.Itoa +var _ = struc.Pack diff --git a/plugins/vpp/ifplugin/vppcalls/if_vppcalls.go b/plugins/vpp/ifplugin/vppcalls/if_vppcalls.go index de2205a7dd..2e246e9f98 100644 --- a/plugins/vpp/ifplugin/vppcalls/if_vppcalls.go +++ b/plugins/vpp/ifplugin/vppcalls/if_vppcalls.go @@ -100,6 +100,18 @@ type InterfaceState struct { LinkMTU uint16 } +// GreTunnelDetails is something +type GreTunnelDetails struct { + SwIfIndex uint32 + Instance uint32 + IsIPv6 uint8 + TunnelType uint8 + SrcAddress string + DstAddress string + OuterFibID uint32 + SessionID uint16 +} + // InterfaceVppAPI provides methods for creating and managing interface plugin type InterfaceVppAPI interface { InterfaceVppRead @@ -184,6 +196,13 @@ type InterfaceVppAPI interface { DetachInterfaceFromBond(ifIdx uint32) error // SetVLanTagRewrite sets VLan tag rewrite rule for given sub-interface SetVLanTagRewrite(ifIdx uint32, subIf *interfaces.SubInterface) error + + // AddGreTunnel adds new GRE interface. + AddGreTunnel(ifName string, greLink *interfaces.GreLink) (uint32, error) + // DelGreTunnel removes GRE interface. + DelGreTunnel(ifName string, greLink *interfaces.GreLink) (uint32, error) + // DumpGre dumps GRE interface (TODO: move this to `DumpInterfaceByType`). + DumpGre(ifIdx uint32) ([]*GreTunnelDetails, error) } // InterfaceVppRead provides read methods for interface plugin diff --git a/plugins/vpp/ifplugin/vppcalls/vpp1901/gre_vppcalls.go b/plugins/vpp/ifplugin/vppcalls/vpp1901/gre_vppcalls.go new file mode 100644 index 0000000000..b36911ea92 --- /dev/null +++ b/plugins/vpp/ifplugin/vppcalls/vpp1901/gre_vppcalls.go @@ -0,0 +1,128 @@ +package vpp1901 + +import ( + "errors" + "fmt" + "net" + + interfaces "github.com/ligato/vpp-agent/api/models/vpp/interfaces" + "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1904/gre" + "github.com/ligato/vpp-agent/plugins/vpp/ifplugin/vppcalls" +) + +func (h *InterfaceVppHandler) greAddDelTunnel(isAdd uint8, greLink *interfaces.GreLink) (uint32, error) { + greSource := net.ParseIP(greLink.SrcAddr) + if greSource == nil { + err := errors.New("bad source address for GRE tunnel") + return 0, err + } + greDestination := net.ParseIP(greLink.DstAddr) + if greDestination == nil { + err := errors.New("bad destination address for GRE tunnel") + return 0, err + } + + if greLink.SrcAddr == greLink.DstAddr { + err := errors.New("source and destination are the same") + return 0, err + } + + if greLink.TunnelType == interfaces.GreLink_ERSPAN && greLink.SessionID > 1023 { + err := errors.New("set session id for ERSPAN tunnel type") + return 0, err + } + req := &gre.GreAddDelTunnel{ + IsAdd: isAdd, + TunnelType: uint8(greLink.TunnelType), + Instance: ^uint32(0), + OuterFibID: greLink.OuterFibID, + SessionID: uint16(greLink.SessionID), + } + + var isSrcIPv6, isDstIPv6 bool + + if greSource.To4() == nil { + isSrcIPv6 = true + } + if greDestination.To4() == nil { + isDstIPv6 = true + } + if isSrcIPv6 != isDstIPv6 { + return 0, errors.New("source and destination addresses must be both either in IPv4 or IPv6") + } + + if isSrcIPv6 { + req.SrcAddress = []byte(greSource.To16()) + req.DstAddress = []byte(greDestination.To16()) + req.IsIPv6 = 1 + } else { + req.SrcAddress = []byte(greSource.To4()) + req.DstAddress = []byte(greDestination.To4()) + } + + reply := &gre.GreAddDelTunnelReply{} + + if err := h.callsChannel.SendRequest(req).ReceiveReply(reply); err != nil { + return 0, err + } + return reply.SwIfIndex, nil +} + +// AddGreTunnel adds new GRE interface. +func (h *InterfaceVppHandler) AddGreTunnel(ifName string, greLink *interfaces.GreLink) (uint32, error) { + swIfIndex, err := h.greAddDelTunnel(1, greLink) + if err != nil { + return 0, err + } + return swIfIndex, h.SetInterfaceTag(ifName, swIfIndex) +} + +// DelGreTunnel removes GRE interface. +func (h *InterfaceVppHandler) DelGreTunnel(ifName string, greLink *interfaces.GreLink) (uint32, error) { + swIfIndex, err := h.greAddDelTunnel(0, greLink) + if err != nil { + return 0, err + } + return swIfIndex, h.RemoveInterfaceTag(ifName, swIfIndex) +} + +// DumpGre dumps GRE interface. +func (h *InterfaceVppHandler) DumpGre(ifIdx uint32) ([]*vppcalls.GreTunnelDetails, error) { + var gres []*vppcalls.GreTunnelDetails + reqCtx := h.callsChannel.SendMultiRequest(&gre.GreTunnelDump{ + SwIfIndex: ifIdx, + }) + + for { + greDetails := &gre.GreTunnelDetails{} + stop, err := reqCtx.ReceiveReply(greDetails) + if stop { + break + } + if err != nil { + return nil, fmt.Errorf("failed to dump span: %v", err) + } + + var srcAddr, dstAddr string + if greDetails.IsIPv6 == 1 { + srcAddr = net.IP(greDetails.SrcAddress).To16().String() + dstAddr = net.IP(greDetails.DstAddress).To16().String() + } else { + srcAddr = net.IP(greDetails.SrcAddress[:4]).To4().String() + dstAddr = net.IP(greDetails.DstAddress[:4]).To4().String() + } + + gre := &vppcalls.GreTunnelDetails{ + SwIfIndex: greDetails.SwIfIndex, + Instance: greDetails.Instance, + IsIPv6: greDetails.IsIPv6, + TunnelType: greDetails.TunnelType, + SrcAddress: srcAddr, + DstAddress: dstAddr, + OuterFibID: greDetails.OuterFibID, + SessionID: greDetails.SessionID, + } + gres = append(gres, gre) + } + return gres, nil +} diff --git a/plugins/vpp/ifplugin/vppcalls/vpp1904/gre_vppcalls.go b/plugins/vpp/ifplugin/vppcalls/vpp1904/gre_vppcalls.go new file mode 100644 index 0000000000..f82181eb9c --- /dev/null +++ b/plugins/vpp/ifplugin/vppcalls/vpp1904/gre_vppcalls.go @@ -0,0 +1,128 @@ +package vpp1904 + +import ( + "errors" + "fmt" + "net" + + interfaces "github.com/ligato/vpp-agent/api/models/vpp/interfaces" + "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1904/gre" + "github.com/ligato/vpp-agent/plugins/vpp/ifplugin/vppcalls" +) + +func (h *InterfaceVppHandler) greAddDelTunnel(isAdd uint8, greLink *interfaces.GreLink) (uint32, error) { + greSource := net.ParseIP(greLink.SrcAddr) + if greSource == nil { + err := errors.New("bad source address for GRE tunnel") + return 0, err + } + greDestination := net.ParseIP(greLink.DstAddr) + if greDestination == nil { + err := errors.New("bad destination address for GRE tunnel") + return 0, err + } + + if greLink.SrcAddr == greLink.DstAddr { + err := errors.New("source and destination are the same") + return 0, err + } + + if greLink.TunnelType == interfaces.GreLink_ERSPAN && greLink.SessionID > 1023 { + err := errors.New("set session id for ERSPAN tunnel type") + return 0, err + } + req := &gre.GreAddDelTunnel{ + IsAdd: isAdd, + TunnelType: uint8(greLink.TunnelType), + Instance: ^uint32(0), + OuterFibID: greLink.OuterFibID, + SessionID: uint16(greLink.SessionID), + } + + var isSrcIPv6, isDstIPv6 bool + + if greSource.To4() == nil { + isSrcIPv6 = true + } + if greDestination.To4() == nil { + isDstIPv6 = true + } + if isSrcIPv6 != isDstIPv6 { + return 0, errors.New("source and destination addresses must be both either in IPv4 or IPv6") + } + + if isSrcIPv6 { + req.SrcAddress = []byte(greSource.To16()) + req.DstAddress = []byte(greDestination.To16()) + req.IsIPv6 = 1 + } else { + req.SrcAddress = []byte(greSource.To4()) + req.DstAddress = []byte(greDestination.To4()) + } + + reply := &gre.GreAddDelTunnelReply{} + + if err := h.callsChannel.SendRequest(req).ReceiveReply(reply); err != nil { + return 0, err + } + return reply.SwIfIndex, nil +} + +// AddGreTunnel adds new GRE interface. +func (h *InterfaceVppHandler) AddGreTunnel(ifName string, greLink *interfaces.GreLink) (uint32, error) { + swIfIndex, err := h.greAddDelTunnel(1, greLink) + if err != nil { + return 0, err + } + return swIfIndex, h.SetInterfaceTag(ifName, swIfIndex) +} + +// DelGreTunnel removes GRE interface. +func (h *InterfaceVppHandler) DelGreTunnel(ifName string, greLink *interfaces.GreLink) (uint32, error) { + swIfIndex, err := h.greAddDelTunnel(0, greLink) + if err != nil { + return 0, err + } + return swIfIndex, h.RemoveInterfaceTag(ifName, swIfIndex) +} + +// DumpGre dumps GRE interface. +func (h *InterfaceVppHandler) DumpGre(ifIdx uint32) ([]*vppcalls.GreTunnelDetails, error) { + var gres []*vppcalls.GreTunnelDetails + reqCtx := h.callsChannel.SendMultiRequest(&gre.GreTunnelDump{ + SwIfIndex: ifIdx, + }) + + for { + greDetails := &gre.GreTunnelDetails{} + stop, err := reqCtx.ReceiveReply(greDetails) + if stop { + break + } + if err != nil { + return nil, fmt.Errorf("failed to dump span: %v", err) + } + + var srcAddr, dstAddr string + if greDetails.IsIPv6 == 1 { + srcAddr = net.IP(greDetails.SrcAddress).To16().String() + dstAddr = net.IP(greDetails.DstAddress).To16().String() + } else { + srcAddr = net.IP(greDetails.SrcAddress[:4]).To4().String() + dstAddr = net.IP(greDetails.DstAddress[:4]).To4().String() + } + + gre := &vppcalls.GreTunnelDetails{ + SwIfIndex: greDetails.SwIfIndex, + Instance: greDetails.Instance, + IsIPv6: greDetails.IsIPv6, + TunnelType: greDetails.TunnelType, + SrcAddress: srcAddr, + DstAddress: dstAddr, + OuterFibID: greDetails.OuterFibID, + SessionID: greDetails.SessionID, + } + gres = append(gres, gre) + } + return gres, nil +} diff --git a/plugins/vpp/ifplugin/vppcalls/vpp1908/gre_vppcalls.go b/plugins/vpp/ifplugin/vppcalls/vpp1908/gre_vppcalls.go new file mode 100644 index 0000000000..f596889965 --- /dev/null +++ b/plugins/vpp/ifplugin/vppcalls/vpp1908/gre_vppcalls.go @@ -0,0 +1,128 @@ +package vpp1908 + +import ( + "errors" + "fmt" + "net" + + interfaces "github.com/ligato/vpp-agent/api/models/vpp/interfaces" + "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1904/gre" + "github.com/ligato/vpp-agent/plugins/vpp/ifplugin/vppcalls" +) + +func (h *InterfaceVppHandler) greAddDelTunnel(isAdd uint8, greLink *interfaces.GreLink) (uint32, error) { + greSource := net.ParseIP(greLink.SrcAddr) + if greSource == nil { + err := errors.New("bad source address for GRE tunnel") + return 0, err + } + greDestination := net.ParseIP(greLink.DstAddr) + if greDestination == nil { + err := errors.New("bad destination address for GRE tunnel") + return 0, err + } + + if greLink.SrcAddr == greLink.DstAddr { + err := errors.New("source and destination are the same") + return 0, err + } + + if greLink.TunnelType == interfaces.GreLink_ERSPAN && greLink.SessionID > 1023 { + err := errors.New("set session id for ERSPAN tunnel type") + return 0, err + } + req := &gre.GreAddDelTunnel{ + IsAdd: isAdd, + TunnelType: uint8(greLink.TunnelType), + Instance: ^uint32(0), + OuterFibID: greLink.OuterFibID, + SessionID: uint16(greLink.SessionID), + } + + var isSrcIPv6, isDstIPv6 bool + + if greSource.To4() == nil { + isSrcIPv6 = true + } + if greDestination.To4() == nil { + isDstIPv6 = true + } + if isSrcIPv6 != isDstIPv6 { + return 0, errors.New("source and destination addresses must be both either in IPv4 or IPv6") + } + + if isSrcIPv6 { + req.SrcAddress = []byte(greSource.To16()) + req.DstAddress = []byte(greDestination.To16()) + req.IsIPv6 = 1 + } else { + req.SrcAddress = []byte(greSource.To4()) + req.DstAddress = []byte(greDestination.To4()) + } + + reply := &gre.GreAddDelTunnelReply{} + + if err := h.callsChannel.SendRequest(req).ReceiveReply(reply); err != nil { + return 0, err + } + return reply.SwIfIndex, nil +} + +// AddGreTunnel adds new GRE interface. +func (h *InterfaceVppHandler) AddGreTunnel(ifName string, greLink *interfaces.GreLink) (uint32, error) { + swIfIndex, err := h.greAddDelTunnel(1, greLink) + if err != nil { + return 0, err + } + return swIfIndex, h.SetInterfaceTag(ifName, swIfIndex) +} + +// DelGreTunnel removes GRE interface. +func (h *InterfaceVppHandler) DelGreTunnel(ifName string, greLink *interfaces.GreLink) (uint32, error) { + swIfIndex, err := h.greAddDelTunnel(0, greLink) + if err != nil { + return 0, err + } + return swIfIndex, h.RemoveInterfaceTag(ifName, swIfIndex) +} + +// DumpGre dumps GRE interface. +func (h *InterfaceVppHandler) DumpGre(ifIdx uint32) ([]*vppcalls.GreTunnelDetails, error) { + var gres []*vppcalls.GreTunnelDetails + reqCtx := h.callsChannel.SendMultiRequest(&gre.GreTunnelDump{ + SwIfIndex: ifIdx, + }) + + for { + greDetails := &gre.GreTunnelDetails{} + stop, err := reqCtx.ReceiveReply(greDetails) + if stop { + break + } + if err != nil { + return nil, fmt.Errorf("failed to dump span: %v", err) + } + + var srcAddr, dstAddr string + if greDetails.IsIPv6 == 1 { + srcAddr = net.IP(greDetails.SrcAddress).To16().String() + dstAddr = net.IP(greDetails.DstAddress).To16().String() + } else { + srcAddr = net.IP(greDetails.SrcAddress[:4]).To4().String() + dstAddr = net.IP(greDetails.DstAddress[:4]).To4().String() + } + + gre := &vppcalls.GreTunnelDetails{ + SwIfIndex: greDetails.SwIfIndex, + Instance: greDetails.Instance, + IsIPv6: greDetails.IsIPv6, + TunnelType: greDetails.TunnelType, + SrcAddress: srcAddr, + DstAddress: dstAddr, + OuterFibID: greDetails.OuterFibID, + SessionID: greDetails.SessionID, + } + gres = append(gres, gre) + } + return gres, nil +} diff --git a/tests/integration/vpp/080_gre_test.go b/tests/integration/vpp/080_gre_test.go new file mode 100644 index 0000000000..bd7a999ba9 --- /dev/null +++ b/tests/integration/vpp/080_gre_test.go @@ -0,0 +1,127 @@ +package vpp + +import ( + "fmt" + "testing" + + "github.com/ligato/cn-infra/logging/logrus" + interfaces "github.com/ligato/vpp-agent/api/models/vpp/interfaces" + ifplugin_vppcalls "github.com/ligato/vpp-agent/plugins/vpp/ifplugin/vppcalls" +) + +func TestGre(t *testing.T) { + ctx := setupVPP(t) + defer ctx.teardownVPP() + + h := ifplugin_vppcalls.CompatibleInterfaceVppHandler(ctx.vppBinapi, logrus.NewLogger("test")) + + tests := []struct { + name string + greLink *interfaces.GreLink + isFail bool + }{ + { + name: "create ERSPAN GRE tunnel with IPv4", + greLink: &interfaces.GreLink{ + TunnelType: interfaces.GreLink_ERSPAN, + SrcAddr: "10.10.10.10", + DstAddr: "20.20.20.20", + }, + isFail: false, + }, + { + name: "create ERSPAN GRE tunnel with out of range session id", + greLink: &interfaces.GreLink{ + TunnelType: interfaces.GreLink_ERSPAN, + SrcAddr: "10.10.10.10", + DstAddr: "20.20.20.20", + SessionID: 1024, + }, + isFail: true, + }, + { + name: "create GRE tunnel with bad source address", + greLink: &interfaces.GreLink{ + TunnelType: interfaces.GreLink_ERSPAN, + SrcAddr: "badip", + DstAddr: "20.20.20.20", + }, + isFail: true, + }, + { + name: "create GRE tunnel with destination address not set", + greLink: &interfaces.GreLink{ + TunnelType: interfaces.GreLink_ERSPAN, + SrcAddr: "10.10.10.10", + }, + isFail: true, + }, + + { + name: "create GRE tunnel with equal source and destination addresses", + greLink: &interfaces.GreLink{ + TunnelType: interfaces.GreLink_ERSPAN, + SrcAddr: "10.10.10.10", + DstAddr: "10.10.10.10", + }, + isFail: true, + }, + { + name: "create GRE tunnel with addresses in IPv4 and IPv6", + greLink: &interfaces.GreLink{ + TunnelType: interfaces.GreLink_ERSPAN, + SrcAddr: "10.10.10.10", + DstAddr: "2019::08:23", + }, + isFail: true, + }, + } + for i, test := range tests { + t.Run(test.name, func(t *testing.T) { + ifIdx, err := h.AddGreTunnel(fmt.Sprintf("test%d", i), test.greLink) + + if err != nil { + if test.isFail { + return + } + t.Fatalf("create GRE tunnel failed: %v\n", err) + } + + gres, err := h.DumpGre(ifIdx) + if err != nil { + t.Fatalf("dump GRE tunnels failed: %v\n", err) + } + + if len(gres) != 1 { + t.Fatalf("expected 1 GRE tunnel, got: %d", len(gres)) + } + + gre := gres[0] + + if uint8(test.greLink.TunnelType) != gre.TunnelType { + t.Fatalf("expected tunnel type address <%d>, got: <%d>", test.greLink.TunnelType, gre.TunnelType) + } + if test.greLink.SrcAddr != gre.SrcAddress { + t.Fatalf("expected source address <%s>, got: <%s>", test.greLink.SrcAddr, gre.SrcAddress) + } + if test.greLink.DstAddr != gre.DstAddress { + t.Fatalf("expected destination address <%s>, got: <%s>", test.greLink.DstAddr, gre.DstAddress) + } + if test.greLink.OuterFibID != gre.OuterFibID { + t.Fatalf("expected outer FIB id <%d>, got: <%d>", test.greLink.OuterFibID, gre.OuterFibID) + } + if uint16(test.greLink.SessionID) != gre.SessionID { + t.Fatalf("expected session id <%d>, got: <%d>", test.greLink.SessionID, gre.SessionID) + } + }) + } + + t.Log("All interfaces:") + ifaces, err := h.DumpInterfaces() + if err != nil { + t.Fatalf("dump interfaces failed: %v\n", err) + } + for _, i := range ifaces { + t.Logf("\t%+v\n", i) + } +} From 922d5dd2fb7d6444931d20fa7109416ef3a1bcf7 Mon Sep 17 00:00:00 2001 From: rewenset Date: Fri, 23 Aug 2019 15:10:27 +0300 Subject: [PATCH 2/7] add basic validation and support of create and delete operations for GRE --- plugins/vpp/ifplugin/descriptor/interface.go | 17 +++++++++++++++++ .../vpp/ifplugin/descriptor/interface_crud.go | 9 +++++++++ 2 files changed, 26 insertions(+) diff --git a/plugins/vpp/ifplugin/descriptor/interface.go b/plugins/vpp/ifplugin/descriptor/interface.go index f9c92a2edc..0ef076e442 100644 --- a/plugins/vpp/ifplugin/descriptor/interface.go +++ b/plugins/vpp/ifplugin/descriptor/interface.go @@ -109,6 +109,12 @@ var ( // ErrBondInterfaceIDExists is returned when the bond interface uses existing ID value ErrBondInterfaceIDExists = errors.Errorf("Bond interface ID already exists") + + // ErrGreSrcAddrMissing is returned when source address was not set or set to an empty string. + ErrGreSrcAddrMissing = errors.Errorf("missing source address for GRE tunnel") + + // ErrGreDstAddrMissing is returned when destination address was not set or set to an empty string. + ErrGreDstAddrMissing = errors.Errorf("missing destination address for GRE tunnel") ) // InterfaceDescriptor teaches KVScheduler how to configure VPP interfaces. @@ -399,6 +405,10 @@ func (d *InterfaceDescriptor) Validate(key string, intf *interfaces.Interface) e if intf.Type != interfaces.Interface_IPSEC_TUNNEL { return linkMismatchErr } + case *interfaces.Interface_Gre: + if intf.Type != interfaces.Interface_GRE { + return linkMismatchErr + } case nil: if intf.Type != interfaces.Interface_SOFTWARE_LOOPBACK && intf.Type != interfaces.Interface_DPDK { @@ -424,6 +434,13 @@ func (d *InterfaceDescriptor) Validate(key string, intf *interfaces.Interface) e if name, ok := d.bondIDs[intf.GetBond().GetId()]; ok && name != intf.GetName() { return kvs.NewInvalidValueError(ErrBondInterfaceIDExists, "link.bond.id") } + case interfaces.Interface_GRE: + if intf.GetGre().SrcAddr == "" { + return kvs.NewInvalidValueError(ErrGreSrcAddrMissing, "link.gre.src_addr") + } + if intf.GetGre().DstAddr == "" { + return kvs.NewInvalidValueError(ErrGreDstAddrMissing, "link.gre.dst_addr") + } } // validate unnumbered diff --git a/plugins/vpp/ifplugin/descriptor/interface_crud.go b/plugins/vpp/ifplugin/descriptor/interface_crud.go index 9803727316..0ac5cb39b6 100644 --- a/plugins/vpp/ifplugin/descriptor/interface_crud.go +++ b/plugins/vpp/ifplugin/descriptor/interface_crud.go @@ -140,6 +140,13 @@ func (d *InterfaceDescriptor) Create(key string, intf *interfaces.Interface) (me return nil, err } d.bondIDs[intf.GetBond().GetId()] = intf.GetName() + + case interfaces.Interface_GRE: + ifIdx, err = d.ifHandler.AddGreTunnel(intf.Name, intf.GetGre()) + if err != nil { + d.log.Error(err) + return nil, err + } } // MAC address. Note: physical interfaces cannot have the MAC address changed. The bond interface uses its own @@ -237,6 +244,8 @@ func (d *InterfaceDescriptor) Delete(key string, intf *interfaces.Interface, met case interfaces.Interface_BOND_INTERFACE: err = d.ifHandler.DeleteBondInterface(intf.Name, ifIdx) delete(d.bondIDs, intf.GetBond().GetId()) + case interfaces.Interface_GRE: + _, err = d.ifHandler.DelGreTunnel(intf.Name, intf.GetGre()) } if err != nil { err = errors.Errorf("failed to remove interface %s, index %d: %v", intf.Name, ifIdx, err) From 094929208bf92e3648f3e96a28c9d7b554233546 Mon Sep 17 00:00:00 2001 From: rewenset Date: Fri, 23 Aug 2019 19:27:15 +0300 Subject: [PATCH 3/7] Rename things. Store addresses as net.IP --- api/models/vpp/interfaces/interface.pb.go | 302 ++++++++++-------- api/models/vpp/interfaces/interface.proto | 7 +- plugins/vpp/ifplugin/descriptor/interface.go | 4 +- .../vpp/ifplugin/descriptor/interface_crud.go | 4 +- plugins/vpp/ifplugin/vppcalls/if_vppcalls.go | 5 +- .../ifplugin/vppcalls/vpp1901/gre_vppcalls.go | 17 +- .../ifplugin/vppcalls/vpp1904/gre_vppcalls.go | 17 +- .../ifplugin/vppcalls/vpp1908/gre_vppcalls.go | 17 +- tests/integration/vpp/080_gre_test.go | 20 +- 9 files changed, 211 insertions(+), 182 deletions(-) diff --git a/api/models/vpp/interfaces/interface.pb.go b/api/models/vpp/interfaces/interface.pb.go index fc5220aa41..90b4a115d6 100644 --- a/api/models/vpp/interfaces/interface.pb.go +++ b/api/models/vpp/interfaces/interface.pb.go @@ -36,7 +36,7 @@ const ( Interface_IPSEC_TUNNEL Interface_Type = 8 Interface_VMXNET3_INTERFACE Interface_Type = 9 Interface_BOND_INTERFACE Interface_Type = 10 - Interface_GRE Interface_Type = 11 + Interface_GRE_TUNNEL Interface_Type = 11 ) var Interface_Type_name = map[int32]string{ @@ -51,7 +51,7 @@ var Interface_Type_name = map[int32]string{ 8: "IPSEC_TUNNEL", 9: "VMXNET3_INTERFACE", 10: "BOND_INTERFACE", - 11: "GRE", + 11: "GRE_TUNNEL", } var Interface_Type_value = map[string]int32{ @@ -66,7 +66,7 @@ var Interface_Type_value = map[string]int32{ "IPSEC_TUNNEL": 8, "VMXNET3_INTERFACE": 9, "BOND_INTERFACE": 10, - "GRE": 11, + "GRE_TUNNEL": 11, } func (x Interface_Type) String() string { @@ -315,6 +315,7 @@ type Interface struct { // *Interface_Ipsec // *Interface_VmxNet3 // *Interface_Bond + // *Interface_Gre Link isInterface_Link `protobuf_oneof:"link"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -373,6 +374,9 @@ type Interface_VmxNet3 struct { type Interface_Bond struct { Bond *BondLink `protobuf:"bytes,107,opt,name=bond,proto3,oneof"` } +type Interface_Gre struct { + Gre *GreLink `protobuf:"bytes,108,opt,name=gre,proto3,oneof"` +} func (*Interface_Sub) isInterface_Link() {} func (*Interface_Memif) isInterface_Link() {} @@ -382,6 +386,7 @@ func (*Interface_Vxlan) isInterface_Link() {} func (*Interface_Ipsec) isInterface_Link() {} func (*Interface_VmxNet3) isInterface_Link() {} func (*Interface_Bond) isInterface_Link() {} +func (*Interface_Gre) isInterface_Link() {} func (m *Interface) GetLink() isInterface_Link { if m != nil { @@ -523,6 +528,13 @@ func (m *Interface) GetBond() *BondLink { return nil } +func (m *Interface) GetGre() *GreLink { + if x, ok := m.GetLink().(*Interface_Gre); ok { + return x.Gre + } + return nil +} + // XXX_OneofFuncs is for the internal use of the proto package. func (*Interface) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { return _Interface_OneofMarshaler, _Interface_OneofUnmarshaler, _Interface_OneofSizer, []interface{}{ @@ -534,6 +546,7 @@ func (*Interface) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) err (*Interface_Ipsec)(nil), (*Interface_VmxNet3)(nil), (*Interface_Bond)(nil), + (*Interface_Gre)(nil), } } @@ -581,6 +594,11 @@ func _Interface_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { if err := b.EncodeMessage(x.Bond); err != nil { return err } + case *Interface_Gre: + _ = b.EncodeVarint(108<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Gre); err != nil { + return err + } case nil: default: return fmt.Errorf("Interface.Link has unexpected type %T", x) @@ -655,6 +673,14 @@ func _Interface_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buff err := b.DecodeMessage(msg) m.Link = &Interface_Bond{msg} return true, err + case 108: // link.gre + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(GreLink) + err := b.DecodeMessage(msg) + m.Link = &Interface_Gre{msg} + return true, err default: return false, nil } @@ -704,6 +730,11 @@ func _Interface_OneofSizer(msg proto.Message) (n int) { n += 2 // tag and wire n += proto.SizeVarint(uint64(s)) n += s + case *Interface_Gre: + s := proto.Size(x.Gre) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s case nil: default: panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) @@ -1591,8 +1622,8 @@ type GreLink struct { TunnelType GreLink_Type `protobuf:"varint,1,opt,name=tunnel_type,json=tunnelType,proto3,enum=vpp.interfaces.GreLink_Type" json:"tunnel_type,omitempty"` SrcAddr string `protobuf:"bytes,2,opt,name=src_addr,json=srcAddr,proto3" json:"src_addr,omitempty"` DstAddr string `protobuf:"bytes,3,opt,name=dst_addr,json=dstAddr,proto3" json:"dst_addr,omitempty"` - OuterFibID uint32 `protobuf:"varint,4,opt,name=outerFibID,proto3" json:"outerFibID,omitempty"` - SessionID uint32 `protobuf:"varint,5,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + OuterFibId uint32 `protobuf:"varint,4,opt,name=outer_fib_id,json=outerFibId,proto3" json:"outer_fib_id,omitempty"` + SessionId uint32 `protobuf:"varint,5,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1643,16 +1674,16 @@ func (m *GreLink) GetDstAddr() string { return "" } -func (m *GreLink) GetOuterFibID() uint32 { +func (m *GreLink) GetOuterFibId() uint32 { if m != nil { - return m.OuterFibID + return m.OuterFibId } return 0 } -func (m *GreLink) GetSessionID() uint32 { +func (m *GreLink) GetSessionId() uint32 { if m != nil { - return m.SessionID + return m.SessionId } return 0 } @@ -1689,130 +1720,131 @@ func init() { } var fileDescriptor_1ac7cab935c1dc4d = []byte{ - // 1989 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x57, 0xdd, 0x72, 0xdb, 0xc6, - 0x15, 0x16, 0x7f, 0xc4, 0x9f, 0xc3, 0x1f, 0xc1, 0xdb, 0x24, 0x85, 0x95, 0xd8, 0x51, 0x99, 0xba, - 0xd1, 0xb4, 0x13, 0xc9, 0xa2, 0x32, 0xd3, 0xb4, 0x99, 0x5e, 0x80, 0x22, 0x64, 0xd3, 0xa6, 0x40, - 0x16, 0x04, 0x6d, 0xa7, 0xd3, 0x19, 0x0c, 0x48, 0x2c, 0x29, 0x54, 0x20, 0x00, 0x63, 0x97, 0x32, - 0x95, 0x99, 0x3e, 0x43, 0x1f, 0xa2, 0x2f, 0x93, 0xce, 0xf4, 0xa6, 0x97, 0xbd, 0xec, 0xf4, 0xb2, - 0x97, 0x7d, 0x81, 0xce, 0xd9, 0x5d, 0x90, 0x94, 0x6c, 0xa5, 0x37, 0xd2, 0xee, 0x77, 0xce, 0xb7, - 0xbb, 0x38, 0x7b, 0xce, 0xb7, 0x87, 0xf0, 0x64, 0x11, 0xfb, 0x34, 0x64, 0xc7, 0xd7, 0x49, 0x72, - 0x1c, 0x44, 0x9c, 0xa6, 0x33, 0x6f, 0x4a, 0xd9, 0x66, 0x78, 0x94, 0xa4, 0x31, 0x8f, 0x49, 0xf3, - 0x3a, 0x49, 0x8e, 0x36, 0xf6, 0xfd, 0xaf, 0xe6, 0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0xa7, 0x11, 0x3f, 0xf6, 0x92, 0xe0, 0xf8, 0x83, 0xbf, 0xd6, 0xbf, 0xbd, 0x4e, 0x92, 0xad, - 0x1c, 0x9b, 0x94, 0xc4, 0xcf, 0xea, 0xd3, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x4b, 0x63, - 0x16, 0xdc, 0x0f, 0x00, 0x00, + // 2006 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x57, 0x5b, 0x73, 0xdb, 0xc6, + 0x15, 0x16, 0x2f, 0xe2, 0xe5, 0xf0, 0x22, 0x78, 0x9b, 0xa4, 0xb0, 0x62, 0x27, 0x2a, 0x53, 0x37, + 0x9a, 0x76, 0x22, 0x59, 0x54, 0x66, 0x9a, 0x36, 0xd3, 0x07, 0x50, 0x84, 0x6c, 0xda, 0x14, 0xc9, + 0x82, 0xa0, 0xed, 0x74, 0x3a, 0x83, 0x01, 0x89, 0x25, 0x84, 0x0a, 0x04, 0x60, 0xec, 0x52, 0xa2, + 0x32, 0xd3, 0xdf, 0xd0, 0xbf, 0x95, 0x87, 0x3e, 0xb4, 0x4f, 0x9d, 0x3e, 0xb7, 0x6f, 0x7d, 0xec, + 0x1f, 0xe8, 0x9c, 0xdd, 0x05, 0x45, 0xc9, 0x52, 0xfa, 0x42, 0xee, 0x7e, 0xe7, 0x7c, 0x7b, 0x39, + 0x7b, 0x6e, 0x80, 0x67, 0x8b, 0xd8, 0xa3, 0x21, 0x3b, 0xbc, 0x4c, 0x92, 0xc3, 0x20, 0xe2, 0x34, + 0x9d, 0xbb, 0x33, 0xca, 0x6e, 0x86, 0x07, 0x49, 0x1a, 0xf3, 0x98, 0x34, 0x2f, 0x93, 0xe4, 0xe0, + 0x46, 0xbe, 0xfb, 0x95, 0x1f, 0xf0, 0xf3, 0xe5, 0xf4, 0x60, 0x16, 0x2f, 0x0e, 0xfd, 0xd8, 0x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, 0xd6, 0x4a, 0xb7, 0x80, 0xf6, + 0x91, 0x56, 0xbe, 0x0d, 0xb4, 0xb5, 0x4a, 0xeb, 0x9f, 0x79, 0xa8, 0xae, 0x13, 0x26, 0xf9, 0xb5, + 0x0a, 0xb3, 0x9c, 0xb0, 0xd8, 0x17, 0x0f, 0x66, 0x56, 0x39, 0x12, 0x45, 0x41, 0x06, 0xd9, 0x27, + 0x50, 0x5a, 0xb8, 0x8c, 0x2b, 0x87, 0xae, 0x58, 0x6a, 0x46, 0x9a, 0x90, 0x0f, 0xa4, 0x1f, 0x37, + 0xac, 0x7c, 0xe0, 0x91, 0x2f, 0x61, 0x87, 0xc5, 0x98, 0x56, 0x9d, 0x79, 0x10, 0x52, 0xf1, 0xae, + 0xb2, 0xa2, 0x36, 0x25, 0x7c, 0xaa, 0x50, 0x5c, 0x90, 0xd1, 0x59, 0x4a, 0xb9, 0xb0, 0x69, 0xd5, + 0x52, 0x33, 0xf2, 0x29, 0x54, 0xd3, 0x20, 0xf2, 0x1d, 0x16, 0x7c, 0x4f, 0x95, 0x69, 0x2b, 0x08, + 0x8c, 0x83, 0xef, 0x85, 0xc7, 0x4c, 0x97, 0xf3, 0x39, 0x4d, 0xa5, 0xb8, 0x2c, 0xc4, 0x20, 0x21, + 0xa1, 0x80, 0xec, 0x95, 0x23, 0x62, 0x90, 0xa9, 0x9a, 0x5a, 0x49, 0x57, 0xbf, 0x17, 0x73, 0x14, + 0xf2, 0xb5, 0xb0, 0x2a, 0x85, 0x5c, 0x09, 0x5b, 0x6d, 0x65, 0x26, 0x91, 0xa3, 0xea, 0x50, 0x31, + 0xed, 0x97, 0xa6, 0x35, 0x30, 0x6d, 0x6d, 0x8b, 0x94, 0x20, 0xdf, 0x1b, 0x69, 0x39, 0xb4, 0xed, + 0x68, 0x32, 0xb0, 0x9d, 0xde, 0xe0, 0x95, 0x79, 0x62, 0x6b, 0xf9, 0xd6, 0x9f, 0xa1, 0xba, 0xce, + 0xf7, 0x78, 0x36, 0x96, 0xce, 0xd6, 0x7d, 0x84, 0xf2, 0x66, 0x96, 0xce, 0xb2, 0x36, 0xe2, 0x73, + 0xa8, 0x79, 0x8c, 0xaf, 0x15, 0xf2, 0x52, 0xc1, 0x63, 0x3c, 0x53, 0xc0, 0x26, 0x22, 0x0a, 0x94, + 0x31, 0x71, 0x48, 0x9e, 0x40, 0x75, 0xb1, 0x0c, 0x79, 0x30, 0x73, 0x19, 0x57, 0x76, 0xbc, 0x01, + 0x5a, 0xcf, 0xa1, 0xbe, 0x59, 0xd4, 0xc8, 0x1e, 0xd4, 0xcf, 0x63, 0xc6, 0x9d, 0x60, 0x7e, 0x2b, + 0xa0, 0x10, 0xeb, 0xcd, 0x31, 0xa0, 0x5a, 0x7f, 0xcf, 0x41, 0x59, 0x15, 0x34, 0x6c, 0x89, 0x2e, + 0x69, 0xca, 0x30, 0x7e, 0x64, 0xea, 0xca, 0xa6, 0x1f, 0xac, 0x93, 0xbf, 0xbb, 0x0e, 0xbe, 0x32, + 0x8f, 0x9d, 0x45, 0x30, 0x4b, 0x63, 0x46, 0xd3, 0xcb, 0x60, 0x26, 0xb3, 0x6e, 0xd5, 0x6a, 0xf2, + 0xf8, 0x6c, 0x03, 0xc5, 0xa5, 0xd2, 0x95, 0x73, 0xf3, 0xa0, 0x45, 0xf9, 0x62, 0xe9, 0xca, 0xca, + 0x9e, 0x74, 0x0f, 0xea, 0x7c, 0x53, 0x43, 0x46, 0x18, 0xf0, 0x1b, 0x8d, 0xa7, 0x00, 0xb2, 0x59, + 0x73, 0x7c, 0x16, 0x0b, 0x97, 0xa8, 0x58, 0x55, 0x89, 0xbc, 0x60, 0x71, 0xeb, 0x3f, 0x05, 0xa8, + 0xae, 0x4b, 0x28, 0xda, 0x90, 0xb2, 0x48, 0x39, 0x29, 0x0e, 0xd1, 0xec, 0x6e, 0xc4, 0x03, 0x27, + 0xa5, 0x49, 0xe8, 0x5e, 0x67, 0x29, 0x17, 0x21, 0x4b, 0x20, 0xe4, 0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 0xa5, 0xfd, + 0x95, 0xeb, 0xd3, 0x88, 0x1f, 0xba, 0x49, 0x70, 0x78, 0xef, 0x47, 0xfe, 0xb7, 0x97, 0x49, 0xb2, + 0xe1, 0x66, 0xd3, 0x92, 0xf8, 0x1a, 0x3f, 0xfe, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x97, 0x52, + 0x8d, 0xfd, 0x13, 0x10, 0x00, 0x00, } diff --git a/api/models/vpp/interfaces/interface.proto b/api/models/vpp/interfaces/interface.proto index ee3f0b215f..d5ed802618 100644 --- a/api/models/vpp/interfaces/interface.proto +++ b/api/models/vpp/interfaces/interface.proto @@ -22,7 +22,7 @@ message Interface { IPSEC_TUNNEL = 8; VMXNET3_INTERFACE = 9; BOND_INTERFACE = 10; - GRE = 11; + GRE_TUNNEL = 11; }; // Name is mandatory field representing logical name for the interface. @@ -98,6 +98,7 @@ message Interface { IPSecLink ipsec = 105; VmxNet3Link vmx_net3 = 106; BondLink bond = 107; + GreLink gre = 108; }; }; @@ -237,6 +238,6 @@ message GreLink { Type tunnel_type = 1; string src_addr = 2; string dst_addr = 3; - uint32 outerFibID = 4; - uint32 sessionID = 5; + uint32 outer_fib_id = 4; + uint32 session_id = 5; } diff --git a/plugins/vpp/ifplugin/descriptor/interface.go b/plugins/vpp/ifplugin/descriptor/interface.go index 0ef076e442..b2b7915d5c 100644 --- a/plugins/vpp/ifplugin/descriptor/interface.go +++ b/plugins/vpp/ifplugin/descriptor/interface.go @@ -406,7 +406,7 @@ func (d *InterfaceDescriptor) Validate(key string, intf *interfaces.Interface) e return linkMismatchErr } case *interfaces.Interface_Gre: - if intf.Type != interfaces.Interface_GRE { + if intf.Type != interfaces.Interface_GRE_TUNNEL { return linkMismatchErr } case nil: @@ -434,7 +434,7 @@ func (d *InterfaceDescriptor) Validate(key string, intf *interfaces.Interface) e if name, ok := d.bondIDs[intf.GetBond().GetId()]; ok && name != intf.GetName() { return kvs.NewInvalidValueError(ErrBondInterfaceIDExists, "link.bond.id") } - case interfaces.Interface_GRE: + case interfaces.Interface_GRE_TUNNEL: if intf.GetGre().SrcAddr == "" { return kvs.NewInvalidValueError(ErrGreSrcAddrMissing, "link.gre.src_addr") } diff --git a/plugins/vpp/ifplugin/descriptor/interface_crud.go b/plugins/vpp/ifplugin/descriptor/interface_crud.go index 0ac5cb39b6..50d7794934 100644 --- a/plugins/vpp/ifplugin/descriptor/interface_crud.go +++ b/plugins/vpp/ifplugin/descriptor/interface_crud.go @@ -141,7 +141,7 @@ func (d *InterfaceDescriptor) Create(key string, intf *interfaces.Interface) (me } d.bondIDs[intf.GetBond().GetId()] = intf.GetName() - case interfaces.Interface_GRE: + case interfaces.Interface_GRE_TUNNEL: ifIdx, err = d.ifHandler.AddGreTunnel(intf.Name, intf.GetGre()) if err != nil { d.log.Error(err) @@ -244,7 +244,7 @@ func (d *InterfaceDescriptor) Delete(key string, intf *interfaces.Interface, met case interfaces.Interface_BOND_INTERFACE: err = d.ifHandler.DeleteBondInterface(intf.Name, ifIdx) delete(d.bondIDs, intf.GetBond().GetId()) - case interfaces.Interface_GRE: + case interfaces.Interface_GRE_TUNNEL: _, err = d.ifHandler.DelGreTunnel(intf.Name, intf.GetGre()) } if err != nil { diff --git a/plugins/vpp/ifplugin/vppcalls/if_vppcalls.go b/plugins/vpp/ifplugin/vppcalls/if_vppcalls.go index e370121dcf..8a118425f3 100644 --- a/plugins/vpp/ifplugin/vppcalls/if_vppcalls.go +++ b/plugins/vpp/ifplugin/vppcalls/if_vppcalls.go @@ -112,10 +112,9 @@ type InterfaceSpanDetails struct { type GreTunnelDetails struct { SwIfIndex uint32 Instance uint32 - IsIPv6 uint8 TunnelType uint8 - SrcAddress string - DstAddress string + SrcAddress net.IP + DstAddress net.IP OuterFibID uint32 SessionID uint16 } diff --git a/plugins/vpp/ifplugin/vppcalls/vpp1901/gre_vppcalls.go b/plugins/vpp/ifplugin/vppcalls/vpp1901/gre_vppcalls.go index b36911ea92..9916354272 100644 --- a/plugins/vpp/ifplugin/vppcalls/vpp1901/gre_vppcalls.go +++ b/plugins/vpp/ifplugin/vppcalls/vpp1901/gre_vppcalls.go @@ -27,7 +27,7 @@ func (h *InterfaceVppHandler) greAddDelTunnel(isAdd uint8, greLink *interfaces.G return 0, err } - if greLink.TunnelType == interfaces.GreLink_ERSPAN && greLink.SessionID > 1023 { + if greLink.TunnelType == interfaces.GreLink_ERSPAN && greLink.SessionId > 1023 { err := errors.New("set session id for ERSPAN tunnel type") return 0, err } @@ -35,8 +35,8 @@ func (h *InterfaceVppHandler) greAddDelTunnel(isAdd uint8, greLink *interfaces.G IsAdd: isAdd, TunnelType: uint8(greLink.TunnelType), Instance: ^uint32(0), - OuterFibID: greLink.OuterFibID, - SessionID: uint16(greLink.SessionID), + OuterFibID: greLink.OuterFibId, + SessionID: uint16(greLink.SessionId), } var isSrcIPv6, isDstIPv6 bool @@ -103,19 +103,18 @@ func (h *InterfaceVppHandler) DumpGre(ifIdx uint32) ([]*vppcalls.GreTunnelDetail return nil, fmt.Errorf("failed to dump span: %v", err) } - var srcAddr, dstAddr string + var srcAddr, dstAddr net.IP if greDetails.IsIPv6 == 1 { - srcAddr = net.IP(greDetails.SrcAddress).To16().String() - dstAddr = net.IP(greDetails.DstAddress).To16().String() + srcAddr = net.IP(greDetails.SrcAddress) + dstAddr = net.IP(greDetails.DstAddress) } else { - srcAddr = net.IP(greDetails.SrcAddress[:4]).To4().String() - dstAddr = net.IP(greDetails.DstAddress[:4]).To4().String() + srcAddr = net.IP(greDetails.SrcAddress[:4]) + dstAddr = net.IP(greDetails.DstAddress[:4]) } gre := &vppcalls.GreTunnelDetails{ SwIfIndex: greDetails.SwIfIndex, Instance: greDetails.Instance, - IsIPv6: greDetails.IsIPv6, TunnelType: greDetails.TunnelType, SrcAddress: srcAddr, DstAddress: dstAddr, diff --git a/plugins/vpp/ifplugin/vppcalls/vpp1904/gre_vppcalls.go b/plugins/vpp/ifplugin/vppcalls/vpp1904/gre_vppcalls.go index f82181eb9c..410d53f1ea 100644 --- a/plugins/vpp/ifplugin/vppcalls/vpp1904/gre_vppcalls.go +++ b/plugins/vpp/ifplugin/vppcalls/vpp1904/gre_vppcalls.go @@ -27,7 +27,7 @@ func (h *InterfaceVppHandler) greAddDelTunnel(isAdd uint8, greLink *interfaces.G return 0, err } - if greLink.TunnelType == interfaces.GreLink_ERSPAN && greLink.SessionID > 1023 { + if greLink.TunnelType == interfaces.GreLink_ERSPAN && greLink.SessionId > 1023 { err := errors.New("set session id for ERSPAN tunnel type") return 0, err } @@ -35,8 +35,8 @@ func (h *InterfaceVppHandler) greAddDelTunnel(isAdd uint8, greLink *interfaces.G IsAdd: isAdd, TunnelType: uint8(greLink.TunnelType), Instance: ^uint32(0), - OuterFibID: greLink.OuterFibID, - SessionID: uint16(greLink.SessionID), + OuterFibID: greLink.OuterFibId, + SessionID: uint16(greLink.SessionId), } var isSrcIPv6, isDstIPv6 bool @@ -103,19 +103,18 @@ func (h *InterfaceVppHandler) DumpGre(ifIdx uint32) ([]*vppcalls.GreTunnelDetail return nil, fmt.Errorf("failed to dump span: %v", err) } - var srcAddr, dstAddr string + var srcAddr, dstAddr net.IP if greDetails.IsIPv6 == 1 { - srcAddr = net.IP(greDetails.SrcAddress).To16().String() - dstAddr = net.IP(greDetails.DstAddress).To16().String() + srcAddr = net.IP(greDetails.SrcAddress) + dstAddr = net.IP(greDetails.DstAddress) } else { - srcAddr = net.IP(greDetails.SrcAddress[:4]).To4().String() - dstAddr = net.IP(greDetails.DstAddress[:4]).To4().String() + srcAddr = net.IP(greDetails.SrcAddress[:4]) + dstAddr = net.IP(greDetails.DstAddress[:4]) } gre := &vppcalls.GreTunnelDetails{ SwIfIndex: greDetails.SwIfIndex, Instance: greDetails.Instance, - IsIPv6: greDetails.IsIPv6, TunnelType: greDetails.TunnelType, SrcAddress: srcAddr, DstAddress: dstAddr, diff --git a/plugins/vpp/ifplugin/vppcalls/vpp1908/gre_vppcalls.go b/plugins/vpp/ifplugin/vppcalls/vpp1908/gre_vppcalls.go index f596889965..9c964fd7e7 100644 --- a/plugins/vpp/ifplugin/vppcalls/vpp1908/gre_vppcalls.go +++ b/plugins/vpp/ifplugin/vppcalls/vpp1908/gre_vppcalls.go @@ -27,7 +27,7 @@ func (h *InterfaceVppHandler) greAddDelTunnel(isAdd uint8, greLink *interfaces.G return 0, err } - if greLink.TunnelType == interfaces.GreLink_ERSPAN && greLink.SessionID > 1023 { + if greLink.TunnelType == interfaces.GreLink_ERSPAN && greLink.SessionId > 1023 { err := errors.New("set session id for ERSPAN tunnel type") return 0, err } @@ -35,8 +35,8 @@ func (h *InterfaceVppHandler) greAddDelTunnel(isAdd uint8, greLink *interfaces.G IsAdd: isAdd, TunnelType: uint8(greLink.TunnelType), Instance: ^uint32(0), - OuterFibID: greLink.OuterFibID, - SessionID: uint16(greLink.SessionID), + OuterFibID: greLink.OuterFibId, + SessionID: uint16(greLink.SessionId), } var isSrcIPv6, isDstIPv6 bool @@ -103,19 +103,18 @@ func (h *InterfaceVppHandler) DumpGre(ifIdx uint32) ([]*vppcalls.GreTunnelDetail return nil, fmt.Errorf("failed to dump span: %v", err) } - var srcAddr, dstAddr string + var srcAddr, dstAddr net.IP if greDetails.IsIPv6 == 1 { - srcAddr = net.IP(greDetails.SrcAddress).To16().String() - dstAddr = net.IP(greDetails.DstAddress).To16().String() + srcAddr = net.IP(greDetails.SrcAddress) + dstAddr = net.IP(greDetails.DstAddress) } else { - srcAddr = net.IP(greDetails.SrcAddress[:4]).To4().String() - dstAddr = net.IP(greDetails.DstAddress[:4]).To4().String() + srcAddr = net.IP(greDetails.SrcAddress[:4]) + dstAddr = net.IP(greDetails.DstAddress[:4]) } gre := &vppcalls.GreTunnelDetails{ SwIfIndex: greDetails.SwIfIndex, Instance: greDetails.Instance, - IsIPv6: greDetails.IsIPv6, TunnelType: greDetails.TunnelType, SrcAddress: srcAddr, DstAddress: dstAddr, diff --git a/tests/integration/vpp/080_gre_test.go b/tests/integration/vpp/080_gre_test.go index bd7a999ba9..455e418fde 100644 --- a/tests/integration/vpp/080_gre_test.go +++ b/tests/integration/vpp/080_gre_test.go @@ -24,8 +24,8 @@ func TestGre(t *testing.T) { name: "create ERSPAN GRE tunnel with IPv4", greLink: &interfaces.GreLink{ TunnelType: interfaces.GreLink_ERSPAN, - SrcAddr: "10.10.10.10", - DstAddr: "20.20.20.20", + SrcAddr: "2000::8:23", + DstAddr: "2019::8:23", }, isFail: false, }, @@ -35,7 +35,7 @@ func TestGre(t *testing.T) { TunnelType: interfaces.GreLink_ERSPAN, SrcAddr: "10.10.10.10", DstAddr: "20.20.20.20", - SessionID: 1024, + SessionId: 1024, }, isFail: true, }, @@ -71,7 +71,7 @@ func TestGre(t *testing.T) { greLink: &interfaces.GreLink{ TunnelType: interfaces.GreLink_ERSPAN, SrcAddr: "10.10.10.10", - DstAddr: "2019::08:23", + DstAddr: "2019::8:23", }, isFail: true, }, @@ -101,17 +101,17 @@ func TestGre(t *testing.T) { if uint8(test.greLink.TunnelType) != gre.TunnelType { t.Fatalf("expected tunnel type address <%d>, got: <%d>", test.greLink.TunnelType, gre.TunnelType) } - if test.greLink.SrcAddr != gre.SrcAddress { + if test.greLink.SrcAddr != gre.SrcAddress.String() { t.Fatalf("expected source address <%s>, got: <%s>", test.greLink.SrcAddr, gre.SrcAddress) } - if test.greLink.DstAddr != gre.DstAddress { + if test.greLink.DstAddr != gre.DstAddress.String() { t.Fatalf("expected destination address <%s>, got: <%s>", test.greLink.DstAddr, gre.DstAddress) } - if test.greLink.OuterFibID != gre.OuterFibID { - t.Fatalf("expected outer FIB id <%d>, got: <%d>", test.greLink.OuterFibID, gre.OuterFibID) + if test.greLink.OuterFibId != gre.OuterFibID { + t.Fatalf("expected outer FIB id <%d>, got: <%d>", test.greLink.OuterFibId, gre.OuterFibID) } - if uint16(test.greLink.SessionID) != gre.SessionID { - t.Fatalf("expected session id <%d>, got: <%d>", test.greLink.SessionID, gre.SessionID) + if uint16(test.greLink.SessionId) != gre.SessionID { + t.Fatalf("expected session id <%d>, got: <%d>", test.greLink.SessionId, gre.SessionID) } }) } From 9a5719c313850f5aa44745b4a6a4b0b33a8634c6 Mon Sep 17 00:00:00 2001 From: rewenset Date: Tue, 27 Aug 2019 17:59:05 +0300 Subject: [PATCH 4/7] add GRE to interfaces dump --- plugins/vpp/ifplugin/descriptor/interface.go | 4 ++ .../vpp1904/dump_interface_vppcalls.go | 57 +++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/plugins/vpp/ifplugin/descriptor/interface.go b/plugins/vpp/ifplugin/descriptor/interface.go index b2b7915d5c..cf42a20755 100644 --- a/plugins/vpp/ifplugin/descriptor/interface.go +++ b/plugins/vpp/ifplugin/descriptor/interface.go @@ -283,6 +283,10 @@ func (d *InterfaceDescriptor) equivalentTypeSpecificConfig(oldIntf, newIntf *int if !d.equivalentBond(oldIntf.GetBond(), newIntf.GetBond()) { return false } + case interfaces.Interface_GRE_TUNNEL: + if !proto.Equal(oldIntf.GetGre(), newIntf.GetGre()) { + return false + } } return true } diff --git a/plugins/vpp/ifplugin/vppcalls/vpp1904/dump_interface_vppcalls.go b/plugins/vpp/ifplugin/vppcalls/vpp1904/dump_interface_vppcalls.go index 896d1dd1c1..3f9d35ad88 100644 --- a/plugins/vpp/ifplugin/vppcalls/vpp1904/dump_interface_vppcalls.go +++ b/plugins/vpp/ifplugin/vppcalls/vpp1904/dump_interface_vppcalls.go @@ -25,6 +25,7 @@ import ( vpp_ipsec "github.com/ligato/vpp-agent/api/models/vpp/ipsec" "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1904/bond" "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1904/dhcp" + "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1904/gre" binapi_interface "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1904/interfaces" "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1904/ip" "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1904/ipsec" @@ -244,6 +245,11 @@ func (h *InterfaceVppHandler) DumpInterfaces() (map[uint32]*vppcalls.InterfaceDe return nil, err } + err = h.dumpGreDetails(ifs) + if err != nil { + return nil, err + } + // Rx-placement dump is last since it uses interface type-specific data err = h.dumpRxPlacement(ifs) if err != nil { @@ -820,6 +826,41 @@ func (h *InterfaceVppHandler) dumpBondDetails(ifs map[uint32]*vppcalls.Interface return nil } +func (h *InterfaceVppHandler) dumpGreDetails(ifs map[uint32]*vppcalls.InterfaceDetails) error { + reqCtx := h.callsChannel.SendMultiRequest(&gre.GreTunnelDump{SwIfIndex: ^uint32(0)}) + for { + greDetails := &gre.GreTunnelDetails{} + stop, err := reqCtx.ReceiveReply(greDetails) + if stop { + break + } + if err != nil { + return fmt.Errorf("failed to dump span: %v", err) + } + + var srcAddr, dstAddr net.IP + if greDetails.IsIPv6 == 1 { + srcAddr = net.IP(greDetails.SrcAddress) + dstAddr = net.IP(greDetails.DstAddress) + } else { + srcAddr = net.IP(greDetails.SrcAddress[:4]) + dstAddr = net.IP(greDetails.DstAddress[:4]) + } + + ifs[greDetails.SwIfIndex].Interface.Link = &interfaces.Interface_Gre{ + Gre: &interfaces.GreLink{ + TunnelType: getGreTunnelType(greDetails.TunnelType), + SrcAddr: srcAddr.String(), + DstAddr: dstAddr.String(), + OuterFibId: greDetails.OuterFibID, + SessionId: uint32(greDetails.SessionID), + }, + } + ifs[greDetails.SwIfIndex].Interface.Type = interfaces.Interface_GRE_TUNNEL + } + return nil +} + // dumpUnnumberedDetails returns a map of unnumbered interface indexes, every with interface index of element with IP func (h *InterfaceVppHandler) dumpUnnumberedDetails() (map[uint32]uint32, error) { unIfMap := make(map[uint32]uint32) // unnumbered/ip-interface @@ -913,6 +954,9 @@ func guessInterfaceType(ifName string) interfaces.Interface_Type { case strings.HasPrefix(ifName, "Bond"): return interfaces.Interface_BOND_INTERFACE + case strings.HasPrefix(ifName, "gre"): + return interfaces.Interface_GRE_TUNNEL + default: return interfaces.Interface_DPDK } @@ -1000,6 +1044,19 @@ func getTagRwOption(op uint32) interfaces.SubInterface_TagRewriteOptions { } } +func getGreTunnelType(tt uint8) interfaces.GreLink_Type { + switch tt { + case 0: + return interfaces.GreLink_L3 + case 1: + return interfaces.GreLink_TEB + case 2: + return interfaces.GreLink_ERSPAN + default: + return interfaces.GreLink_L3 + } +} + func uintToBool(value uint8) bool { if value == 0 { return false From 4832a99d98036fbdba91eac303af852ccd65984d Mon Sep 17 00:00:00 2001 From: rewenset Date: Wed, 28 Aug 2019 13:20:35 +0300 Subject: [PATCH 5/7] Add UNKNOWN to types of GRE tunnel --- api/models/vpp/interfaces/interface.pb.go | 271 +++++++++--------- api/models/vpp/interfaces/interface.proto | 7 +- plugins/vpp/ifplugin/descriptor/interface.go | 6 + plugins/vpp/ifplugin/vppcalls/if_vppcalls.go | 2 - .../vpp1904/dump_interface_vppcalls.go | 2 +- .../ifplugin/vppcalls/vpp1904/gre_vppcalls.go | 49 +--- tests/integration/vpp/080_gre_test.go | 77 +++-- 7 files changed, 204 insertions(+), 210 deletions(-) diff --git a/api/models/vpp/interfaces/interface.pb.go b/api/models/vpp/interfaces/interface.pb.go index 90b4a115d6..5db5c1723b 100644 --- a/api/models/vpp/interfaces/interface.pb.go +++ b/api/models/vpp/interfaces/interface.pb.go @@ -254,21 +254,24 @@ func (BondLink_LoadBalance) EnumDescriptor() ([]byte, []int) { type GreLink_Type int32 const ( - GreLink_L3 GreLink_Type = 0 - GreLink_TEB GreLink_Type = 1 - GreLink_ERSPAN GreLink_Type = 2 + GreLink_UNKNOWN GreLink_Type = 0 + GreLink_L3 GreLink_Type = 1 + GreLink_TEB GreLink_Type = 2 + GreLink_ERSPAN GreLink_Type = 3 ) var GreLink_Type_name = map[int32]string{ - 0: "L3", - 1: "TEB", - 2: "ERSPAN", + 0: "UNKNOWN", + 1: "L3", + 2: "TEB", + 3: "ERSPAN", } var GreLink_Type_value = map[string]int32{ - "L3": 0, - "TEB": 1, - "ERSPAN": 2, + "UNKNOWN": 0, + "L3": 1, + "TEB": 2, + "ERSPAN": 3, } func (x GreLink_Type) String() string { @@ -1657,7 +1660,7 @@ func (m *GreLink) GetTunnelType() GreLink_Type { if m != nil { return m.TunnelType } - return GreLink_L3 + return GreLink_UNKNOWN } func (m *GreLink) GetSrcAddr() string { @@ -1720,131 +1723,131 @@ func init() { } var fileDescriptor_1ac7cab935c1dc4d = []byte{ - // 2006 bytes of a gzipped FileDescriptorProto + // 2007 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x57, 0x5b, 0x73, 0xdb, 0xc6, - 0x15, 0x16, 0x2f, 0xe2, 0xe5, 0xf0, 0x22, 0x78, 0x9b, 0xa4, 0xb0, 0x62, 0x27, 0x2a, 0x53, 0x37, + 0x15, 0x16, 0x2f, 0xe2, 0xe5, 0xf0, 0x22, 0x78, 0x9b, 0xa4, 0xb0, 0x62, 0x27, 0x2a, 0x5b, 0x37, 0x9a, 0x76, 0x22, 0x59, 0x54, 0x66, 0x9a, 0x36, 0xd3, 0x07, 0x50, 0x84, 0x6c, 0xda, 0x14, 0xc9, 0x82, 0xa0, 0xed, 0x74, 0x3a, 0x83, 0x01, 0x89, 0x25, 0x84, 0x0a, 0x04, 0x60, 0xec, 0x52, 0xa2, - 0x32, 0xd3, 0xdf, 0xd0, 0xbf, 0x95, 0x87, 0x3e, 0xb4, 0x4f, 0x9d, 0x3e, 0xb7, 0x6f, 0x7d, 0xec, - 0x1f, 0xe8, 0x9c, 0xdd, 0x05, 0x45, 0xc9, 0x52, 0xfa, 0x42, 0xee, 0x7e, 0xe7, 0x7c, 0x7b, 0x39, - 0x7b, 0x6e, 0x80, 0x67, 0x8b, 0xd8, 0xa3, 0x21, 0x3b, 0xbc, 0x4c, 0x92, 0xc3, 0x20, 0xe2, 0x34, - 0x9d, 0xbb, 0x33, 0xca, 0x6e, 0x86, 0x07, 0x49, 0x1a, 0xf3, 0x98, 0x34, 0x2f, 0x93, 0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0xb5, 0x22, 0xd9, 0x81, 0x9a, 0x6d, 0x19, - 0x83, 0x71, 0xdf, 0xb0, 0xcd, 0xa3, 0x23, 0x6d, 0xfb, 0x36, 0xd0, 0xd6, 0x4a, 0xb7, 0x80, 0xf6, - 0x91, 0x56, 0xbe, 0x0d, 0xb4, 0xb5, 0x4a, 0xeb, 0x9f, 0x79, 0xa8, 0xae, 0x13, 0x26, 0xf9, 0xb5, - 0x0a, 0xb3, 0x9c, 0xb0, 0xd8, 0x17, 0x0f, 0x66, 0x56, 0x39, 0x12, 0x45, 0x41, 0x06, 0xd9, 0x27, - 0x50, 0x5a, 0xb8, 0x8c, 0x2b, 0x87, 0xae, 0x58, 0x6a, 0x46, 0x9a, 0x90, 0x0f, 0xa4, 0x1f, 0x37, - 0xac, 0x7c, 0xe0, 0x91, 0x2f, 0x61, 0x87, 0xc5, 0x98, 0x56, 0x9d, 0x79, 0x10, 0x52, 0xf1, 0xae, - 0xb2, 0xa2, 0x36, 0x25, 0x7c, 0xaa, 0x50, 0x5c, 0x90, 0xd1, 0x59, 0x4a, 0xb9, 0xb0, 0x69, 0xd5, - 0x52, 0x33, 0xf2, 0x29, 0x54, 0xd3, 0x20, 0xf2, 0x1d, 0x16, 0x7c, 0x4f, 0x95, 0x69, 0x2b, 0x08, - 0x8c, 0x83, 0xef, 0x85, 0xc7, 0x4c, 0x97, 0xf3, 0x39, 0x4d, 0xa5, 0xb8, 0x2c, 0xc4, 0x20, 0x21, - 0xa1, 0x80, 0xec, 0x95, 0x23, 0x62, 0x90, 0xa9, 0x9a, 0x5a, 0x49, 0x57, 0xbf, 0x17, 0x73, 0x14, - 0xf2, 0xb5, 0xb0, 0x2a, 0x85, 0x5c, 0x09, 0x5b, 0x6d, 0x65, 0x26, 0x91, 0xa3, 0xea, 0x50, 0x31, - 0xed, 0x97, 0xa6, 0x35, 0x30, 0x6d, 0x6d, 0x8b, 0x94, 0x20, 0xdf, 0x1b, 0x69, 0x39, 0xb4, 0xed, - 0x68, 0x32, 0xb0, 0x9d, 0xde, 0xe0, 0x95, 0x79, 0x62, 0x6b, 0xf9, 0xd6, 0x9f, 0xa1, 0xba, 0xce, - 0xf7, 0x78, 0x36, 0x96, 0xce, 0xd6, 0x7d, 0x84, 0xf2, 0x66, 0x96, 0xce, 0xb2, 0x36, 0xe2, 0x73, - 0xa8, 0x79, 0x8c, 0xaf, 0x15, 0xf2, 0x52, 0xc1, 0x63, 0x3c, 0x53, 0xc0, 0x26, 0x22, 0x0a, 0x94, - 0x31, 0x71, 0x48, 0x9e, 0x40, 0x75, 0xb1, 0x0c, 0x79, 0x30, 0x73, 0x19, 0x57, 0x76, 0xbc, 0x01, - 0x5a, 0xcf, 0xa1, 0xbe, 0x59, 0xd4, 0xc8, 0x1e, 0xd4, 0xcf, 0x63, 0xc6, 0x9d, 0x60, 0x7e, 0x2b, - 0xa0, 0x10, 0xeb, 0xcd, 0x31, 0xa0, 0x5a, 0x7f, 0xcf, 0x41, 0x59, 0x15, 0x34, 0x6c, 0x89, 0x2e, - 0x69, 0xca, 0x30, 0x7e, 0x64, 0xea, 0xca, 0xa6, 0x1f, 0xac, 0x93, 0xbf, 0xbb, 0x0e, 0xbe, 0x32, - 0x8f, 0x9d, 0x45, 0x30, 0x4b, 0x63, 0x46, 0xd3, 0xcb, 0x60, 0x26, 0xb3, 0x6e, 0xd5, 0x6a, 0xf2, - 0xf8, 0x6c, 0x03, 0xc5, 0xa5, 0xd2, 0x95, 0x73, 0xf3, 0xa0, 0x45, 0xf9, 0x62, 0xe9, 0xca, 0xca, - 0x9e, 0x74, 0x0f, 0xea, 0x7c, 0x53, 0x43, 0x46, 0x18, 0xf0, 0x1b, 0x8d, 0xa7, 0x00, 0xb2, 0x59, - 0x73, 0x7c, 0x16, 0x0b, 0x97, 0xa8, 0x58, 0x55, 0x89, 0xbc, 0x60, 0x71, 0xeb, 0x3f, 0x05, 0xa8, - 0xae, 0x4b, 0x28, 0xda, 0x90, 0xb2, 0x48, 0x39, 0x29, 0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4, 0x09, 0xf9, 0x40, 0xfa, 0x71, + 0xc3, 0xca, 0x07, 0x1e, 0xf9, 0x02, 0x76, 0x58, 0x8c, 0x69, 0xd5, 0x99, 0x07, 0x21, 0x15, 0xef, + 0x2a, 0x2b, 0x6a, 0x53, 0xc2, 0xa7, 0x0a, 0xc5, 0x05, 0x19, 0x9d, 0xa5, 0x94, 0x0b, 0x9b, 0x56, + 0x2d, 0x35, 0x23, 0x9f, 0x42, 0x35, 0x0d, 0x22, 0xdf, 0x61, 0xc1, 0x77, 0x54, 0x99, 0xb6, 0x82, + 0xc0, 0x38, 0xf8, 0x4e, 0x78, 0xcc, 0x74, 0x39, 0x9f, 0xd3, 0x54, 0x8a, 0xcb, 0x42, 0x0c, 0x12, + 0x12, 0x0a, 0xc8, 0x5e, 0x39, 0x22, 0x06, 0x99, 0xaa, 0xa9, 0x95, 0x74, 0xf5, 0x07, 0x31, 0x47, + 0x21, 0x5f, 0x0b, 0xab, 0x52, 0xc8, 0x95, 0xb0, 0xd5, 0x56, 0x66, 0x12, 0x39, 0xaa, 0x0e, 0x15, + 0xd3, 0x7e, 0x69, 0x5a, 0x03, 0xd3, 0xd6, 0xb6, 0x48, 0x09, 0xf2, 0xbd, 0x91, 0x96, 0x43, 0xdb, + 0x8e, 0x26, 0x03, 0xdb, 0xe9, 0x0d, 0x5e, 0x99, 0x27, 0xb6, 0x96, 0x6f, 0xfd, 0x05, 0xaa, 0xeb, + 0x7c, 0x8f, 0x67, 0x63, 0xe9, 0x6c, 0xdd, 0x47, 0x28, 0x6f, 0x66, 0xe9, 0x2c, 0x6b, 0x23, 0x3e, + 0x87, 0x9a, 0xc7, 0xf8, 0x5a, 0x21, 0x2f, 0x15, 0x3c, 0xc6, 0x33, 0x05, 0x6c, 0x22, 0xa2, 0x40, + 0x19, 0x13, 0x87, 0xe4, 0x09, 0x54, 0x17, 0xcb, 0x90, 0x07, 0x33, 0x97, 0x71, 0x65, 0xc7, 0x1b, + 0xa0, 0xf5, 0x1c, 0xea, 0x9b, 0x45, 0x8d, 0xec, 0x41, 0xfd, 0x3c, 0x66, 0xdc, 0x09, 0xe6, 0xb7, + 0x02, 0x0a, 0xb1, 0xde, 0x1c, 0x03, 0xaa, 0xf5, 0x8f, 0x1c, 0x94, 0x55, 0x41, 0xc3, 0x96, 0xe8, + 0x92, 0xa6, 0x0c, 0xe3, 0x47, 0xa6, 0xae, 0x6c, 0xfa, 0xc1, 0x3a, 0xf9, 0xbb, 0xeb, 0xe0, 0x2b, + 0xf3, 0xd8, 0x59, 0x04, 0xb3, 0x34, 0x66, 0x34, 0xbd, 0x0c, 0x66, 0x32, 0xeb, 0x56, 0xad, 0x26, + 0x8f, 0xcf, 0x36, 0x50, 0x5c, 0x2a, 0x5d, 0x39, 0x37, 0x0f, 0x5a, 0x94, 0x2f, 0x96, 0xae, 0xac, + 0xec, 0x49, 0xf7, 0xa0, 0xce, 0x37, 0x35, 0x64, 0x84, 0x01, 0xbf, 0xd1, 0x78, 0x0a, 0x20, 0x9b, + 0x35, 0xc7, 0x67, 0xb1, 0x70, 0x89, 0x8a, 0x55, 0x95, 0xc8, 0x0b, 0x16, 0xb7, 0xfe, 0x53, 0x80, + 0xea, 0xba, 0x84, 0xa2, 0x0d, 0x29, 0x8b, 0x94, 0x93, 0xe2, 0x10, 0xcd, 0xee, 0x46, 0x3c, 0x70, + 0x52, 0x9a, 0x84, 0xee, 0x75, 0x96, 0x72, 0x11, 0xb2, 0x04, 0x42, 0x1e, 0x43, 0x25, 0x8c, 0x67, + 0x6e, 0x88, 0xe5, 0x4b, 0xda, 0xb8, 0x2c, 0xe6, 0xbd, 0x44, 0xb8, 0x13, 0x5d, 0xc4, 0x9c, 0xa2, + 0x4c, 0xfa, 0x69, 0x45, 0x02, 0x52, 0x28, 0x79, 0x2c, 0x09, 0x32, 0x4f, 0x15, 0xc0, 0x38, 0x09, + 0xf0, 0xd0, 0x8a, 0x89, 0x52, 0xe9, 0xa8, 0x6a, 0x2d, 0x14, 0x1f, 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b, 0xdb, 0x42, 0x62, 0xff, 0xf8, 0x2b, 0x2d, 0x27, + 0x06, 0xed, 0x63, 0x2d, 0xdf, 0xfa, 0x6f, 0x0e, 0xca, 0xaa, 0x95, 0x25, 0xbf, 0x87, 0x1a, 0x5f, + 0x46, 0x11, 0x0d, 0x1d, 0xf1, 0x11, 0x29, 0x0b, 0xe1, 0x93, 0x07, 0x1a, 0x5f, 0xd9, 0x66, 0x82, + 0x24, 0x88, 0xb6, 0xec, 0x31, 0x54, 0xb2, 0x2c, 0xaf, 0xf2, 0x62, 0x59, 0xa5, 0x78, 0x14, 0x65, + 0xf9, 0x5d, 0x65, 0xc3, 0xb2, 0x4a, 0xee, 0x98, 0xe4, 0xe2, 0x25, 0xa7, 0xa9, 0x33, 0x0f, 0x44, + 0x3b, 0xa3, 0xd2, 0xa0, 0xc0, 0x4e, 0x03, 0xec, 0x69, 0x9e, 0x02, 0x30, 0xca, 0x30, 0xfd, 0xa2, + 0x5c, 0x26, 0xc1, 0xaa, 0x42, 0x7a, 0x5e, 0xeb, 0xf9, 0x7d, 0x0d, 0x2c, 0x5e, 0xf8, 0x58, 0xde, + 0xd3, 0x36, 0x3b, 0x5a, 0x9e, 0x00, 0x94, 0x4c, 0x6b, 0x3c, 0x32, 0x06, 0x5a, 0xa1, 0xf3, 0xea, + 0xfb, 0x7f, 0x7f, 0x96, 0xfb, 0x63, 0x77, 0xe3, 0xd3, 0x3c, 0x0c, 0x7c, 0x97, 0xc7, 0xf8, 0xd9, + 0xfd, 0xa5, 0xeb, 0xd3, 0x88, 0x1f, 0xba, 0x49, 0x70, 0x78, 0xef, 0x17, 0xff, 0x37, 0x97, 0x49, + 0xb2, 0xe1, 0x73, 0xd3, 0x92, 0xf8, 0x34, 0x3f, 0xfe, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa6, + 0x04, 0xf7, 0xaa, 0x20, 0x10, 0x00, 0x00, } diff --git a/api/models/vpp/interfaces/interface.proto b/api/models/vpp/interfaces/interface.proto index d5ed802618..6d943cd4c6 100644 --- a/api/models/vpp/interfaces/interface.proto +++ b/api/models/vpp/interfaces/interface.proto @@ -231,9 +231,10 @@ message BondLink { message GreLink { enum Type { - L3 = 0; // L3 GRE (i.e. this tunnel is in L3 mode) - TEB = 1; // Transparent Ethernet Bridging - the tunnel is in L2 mode - ERSPAN = 2; // ERSPAN - the tunnel is for port mirror SPAN output + UNKNOWN = 0; + L3 = 1; // L3 GRE (i.e. this tunnel is in L3 mode) + TEB = 2; // Transparent Ethernet Bridging - the tunnel is in L2 mode + ERSPAN = 3; // ERSPAN - the tunnel is for port mirror SPAN output }; Type tunnel_type = 1; string src_addr = 2; diff --git a/plugins/vpp/ifplugin/descriptor/interface.go b/plugins/vpp/ifplugin/descriptor/interface.go index cf42a20755..822f5b7944 100644 --- a/plugins/vpp/ifplugin/descriptor/interface.go +++ b/plugins/vpp/ifplugin/descriptor/interface.go @@ -110,6 +110,9 @@ var ( // ErrBondInterfaceIDExists is returned when the bond interface uses existing ID value ErrBondInterfaceIDExists = errors.Errorf("Bond interface ID already exists") + // ErrGreBadTunnelType is returned when tunnel type for GRE was not set or set to UNKNOWN + ErrGreBadTunnelType = errors.Errorf("bad tunnel type for GRE") + // ErrGreSrcAddrMissing is returned when source address was not set or set to an empty string. ErrGreSrcAddrMissing = errors.Errorf("missing source address for GRE tunnel") @@ -439,6 +442,9 @@ func (d *InterfaceDescriptor) Validate(key string, intf *interfaces.Interface) e return kvs.NewInvalidValueError(ErrBondInterfaceIDExists, "link.bond.id") } case interfaces.Interface_GRE_TUNNEL: + if intf.GetGre().TunnelType == interfaces.GreLink_UNKNOWN { + return kvs.NewInvalidValueError(ErrGreBadTunnelType, "link.gre.tunnel_type") + } if intf.GetGre().SrcAddr == "" { return kvs.NewInvalidValueError(ErrGreSrcAddrMissing, "link.gre.src_addr") } diff --git a/plugins/vpp/ifplugin/vppcalls/if_vppcalls.go b/plugins/vpp/ifplugin/vppcalls/if_vppcalls.go index 8a118425f3..faef72e662 100644 --- a/plugins/vpp/ifplugin/vppcalls/if_vppcalls.go +++ b/plugins/vpp/ifplugin/vppcalls/if_vppcalls.go @@ -211,8 +211,6 @@ type InterfaceVppAPI interface { AddGreTunnel(ifName string, greLink *interfaces.GreLink) (uint32, error) // DelGreTunnel removes GRE interface. DelGreTunnel(ifName string, greLink *interfaces.GreLink) (uint32, error) - // DumpGre dumps GRE interface (TODO: move this to `DumpInterfaceByType`). - DumpGre(ifIdx uint32) ([]*GreTunnelDetails, error) } // InterfaceVppRead provides read methods for interface plugin diff --git a/plugins/vpp/ifplugin/vppcalls/vpp1904/dump_interface_vppcalls.go b/plugins/vpp/ifplugin/vppcalls/vpp1904/dump_interface_vppcalls.go index 3f9d35ad88..c64bef77c3 100644 --- a/plugins/vpp/ifplugin/vppcalls/vpp1904/dump_interface_vppcalls.go +++ b/plugins/vpp/ifplugin/vppcalls/vpp1904/dump_interface_vppcalls.go @@ -1053,7 +1053,7 @@ func getGreTunnelType(tt uint8) interfaces.GreLink_Type { case 2: return interfaces.GreLink_ERSPAN default: - return interfaces.GreLink_L3 + return interfaces.GreLink_UNKNOWN } } diff --git a/plugins/vpp/ifplugin/vppcalls/vpp1904/gre_vppcalls.go b/plugins/vpp/ifplugin/vppcalls/vpp1904/gre_vppcalls.go index 410d53f1ea..31ae680634 100644 --- a/plugins/vpp/ifplugin/vppcalls/vpp1904/gre_vppcalls.go +++ b/plugins/vpp/ifplugin/vppcalls/vpp1904/gre_vppcalls.go @@ -2,15 +2,18 @@ package vpp1904 import ( "errors" - "fmt" "net" interfaces "github.com/ligato/vpp-agent/api/models/vpp/interfaces" "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1904/gre" - "github.com/ligato/vpp-agent/plugins/vpp/ifplugin/vppcalls" ) func (h *InterfaceVppHandler) greAddDelTunnel(isAdd uint8, greLink *interfaces.GreLink) (uint32, error) { + if greLink.TunnelType == interfaces.GreLink_UNKNOWN { + err := errors.New("bad GRE tunnel type") + return 0, err + } + greSource := net.ParseIP(greLink.SrcAddr) if greSource == nil { err := errors.New("bad source address for GRE tunnel") @@ -33,7 +36,7 @@ func (h *InterfaceVppHandler) greAddDelTunnel(isAdd uint8, greLink *interfaces.G } req := &gre.GreAddDelTunnel{ IsAdd: isAdd, - TunnelType: uint8(greLink.TunnelType), + TunnelType: uint8(greLink.TunnelType - 1), Instance: ^uint32(0), OuterFibID: greLink.OuterFibId, SessionID: uint16(greLink.SessionId), @@ -85,43 +88,3 @@ func (h *InterfaceVppHandler) DelGreTunnel(ifName string, greLink *interfaces.Gr } return swIfIndex, h.RemoveInterfaceTag(ifName, swIfIndex) } - -// DumpGre dumps GRE interface. -func (h *InterfaceVppHandler) DumpGre(ifIdx uint32) ([]*vppcalls.GreTunnelDetails, error) { - var gres []*vppcalls.GreTunnelDetails - reqCtx := h.callsChannel.SendMultiRequest(&gre.GreTunnelDump{ - SwIfIndex: ifIdx, - }) - - for { - greDetails := &gre.GreTunnelDetails{} - stop, err := reqCtx.ReceiveReply(greDetails) - if stop { - break - } - if err != nil { - return nil, fmt.Errorf("failed to dump span: %v", err) - } - - var srcAddr, dstAddr net.IP - if greDetails.IsIPv6 == 1 { - srcAddr = net.IP(greDetails.SrcAddress) - dstAddr = net.IP(greDetails.DstAddress) - } else { - srcAddr = net.IP(greDetails.SrcAddress[:4]) - dstAddr = net.IP(greDetails.DstAddress[:4]) - } - - gre := &vppcalls.GreTunnelDetails{ - SwIfIndex: greDetails.SwIfIndex, - Instance: greDetails.Instance, - TunnelType: greDetails.TunnelType, - SrcAddress: srcAddr, - DstAddress: dstAddr, - OuterFibID: greDetails.OuterFibID, - SessionID: greDetails.SessionID, - } - gres = append(gres, gre) - } - return gres, nil -} diff --git a/tests/integration/vpp/080_gre_test.go b/tests/integration/vpp/080_gre_test.go index 455e418fde..45a277d069 100644 --- a/tests/integration/vpp/080_gre_test.go +++ b/tests/integration/vpp/080_gre_test.go @@ -21,14 +21,42 @@ func TestGre(t *testing.T) { isFail bool }{ { - name: "create ERSPAN GRE tunnel with IPv4", + name: "create UNKNOWN GRE tunnel with IPv4", greLink: &interfaces.GreLink{ - TunnelType: interfaces.GreLink_ERSPAN, + TunnelType: interfaces.GreLink_UNKNOWN, + SrcAddr: "2000::8:13", + DstAddr: "2019::8:13", + }, + isFail: true, + }, + { + name: "create L3 GRE tunnel with IPv4", + greLink: &interfaces.GreLink{ + TunnelType: interfaces.GreLink_L3, SrcAddr: "2000::8:23", DstAddr: "2019::8:23", }, isFail: false, }, + { + name: "create TEB GRE tunnel with IPv4", + greLink: &interfaces.GreLink{ + TunnelType: interfaces.GreLink_TEB, + SrcAddr: "2000::8:33", + DstAddr: "2019::8:33", + }, + isFail: false, + }, + { + name: "create ERSPAN GRE tunnel with IPv4", + greLink: &interfaces.GreLink{ + TunnelType: interfaces.GreLink_ERSPAN, + SrcAddr: "2000::8:43", + DstAddr: "2019::8:43", + }, + isFail: false, + }, + { name: "create ERSPAN GRE tunnel with out of range session id", greLink: &interfaces.GreLink{ @@ -85,43 +113,38 @@ func TestGre(t *testing.T) { return } t.Fatalf("create GRE tunnel failed: %v\n", err) + } else { + if test.isFail { + t.Fatal("create GRE tunnel must fail, but it's not") + } } - gres, err := h.DumpGre(ifIdx) + ifaces, err := h.DumpInterfaces() if err != nil { - t.Fatalf("dump GRE tunnels failed: %v\n", err) + t.Fatalf("dumping interfaces failed: %v", err) } - - if len(gres) != 1 { - t.Fatalf("expected 1 GRE tunnel, got: %d", len(gres)) + iface, ok := ifaces[ifIdx] + if !ok { + t.Fatalf("GRE interface not found in dump") } - gre := gres[0] + gre := iface.Interface.GetGre() - if uint8(test.greLink.TunnelType) != gre.TunnelType { - t.Fatalf("expected tunnel type address <%d>, got: <%d>", test.greLink.TunnelType, gre.TunnelType) + if test.greLink.TunnelType != gre.TunnelType { + t.Fatalf("expected tunnel type <%s>, got: <%s>", test.greLink.TunnelType, gre.TunnelType) } - if test.greLink.SrcAddr != gre.SrcAddress.String() { - t.Fatalf("expected source address <%s>, got: <%s>", test.greLink.SrcAddr, gre.SrcAddress) + if test.greLink.SrcAddr != gre.SrcAddr { + t.Fatalf("expected source address <%s>, got: <%s>", test.greLink.SrcAddr, gre.SrcAddr) } - if test.greLink.DstAddr != gre.DstAddress.String() { - t.Fatalf("expected destination address <%s>, got: <%s>", test.greLink.DstAddr, gre.DstAddress) + if test.greLink.DstAddr != gre.DstAddr { + t.Fatalf("expected destination address <%s>, got: <%s>", test.greLink.DstAddr, gre.DstAddr) } - if test.greLink.OuterFibId != gre.OuterFibID { - t.Fatalf("expected outer FIB id <%d>, got: <%d>", test.greLink.OuterFibId, gre.OuterFibID) + if test.greLink.OuterFibId != gre.OuterFibId { + t.Fatalf("expected outer FIB id <%d>, got: <%d>", test.greLink.OuterFibId, gre.OuterFibId) } - if uint16(test.greLink.SessionId) != gre.SessionID { - t.Fatalf("expected session id <%d>, got: <%d>", test.greLink.SessionId, gre.SessionID) + if test.greLink.SessionId != gre.SessionId { + t.Fatalf("expected session id <%d>, got: <%d>", test.greLink.SessionId, gre.SessionId) } }) } - - t.Log("All interfaces:") - ifaces, err := h.DumpInterfaces() - if err != nil { - t.Fatalf("dump interfaces failed: %v\n", err) - } - for _, i := range ifaces { - t.Logf("\t%+v\n", i) - } } From e1a973ec4230feae41e589ecdc010807150e00b9 Mon Sep 17 00:00:00 2001 From: rewenset Date: Wed, 28 Aug 2019 18:12:55 +0300 Subject: [PATCH 6/7] Support vpp1901 and vpp1908 --- plugins/vpp/binapi/vpp1901/gen.go | 1 + plugins/vpp/binapi/vpp1901/gre/gre.ba.go | 182 ++++++ plugins/vpp/binapi/vpp1908/gen.go | 1 + plugins/vpp/binapi/vpp1908/gre/gre.ba.go | 532 ++++++++++++++++++ .../vpp1901/dump_interface_vppcalls.go | 57 ++ .../ifplugin/vppcalls/vpp1901/gre_vppcalls.go | 51 +- .../vpp1908/dump_interface_vppcalls.go | 69 +++ .../ifplugin/vppcalls/vpp1908/gre_vppcalls.go | 108 ++-- 8 files changed, 901 insertions(+), 100 deletions(-) create mode 100644 plugins/vpp/binapi/vpp1901/gre/gre.ba.go create mode 100644 plugins/vpp/binapi/vpp1908/gre/gre.ba.go diff --git a/plugins/vpp/binapi/vpp1901/gen.go b/plugins/vpp/binapi/vpp1901/gen.go index f674581db9..75a84f5e0e 100644 --- a/plugins/vpp/binapi/vpp1901/gen.go +++ b/plugins/vpp/binapi/vpp1901/gen.go @@ -22,6 +22,7 @@ package vpp1901 //go:generate binapi-generator --input-file=/usr/share/vpp/api/bfd.api.json //go:generate binapi-generator --input-file=/usr/share/vpp/api/bond.api.json //go:generate binapi-generator --input-file=/usr/share/vpp/api/dhcp.api.json +//go:generate binapi-generator --input-file=/usr/share/vpp/api/gre.api.json //go:generate binapi-generator --input-file=/usr/share/vpp/api/interface.api.json //go:generate binapi-generator --input-file=/usr/share/vpp/api/ip.api.json //go:generate binapi-generator --input-file=/usr/share/vpp/api/ipsec.api.json diff --git a/plugins/vpp/binapi/vpp1901/gre/gre.ba.go b/plugins/vpp/binapi/vpp1901/gre/gre.ba.go new file mode 100644 index 0000000000..3866aa7317 --- /dev/null +++ b/plugins/vpp/binapi/vpp1901/gre/gre.ba.go @@ -0,0 +1,182 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. +// source: /usr/share/vpp/api/gre.api.json + +/* +Package gre is a generated VPP binary API for 'gre' module. + +It consists of: + 4 messages + 2 services +*/ +package gre + +import ( + bytes "bytes" + context "context" + api "git.fd.io/govpp.git/api" + struc "github.com/lunixbochs/struc" + io "io" + strconv "strconv" +) + +const ( + // ModuleName is the name of this module. + ModuleName = "gre" + // VersionCrc is the CRC of this module. + VersionCrc = 0x83d2c14f +) + +// GreAddDelTunnel represents VPP binary API message 'gre_add_del_tunnel'. +type GreAddDelTunnel struct { + IsAdd uint8 + IsIPv6 uint8 + TunnelType uint8 + Instance uint32 + SrcAddress []byte `struc:"[16]byte"` + DstAddress []byte `struc:"[16]byte"` + OuterFibID uint32 + SessionID uint16 +} + +func (*GreAddDelTunnel) GetMessageName() string { + return "gre_add_del_tunnel" +} +func (*GreAddDelTunnel) GetCrcString() string { + return "9f03ede2" +} +func (*GreAddDelTunnel) GetMessageType() api.MessageType { + return api.RequestMessage +} + +// GreAddDelTunnelReply represents VPP binary API message 'gre_add_del_tunnel_reply'. +type GreAddDelTunnelReply struct { + Retval int32 + SwIfIndex uint32 +} + +func (*GreAddDelTunnelReply) GetMessageName() string { + return "gre_add_del_tunnel_reply" +} +func (*GreAddDelTunnelReply) GetCrcString() string { + return "fda5941f" +} +func (*GreAddDelTunnelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +// GreTunnelDetails represents VPP binary API message 'gre_tunnel_details'. +type GreTunnelDetails struct { + SwIfIndex uint32 + Instance uint32 + IsIPv6 uint8 + TunnelType uint8 + SrcAddress []byte `struc:"[16]byte"` + DstAddress []byte `struc:"[16]byte"` + OuterFibID uint32 + SessionID uint16 +} + +func (*GreTunnelDetails) GetMessageName() string { + return "gre_tunnel_details" +} +func (*GreTunnelDetails) GetCrcString() string { + return "1a12b8c1" +} +func (*GreTunnelDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +// GreTunnelDump represents VPP binary API message 'gre_tunnel_dump'. +type GreTunnelDump struct { + SwIfIndex uint32 +} + +func (*GreTunnelDump) GetMessageName() string { + return "gre_tunnel_dump" +} +func (*GreTunnelDump) GetCrcString() string { + return "529cb13f" +} +func (*GreTunnelDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func init() { + api.RegisterMessage((*GreAddDelTunnel)(nil), "gre.GreAddDelTunnel") + api.RegisterMessage((*GreAddDelTunnelReply)(nil), "gre.GreAddDelTunnelReply") + api.RegisterMessage((*GreTunnelDetails)(nil), "gre.GreTunnelDetails") + api.RegisterMessage((*GreTunnelDump)(nil), "gre.GreTunnelDump") +} + +// Messages returns list of all messages in this module. +func AllMessages() []api.Message { + return []api.Message{ + (*GreAddDelTunnel)(nil), + (*GreAddDelTunnelReply)(nil), + (*GreTunnelDetails)(nil), + (*GreTunnelDump)(nil), + } +} + +// RPCService represents RPC service API for gre module. +type RPCService interface { + DumpGreTunnel(ctx context.Context, in *GreTunnelDump) (RPCService_DumpGreTunnelClient, error) + GreAddDelTunnel(ctx context.Context, in *GreAddDelTunnel) (*GreAddDelTunnelReply, error) +} + +type serviceClient struct { + ch api.Channel +} + +func NewServiceClient(ch api.Channel) RPCService { + return &serviceClient{ch} +} + +func (c *serviceClient) DumpGreTunnel(ctx context.Context, in *GreTunnelDump) (RPCService_DumpGreTunnelClient, error) { + stream := c.ch.SendMultiRequest(in) + x := &serviceClient_DumpGreTunnelClient{stream} + return x, nil +} + +type RPCService_DumpGreTunnelClient interface { + Recv() (*GreTunnelDetails, error) +} + +type serviceClient_DumpGreTunnelClient struct { + api.MultiRequestCtx +} + +func (c *serviceClient_DumpGreTunnelClient) Recv() (*GreTunnelDetails, error) { + m := new(GreTunnelDetails) + stop, err := c.MultiRequestCtx.ReceiveReply(m) + if err != nil { + return nil, err + } + if stop { + return nil, io.EOF + } + return m, nil +} + +func (c *serviceClient) GreAddDelTunnel(ctx context.Context, in *GreAddDelTunnel) (*GreAddDelTunnelReply, error) { + out := new(GreAddDelTunnelReply) + err := c.ch.SendRequest(in).ReceiveReply(out) + if err != nil { + return nil, err + } + return out, nil +} + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the GoVPP api package it is being compiled against. +// A compilation error at this line likely means your copy of the +// GoVPP api package needs to be updated. +const _ = api.GoVppAPIPackageIsVersion1 // please upgrade the GoVPP api package + +// Reference imports to suppress errors if they are not otherwise used. +var _ = api.RegisterMessage +var _ = bytes.NewBuffer +var _ = context.Background +var _ = io.Copy +var _ = strconv.Itoa +var _ = struc.Pack diff --git a/plugins/vpp/binapi/vpp1908/gen.go b/plugins/vpp/binapi/vpp1908/gen.go index 8beeb335c4..fe6e81de71 100644 --- a/plugins/vpp/binapi/vpp1908/gen.go +++ b/plugins/vpp/binapi/vpp1908/gen.go @@ -20,6 +20,7 @@ package vpp1908 //go:generate binapigen --input-file=/usr/share/vpp/api/core/bfd.api.json //go:generate binapigen --input-file=/usr/share/vpp/api/core/bond.api.json //go:generate binapigen --input-file=/usr/share/vpp/api/core/dhcp.api.json +//go:generate binapigen --input-file=/usr/share/vpp/api/core/gre.api.json //go:generate binapigen --input-file=/usr/share/vpp/api/core/interface.api.json //go:generate binapigen --input-file=/usr/share/vpp/api/core/ip.api.json //go:generate binapigen --input-file=/usr/share/vpp/api/core/ipsec.api.json diff --git a/plugins/vpp/binapi/vpp1908/gre/gre.ba.go b/plugins/vpp/binapi/vpp1908/gre/gre.ba.go new file mode 100644 index 0000000000..aad5eebf72 --- /dev/null +++ b/plugins/vpp/binapi/vpp1908/gre/gre.ba.go @@ -0,0 +1,532 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. +// source: /usr/share/vpp/api/core/gre.api.json + +/* +Package gre is a generated VPP binary API for 'gre' module. + +It consists of: + 5 enums + 3 aliases + 7 types + 1 union + 4 messages + 2 services +*/ +package gre + +import ( + bytes "bytes" + context "context" + api "git.fd.io/govpp.git/api" + struc "github.com/lunixbochs/struc" + io "io" + strconv "strconv" +) + +const ( + // ModuleName is the name of this module. + ModuleName = "gre" + // APIVersion is the API version of this module. + APIVersion = "2.0.0" + // VersionCrc is the CRC of this module. + VersionCrc = 0xed1d2d72 +) + +// AddressFamily represents VPP binary API enum 'address_family'. +type AddressFamily uint32 + +const ( + ADDRESS_IP4 AddressFamily = 0 + ADDRESS_IP6 AddressFamily = 1 +) + +var AddressFamily_name = map[uint32]string{ + 0: "ADDRESS_IP4", + 1: "ADDRESS_IP6", +} + +var AddressFamily_value = map[string]uint32{ + "ADDRESS_IP4": 0, + "ADDRESS_IP6": 1, +} + +func (x AddressFamily) String() string { + s, ok := AddressFamily_name[uint32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} + +// GreTunnelType represents VPP binary API enum 'gre_tunnel_type'. +type GreTunnelType uint32 + +const ( + GRE_API_TUNNEL_TYPE_L3 GreTunnelType = 0 + GRE_API_TUNNEL_TYPE_TEB GreTunnelType = 1 + GRE_API_TUNNEL_TYPE_ERSPAN GreTunnelType = 2 +) + +var GreTunnelType_name = map[uint32]string{ + 0: "GRE_API_TUNNEL_TYPE_L3", + 1: "GRE_API_TUNNEL_TYPE_TEB", + 2: "GRE_API_TUNNEL_TYPE_ERSPAN", +} + +var GreTunnelType_value = map[string]uint32{ + "GRE_API_TUNNEL_TYPE_L3": 0, + "GRE_API_TUNNEL_TYPE_TEB": 1, + "GRE_API_TUNNEL_TYPE_ERSPAN": 2, +} + +func (x GreTunnelType) String() string { + s, ok := GreTunnelType_name[uint32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} + +// IPDscp represents VPP binary API enum 'ip_dscp'. +type IPDscp uint8 + +const ( + IP_API_DSCP_CS0 IPDscp = 0 + IP_API_DSCP_CS1 IPDscp = 8 + IP_API_DSCP_AF11 IPDscp = 10 + IP_API_DSCP_AF12 IPDscp = 12 + IP_API_DSCP_AF13 IPDscp = 14 + IP_API_DSCP_CS2 IPDscp = 16 + IP_API_DSCP_AF21 IPDscp = 18 + IP_API_DSCP_AF22 IPDscp = 20 + IP_API_DSCP_AF23 IPDscp = 22 + IP_API_DSCP_CS3 IPDscp = 24 + IP_API_DSCP_AF31 IPDscp = 26 + IP_API_DSCP_AF32 IPDscp = 28 + IP_API_DSCP_AF33 IPDscp = 30 + IP_API_DSCP_CS4 IPDscp = 32 + IP_API_DSCP_AF41 IPDscp = 34 + IP_API_DSCP_AF42 IPDscp = 36 + IP_API_DSCP_AF43 IPDscp = 38 + IP_API_DSCP_CS5 IPDscp = 40 + IP_API_DSCP_EF IPDscp = 46 + IP_API_DSCP_CS6 IPDscp = 48 + IP_API_DSCP_CS7 IPDscp = 50 +) + +var IPDscp_name = map[uint8]string{ + 0: "IP_API_DSCP_CS0", + 8: "IP_API_DSCP_CS1", + 10: "IP_API_DSCP_AF11", + 12: "IP_API_DSCP_AF12", + 14: "IP_API_DSCP_AF13", + 16: "IP_API_DSCP_CS2", + 18: "IP_API_DSCP_AF21", + 20: "IP_API_DSCP_AF22", + 22: "IP_API_DSCP_AF23", + 24: "IP_API_DSCP_CS3", + 26: "IP_API_DSCP_AF31", + 28: "IP_API_DSCP_AF32", + 30: "IP_API_DSCP_AF33", + 32: "IP_API_DSCP_CS4", + 34: "IP_API_DSCP_AF41", + 36: "IP_API_DSCP_AF42", + 38: "IP_API_DSCP_AF43", + 40: "IP_API_DSCP_CS5", + 46: "IP_API_DSCP_EF", + 48: "IP_API_DSCP_CS6", + 50: "IP_API_DSCP_CS7", +} + +var IPDscp_value = map[string]uint8{ + "IP_API_DSCP_CS0": 0, + "IP_API_DSCP_CS1": 8, + "IP_API_DSCP_AF11": 10, + "IP_API_DSCP_AF12": 12, + "IP_API_DSCP_AF13": 14, + "IP_API_DSCP_CS2": 16, + "IP_API_DSCP_AF21": 18, + "IP_API_DSCP_AF22": 20, + "IP_API_DSCP_AF23": 22, + "IP_API_DSCP_CS3": 24, + "IP_API_DSCP_AF31": 26, + "IP_API_DSCP_AF32": 28, + "IP_API_DSCP_AF33": 30, + "IP_API_DSCP_CS4": 32, + "IP_API_DSCP_AF41": 34, + "IP_API_DSCP_AF42": 36, + "IP_API_DSCP_AF43": 38, + "IP_API_DSCP_CS5": 40, + "IP_API_DSCP_EF": 46, + "IP_API_DSCP_CS6": 48, + "IP_API_DSCP_CS7": 50, +} + +func (x IPDscp) String() string { + s, ok := IPDscp_name[uint8(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} + +// IPEcn represents VPP binary API enum 'ip_ecn'. +type IPEcn uint8 + +const ( + IP_API_ECN_NONE IPEcn = 0 + IP_API_ECN_ECT0 IPEcn = 1 + IP_API_ECN_ECT1 IPEcn = 2 + IP_API_ECN_CE IPEcn = 3 +) + +var IPEcn_name = map[uint8]string{ + 0: "IP_API_ECN_NONE", + 1: "IP_API_ECN_ECT0", + 2: "IP_API_ECN_ECT1", + 3: "IP_API_ECN_CE", +} + +var IPEcn_value = map[string]uint8{ + "IP_API_ECN_NONE": 0, + "IP_API_ECN_ECT0": 1, + "IP_API_ECN_ECT1": 2, + "IP_API_ECN_CE": 3, +} + +func (x IPEcn) String() string { + s, ok := IPEcn_name[uint8(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} + +// IPProto represents VPP binary API enum 'ip_proto'. +type IPProto uint32 + +const ( + IP_API_PROTO_HOPOPT IPProto = 0 + IP_API_PROTO_ICMP IPProto = 1 + IP_API_PROTO_IGMP IPProto = 2 + IP_API_PROTO_TCP IPProto = 6 + IP_API_PROTO_UDP IPProto = 17 + IP_API_PROTO_GRE IPProto = 47 + IP_API_PROTO_AH IPProto = 50 + IP_API_PROTO_ESP IPProto = 51 + IP_API_PROTO_EIGRP IPProto = 88 + IP_API_PROTO_OSPF IPProto = 89 + IP_API_PROTO_SCTP IPProto = 132 + IP_API_PROTO_RESERVED IPProto = 255 +) + +var IPProto_name = map[uint32]string{ + 0: "IP_API_PROTO_HOPOPT", + 1: "IP_API_PROTO_ICMP", + 2: "IP_API_PROTO_IGMP", + 6: "IP_API_PROTO_TCP", + 17: "IP_API_PROTO_UDP", + 47: "IP_API_PROTO_GRE", + 50: "IP_API_PROTO_AH", + 51: "IP_API_PROTO_ESP", + 88: "IP_API_PROTO_EIGRP", + 89: "IP_API_PROTO_OSPF", + 132: "IP_API_PROTO_SCTP", + 255: "IP_API_PROTO_RESERVED", +} + +var IPProto_value = map[string]uint32{ + "IP_API_PROTO_HOPOPT": 0, + "IP_API_PROTO_ICMP": 1, + "IP_API_PROTO_IGMP": 2, + "IP_API_PROTO_TCP": 6, + "IP_API_PROTO_UDP": 17, + "IP_API_PROTO_GRE": 47, + "IP_API_PROTO_AH": 50, + "IP_API_PROTO_ESP": 51, + "IP_API_PROTO_EIGRP": 88, + "IP_API_PROTO_OSPF": 89, + "IP_API_PROTO_SCTP": 132, + "IP_API_PROTO_RESERVED": 255, +} + +func (x IPProto) String() string { + s, ok := IPProto_name[uint32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} + +// InterfaceIndex represents VPP binary API alias 'interface_index'. +type InterfaceIndex uint32 + +// IP4Address represents VPP binary API alias 'ip4_address'. +type IP4Address [4]uint8 + +// IP6Address represents VPP binary API alias 'ip6_address'. +type IP6Address [16]uint8 + +// Address represents VPP binary API type 'address'. +type Address struct { + Af AddressFamily + Un AddressUnion +} + +func (*Address) GetTypeName() string { + return "address" +} + +// GreTunnel represents VPP binary API type 'gre_tunnel'. +type GreTunnel struct { + ClientIndex uint32 + Context uint32 + SessionID uint16 + Type GreTunnelType + Instance uint32 + OuterFibID uint32 + SwIfIndex InterfaceIndex + Src Address + Dst Address +} + +func (*GreTunnel) GetTypeName() string { + return "gre_tunnel" +} + +// IP4Prefix represents VPP binary API type 'ip4_prefix'. +type IP4Prefix struct { + Address IP4Address + Len uint8 +} + +func (*IP4Prefix) GetTypeName() string { + return "ip4_prefix" +} + +// IP6Prefix represents VPP binary API type 'ip6_prefix'. +type IP6Prefix struct { + Address IP6Address + Len uint8 +} + +func (*IP6Prefix) GetTypeName() string { + return "ip6_prefix" +} + +// Mprefix represents VPP binary API type 'mprefix'. +type Mprefix struct { + Af AddressFamily + GrpAddressLength uint16 + GrpAddress AddressUnion + SrcAddress AddressUnion +} + +func (*Mprefix) GetTypeName() string { + return "mprefix" +} + +// Prefix represents VPP binary API type 'prefix'. +type Prefix struct { + Address Address + Len uint8 +} + +func (*Prefix) GetTypeName() string { + return "prefix" +} + +// PrefixMatcher represents VPP binary API type 'prefix_matcher'. +type PrefixMatcher struct { + Le uint8 + Ge uint8 +} + +func (*PrefixMatcher) GetTypeName() string { + return "prefix_matcher" +} + +// AddressUnion represents VPP binary API union 'address_union'. +type AddressUnion struct { + XXX_UnionData [16]byte +} + +func (*AddressUnion) GetTypeName() string { + return "address_union" +} + +func AddressUnionIP4(a IP4Address) (u AddressUnion) { + u.SetIP4(a) + return +} +func (u *AddressUnion) SetIP4(a IP4Address) { + var b = new(bytes.Buffer) + if err := struc.Pack(b, &a); err != nil { + return + } + copy(u.XXX_UnionData[:], b.Bytes()) +} +func (u *AddressUnion) GetIP4() (a IP4Address) { + var b = bytes.NewReader(u.XXX_UnionData[:]) + struc.Unpack(b, &a) + return +} + +func AddressUnionIP6(a IP6Address) (u AddressUnion) { + u.SetIP6(a) + return +} +func (u *AddressUnion) SetIP6(a IP6Address) { + var b = new(bytes.Buffer) + if err := struc.Pack(b, &a); err != nil { + return + } + copy(u.XXX_UnionData[:], b.Bytes()) +} +func (u *AddressUnion) GetIP6() (a IP6Address) { + var b = bytes.NewReader(u.XXX_UnionData[:]) + struc.Unpack(b, &a) + return +} + +// GreTunnelAddDel represents VPP binary API message 'gre_tunnel_add_del'. +type GreTunnelAddDel struct { + IsAdd bool + Tunnel GreTunnel +} + +func (*GreTunnelAddDel) GetMessageName() string { + return "gre_tunnel_add_del" +} +func (*GreTunnelAddDel) GetCrcString() string { + return "04199f47" +} +func (*GreTunnelAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} + +// GreTunnelAddDelReply represents VPP binary API message 'gre_tunnel_add_del_reply'. +type GreTunnelAddDelReply struct { + Retval int32 + SwIfIndex InterfaceIndex +} + +func (*GreTunnelAddDelReply) GetMessageName() string { + return "gre_tunnel_add_del_reply" +} +func (*GreTunnelAddDelReply) GetCrcString() string { + return "903324db" +} +func (*GreTunnelAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +// GreTunnelDetails represents VPP binary API message 'gre_tunnel_details'. +type GreTunnelDetails struct { + Tunnel GreTunnel +} + +func (*GreTunnelDetails) GetMessageName() string { + return "gre_tunnel_details" +} +func (*GreTunnelDetails) GetCrcString() string { + return "fd0e1d36" +} +func (*GreTunnelDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +// GreTunnelDump represents VPP binary API message 'gre_tunnel_dump'. +type GreTunnelDump struct { + SwIfIndex InterfaceIndex +} + +func (*GreTunnelDump) GetMessageName() string { + return "gre_tunnel_dump" +} +func (*GreTunnelDump) GetCrcString() string { + return "d85aab0d" +} +func (*GreTunnelDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func init() { + api.RegisterMessage((*GreTunnelAddDel)(nil), "gre.GreTunnelAddDel") + api.RegisterMessage((*GreTunnelAddDelReply)(nil), "gre.GreTunnelAddDelReply") + api.RegisterMessage((*GreTunnelDetails)(nil), "gre.GreTunnelDetails") + api.RegisterMessage((*GreTunnelDump)(nil), "gre.GreTunnelDump") +} + +// Messages returns list of all messages in this module. +func AllMessages() []api.Message { + return []api.Message{ + (*GreTunnelAddDel)(nil), + (*GreTunnelAddDelReply)(nil), + (*GreTunnelDetails)(nil), + (*GreTunnelDump)(nil), + } +} + +// RPCService represents RPC service API for gre module. +type RPCService interface { + DumpGreTunnel(ctx context.Context, in *GreTunnelDump) (RPCService_DumpGreTunnelClient, error) + GreTunnelAddDel(ctx context.Context, in *GreTunnelAddDel) (*GreTunnelAddDelReply, error) +} + +type serviceClient struct { + ch api.Channel +} + +func NewServiceClient(ch api.Channel) RPCService { + return &serviceClient{ch} +} + +func (c *serviceClient) DumpGreTunnel(ctx context.Context, in *GreTunnelDump) (RPCService_DumpGreTunnelClient, error) { + stream := c.ch.SendMultiRequest(in) + x := &serviceClient_DumpGreTunnelClient{stream} + return x, nil +} + +type RPCService_DumpGreTunnelClient interface { + Recv() (*GreTunnelDetails, error) +} + +type serviceClient_DumpGreTunnelClient struct { + api.MultiRequestCtx +} + +func (c *serviceClient_DumpGreTunnelClient) Recv() (*GreTunnelDetails, error) { + m := new(GreTunnelDetails) + stop, err := c.MultiRequestCtx.ReceiveReply(m) + if err != nil { + return nil, err + } + if stop { + return nil, io.EOF + } + return m, nil +} + +func (c *serviceClient) GreTunnelAddDel(ctx context.Context, in *GreTunnelAddDel) (*GreTunnelAddDelReply, error) { + out := new(GreTunnelAddDelReply) + err := c.ch.SendRequest(in).ReceiveReply(out) + if err != nil { + return nil, err + } + return out, nil +} + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the GoVPP api package it is being compiled against. +// A compilation error at this line likely means your copy of the +// GoVPP api package needs to be updated. +const _ = api.GoVppAPIPackageIsVersion1 // please upgrade the GoVPP api package + +// Reference imports to suppress errors if they are not otherwise used. +var _ = api.RegisterMessage +var _ = bytes.NewBuffer +var _ = context.Background +var _ = io.Copy +var _ = strconv.Itoa +var _ = struc.Pack diff --git a/plugins/vpp/ifplugin/vppcalls/vpp1901/dump_interface_vppcalls.go b/plugins/vpp/ifplugin/vppcalls/vpp1901/dump_interface_vppcalls.go index f085bf9d1a..7eccff04e4 100644 --- a/plugins/vpp/ifplugin/vppcalls/vpp1901/dump_interface_vppcalls.go +++ b/plugins/vpp/ifplugin/vppcalls/vpp1901/dump_interface_vppcalls.go @@ -21,6 +21,7 @@ import ( "strings" "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1901/bond" + "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1901/gre" interfaces "github.com/ligato/vpp-agent/api/models/vpp/interfaces" vpp_ipsec "github.com/ligato/vpp-agent/api/models/vpp/ipsec" @@ -245,6 +246,11 @@ func (h *InterfaceVppHandler) DumpInterfaces() (map[uint32]*vppcalls.InterfaceDe return nil, err } + err = h.dumpGreDetails(ifs) + if err != nil { + return nil, err + } + // Rx-placement dump is last since it uses interface type-specific data err = h.dumpRxPlacement(ifs) if err != nil { @@ -804,6 +810,41 @@ func (h *InterfaceVppHandler) dumpBondDetails(ifs map[uint32]*vppcalls.Interface return nil } +func (h *InterfaceVppHandler) dumpGreDetails(ifs map[uint32]*vppcalls.InterfaceDetails) error { + reqCtx := h.callsChannel.SendMultiRequest(&gre.GreTunnelDump{SwIfIndex: ^uint32(0)}) + for { + greDetails := &gre.GreTunnelDetails{} + stop, err := reqCtx.ReceiveReply(greDetails) + if stop { + break + } + if err != nil { + return fmt.Errorf("failed to dump span: %v", err) + } + + var srcAddr, dstAddr net.IP + if greDetails.IsIPv6 == 1 { + srcAddr = net.IP(greDetails.SrcAddress) + dstAddr = net.IP(greDetails.DstAddress) + } else { + srcAddr = net.IP(greDetails.SrcAddress[:4]) + dstAddr = net.IP(greDetails.DstAddress[:4]) + } + + ifs[greDetails.SwIfIndex].Interface.Link = &interfaces.Interface_Gre{ + Gre: &interfaces.GreLink{ + TunnelType: getGreTunnelType(greDetails.TunnelType), + SrcAddr: srcAddr.String(), + DstAddr: dstAddr.String(), + OuterFibId: greDetails.OuterFibID, + SessionId: uint32(greDetails.SessionID), + }, + } + ifs[greDetails.SwIfIndex].Interface.Type = interfaces.Interface_GRE_TUNNEL + } + return nil +} + // dumpUnnumberedDetails returns a map of unnumbered interface indexes, every with interface index of element with IP func (h *InterfaceVppHandler) dumpUnnumberedDetails() (map[uint32]uint32, error) { unIfMap := make(map[uint32]uint32) // unnumbered/ip-interface @@ -897,6 +938,9 @@ func guessInterfaceType(ifName string) interfaces.Interface_Type { case strings.HasPrefix(ifName, "Bond"): return interfaces.Interface_BOND_INTERFACE + case strings.HasPrefix(ifName, "gre"): + return interfaces.Interface_GRE_TUNNEL + default: return interfaces.Interface_DPDK } @@ -984,6 +1028,19 @@ func getTagRwOption(op uint32) interfaces.SubInterface_TagRewriteOptions { } } +func getGreTunnelType(tt uint8) interfaces.GreLink_Type { + switch tt { + case 0: + return interfaces.GreLink_L3 + case 1: + return interfaces.GreLink_TEB + case 2: + return interfaces.GreLink_ERSPAN + default: + return interfaces.GreLink_UNKNOWN + } +} + func uintToBool(value uint8) bool { if value == 0 { return false diff --git a/plugins/vpp/ifplugin/vppcalls/vpp1901/gre_vppcalls.go b/plugins/vpp/ifplugin/vppcalls/vpp1901/gre_vppcalls.go index 9916354272..7be2a31ce8 100644 --- a/plugins/vpp/ifplugin/vppcalls/vpp1901/gre_vppcalls.go +++ b/plugins/vpp/ifplugin/vppcalls/vpp1901/gre_vppcalls.go @@ -2,15 +2,18 @@ package vpp1901 import ( "errors" - "fmt" "net" interfaces "github.com/ligato/vpp-agent/api/models/vpp/interfaces" - "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1904/gre" - "github.com/ligato/vpp-agent/plugins/vpp/ifplugin/vppcalls" + "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1901/gre" ) func (h *InterfaceVppHandler) greAddDelTunnel(isAdd uint8, greLink *interfaces.GreLink) (uint32, error) { + if greLink.TunnelType == interfaces.GreLink_UNKNOWN { + err := errors.New("bad GRE tunnel type") + return 0, err + } + greSource := net.ParseIP(greLink.SrcAddr) if greSource == nil { err := errors.New("bad source address for GRE tunnel") @@ -33,7 +36,7 @@ func (h *InterfaceVppHandler) greAddDelTunnel(isAdd uint8, greLink *interfaces.G } req := &gre.GreAddDelTunnel{ IsAdd: isAdd, - TunnelType: uint8(greLink.TunnelType), + TunnelType: uint8(greLink.TunnelType - 1), Instance: ^uint32(0), OuterFibID: greLink.OuterFibId, SessionID: uint16(greLink.SessionId), @@ -85,43 +88,3 @@ func (h *InterfaceVppHandler) DelGreTunnel(ifName string, greLink *interfaces.Gr } return swIfIndex, h.RemoveInterfaceTag(ifName, swIfIndex) } - -// DumpGre dumps GRE interface. -func (h *InterfaceVppHandler) DumpGre(ifIdx uint32) ([]*vppcalls.GreTunnelDetails, error) { - var gres []*vppcalls.GreTunnelDetails - reqCtx := h.callsChannel.SendMultiRequest(&gre.GreTunnelDump{ - SwIfIndex: ifIdx, - }) - - for { - greDetails := &gre.GreTunnelDetails{} - stop, err := reqCtx.ReceiveReply(greDetails) - if stop { - break - } - if err != nil { - return nil, fmt.Errorf("failed to dump span: %v", err) - } - - var srcAddr, dstAddr net.IP - if greDetails.IsIPv6 == 1 { - srcAddr = net.IP(greDetails.SrcAddress) - dstAddr = net.IP(greDetails.DstAddress) - } else { - srcAddr = net.IP(greDetails.SrcAddress[:4]) - dstAddr = net.IP(greDetails.DstAddress[:4]) - } - - gre := &vppcalls.GreTunnelDetails{ - SwIfIndex: greDetails.SwIfIndex, - Instance: greDetails.Instance, - TunnelType: greDetails.TunnelType, - SrcAddress: srcAddr, - DstAddress: dstAddr, - OuterFibID: greDetails.OuterFibID, - SessionID: greDetails.SessionID, - } - gres = append(gres, gre) - } - return gres, nil -} diff --git a/plugins/vpp/ifplugin/vppcalls/vpp1908/dump_interface_vppcalls.go b/plugins/vpp/ifplugin/vppcalls/vpp1908/dump_interface_vppcalls.go index 123dca2402..03450ee938 100644 --- a/plugins/vpp/ifplugin/vppcalls/vpp1908/dump_interface_vppcalls.go +++ b/plugins/vpp/ifplugin/vppcalls/vpp1908/dump_interface_vppcalls.go @@ -25,6 +25,7 @@ import ( vpp_ipsec "github.com/ligato/vpp-agent/api/models/vpp/ipsec" "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1908/bond" "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1908/dhcp" + "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1908/gre" binapi_interface "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1908/interfaces" "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1908/ip" "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1908/ipsec" @@ -256,6 +257,11 @@ func (h *InterfaceVppHandler) DumpInterfaces() (map[uint32]*vppcalls.InterfaceDe return nil, err } + err = h.dumpGreDetails(ifs) + if err != nil { + return nil, err + } + // Rx-placement dump is last since it uses interface type-specific data err = h.dumpRxPlacement(ifs) if err != nil { @@ -830,6 +836,53 @@ func (h *InterfaceVppHandler) dumpBondDetails(ifs map[uint32]*vppcalls.Interface return nil } +func (h *InterfaceVppHandler) dumpGreDetails(ifs map[uint32]*vppcalls.InterfaceDetails) error { + msg := &gre.GreTunnelDump{SwIfIndex: gre.InterfaceIndex(^uint32(0))} + reqCtx := h.callsChannel.SendMultiRequest(msg) + for { + greDetails := &gre.GreTunnelDetails{} + stop, err := reqCtx.ReceiveReply(greDetails) + if stop { + break + } + if err != nil { + return fmt.Errorf("failed to dump span: %v", err) + } + + tunnel := greDetails.Tunnel + swIfIndex := uint32(tunnel.SwIfIndex) + + var srcAddr, dstAddr net.IP + + if tunnel.Src.Af == gre.ADDRESS_IP4 { + srcAddrArr := tunnel.Src.Un.GetIP4() + srcAddr = net.IP(srcAddrArr[:]) + } else { + srcAddrArr := tunnel.Src.Un.GetIP6() + srcAddr = net.IP(srcAddrArr[:]) + } + if tunnel.Dst.Af == gre.ADDRESS_IP4 { + dstAddrArr := tunnel.Dst.Un.GetIP4() + dstAddr = net.IP(dstAddrArr[:]) + } else { + dstAddrArr := tunnel.Dst.Un.GetIP6() + dstAddr = net.IP(dstAddrArr[:]) + } + + ifs[swIfIndex].Interface.Link = &interfaces.Interface_Gre{ + Gre: &interfaces.GreLink{ + TunnelType: getGreTunnelType(tunnel.Type), + SrcAddr: srcAddr.String(), + DstAddr: dstAddr.String(), + OuterFibId: tunnel.OuterFibID, + SessionId: uint32(tunnel.SessionID), + }, + } + ifs[swIfIndex].Interface.Type = interfaces.Interface_GRE_TUNNEL + } + return nil +} + // dumpUnnumberedDetails returns a map of unnumbered interface indexes, every with interface index of element with IP func (h *InterfaceVppHandler) dumpUnnumberedDetails() (map[uint32]uint32, error) { unIfMap := make(map[uint32]uint32) // unnumbered/ip-interface @@ -923,6 +976,9 @@ func guessInterfaceType(ifName string) interfaces.Interface_Type { case strings.HasPrefix(ifName, "Bond"): return interfaces.Interface_BOND_INTERFACE + case strings.HasPrefix(ifName, "gre"): + return interfaces.Interface_GRE_TUNNEL + default: return interfaces.Interface_DPDK } @@ -1010,6 +1066,19 @@ func getTagRwOption(op uint32) interfaces.SubInterface_TagRewriteOptions { } } +func getGreTunnelType(tt gre.GreTunnelType) interfaces.GreLink_Type { + switch tt { + case gre.GRE_API_TUNNEL_TYPE_L3: + return interfaces.GreLink_L3 + case gre.GRE_API_TUNNEL_TYPE_TEB: + return interfaces.GreLink_TEB + case gre.GRE_API_TUNNEL_TYPE_ERSPAN: + return interfaces.GreLink_ERSPAN + default: + return interfaces.GreLink_UNKNOWN + } +} + func uintToBool(value uint8) bool { if value == 0 { return false diff --git a/plugins/vpp/ifplugin/vppcalls/vpp1908/gre_vppcalls.go b/plugins/vpp/ifplugin/vppcalls/vpp1908/gre_vppcalls.go index 9c964fd7e7..8858e59b97 100644 --- a/plugins/vpp/ifplugin/vppcalls/vpp1908/gre_vppcalls.go +++ b/plugins/vpp/ifplugin/vppcalls/vpp1908/gre_vppcalls.go @@ -2,15 +2,18 @@ package vpp1908 import ( "errors" - "fmt" "net" interfaces "github.com/ligato/vpp-agent/api/models/vpp/interfaces" - "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1904/gre" - "github.com/ligato/vpp-agent/plugins/vpp/ifplugin/vppcalls" + "github.com/ligato/vpp-agent/plugins/vpp/binapi/vpp1908/gre" ) -func (h *InterfaceVppHandler) greAddDelTunnel(isAdd uint8, greLink *interfaces.GreLink) (uint32, error) { +func (h *InterfaceVppHandler) greAddDelTunnel(isAdd bool, greLink *interfaces.GreLink) (uint32, error) { + if greLink.TunnelType == interfaces.GreLink_UNKNOWN { + err := errors.New("bad GRE tunnel type") + return 0, err + } + greSource := net.ParseIP(greLink.SrcAddr) if greSource == nil { err := errors.New("bad source address for GRE tunnel") @@ -31,9 +34,21 @@ func (h *InterfaceVppHandler) greAddDelTunnel(isAdd uint8, greLink *interfaces.G err := errors.New("set session id for ERSPAN tunnel type") return 0, err } - req := &gre.GreAddDelTunnel{ - IsAdd: isAdd, - TunnelType: uint8(greLink.TunnelType), + + var tt gre.GreTunnelType + switch uint8(greLink.TunnelType - 1) { + case 0: + tt = gre.GRE_API_TUNNEL_TYPE_L3 + case 1: + tt = gre.GRE_API_TUNNEL_TYPE_TEB + case 2: + tt = gre.GRE_API_TUNNEL_TYPE_ERSPAN + default: + return 0, errors.New("bad GRE tunnel type") + } + + tunnel := gre.GreTunnel{ + Type: tt, Instance: ^uint32(0), OuterFibID: greLink.OuterFibId, SessionID: uint16(greLink.SessionId), @@ -52,25 +67,46 @@ func (h *InterfaceVppHandler) greAddDelTunnel(isAdd uint8, greLink *interfaces.G } if isSrcIPv6 { - req.SrcAddress = []byte(greSource.To16()) - req.DstAddress = []byte(greDestination.To16()) - req.IsIPv6 = 1 + var src, dst [16]uint8 + copy(src[:], []byte(greSource.To16())) + copy(dst[:], []byte(greDestination.To16())) + tunnel.Src = gre.Address{ + Af: gre.ADDRESS_IP6, + Un: gre.AddressUnionIP6(gre.IP6Address(src)), + } + tunnel.Dst = gre.Address{ + Af: gre.ADDRESS_IP6, + Un: gre.AddressUnionIP6(gre.IP6Address(dst)), + } } else { - req.SrcAddress = []byte(greSource.To4()) - req.DstAddress = []byte(greDestination.To4()) + var src, dst [4]uint8 + copy(src[:], []byte(greSource.To4())) + copy(dst[:], []byte(greDestination.To4())) + tunnel.Src = gre.Address{ + Af: gre.ADDRESS_IP4, + Un: gre.AddressUnionIP4(gre.IP4Address(src)), + } + tunnel.Dst = gre.Address{ + Af: gre.ADDRESS_IP4, + Un: gre.AddressUnionIP4(gre.IP4Address(dst)), + } } - reply := &gre.GreAddDelTunnelReply{} + req := &gre.GreTunnelAddDel{ + IsAdd: isAdd, + Tunnel: tunnel, + } + reply := &gre.GreTunnelAddDelReply{} if err := h.callsChannel.SendRequest(req).ReceiveReply(reply); err != nil { return 0, err } - return reply.SwIfIndex, nil + return uint32(reply.SwIfIndex), nil } // AddGreTunnel adds new GRE interface. func (h *InterfaceVppHandler) AddGreTunnel(ifName string, greLink *interfaces.GreLink) (uint32, error) { - swIfIndex, err := h.greAddDelTunnel(1, greLink) + swIfIndex, err := h.greAddDelTunnel(true, greLink) if err != nil { return 0, err } @@ -79,49 +115,9 @@ func (h *InterfaceVppHandler) AddGreTunnel(ifName string, greLink *interfaces.Gr // DelGreTunnel removes GRE interface. func (h *InterfaceVppHandler) DelGreTunnel(ifName string, greLink *interfaces.GreLink) (uint32, error) { - swIfIndex, err := h.greAddDelTunnel(0, greLink) + swIfIndex, err := h.greAddDelTunnel(false, greLink) if err != nil { return 0, err } return swIfIndex, h.RemoveInterfaceTag(ifName, swIfIndex) } - -// DumpGre dumps GRE interface. -func (h *InterfaceVppHandler) DumpGre(ifIdx uint32) ([]*vppcalls.GreTunnelDetails, error) { - var gres []*vppcalls.GreTunnelDetails - reqCtx := h.callsChannel.SendMultiRequest(&gre.GreTunnelDump{ - SwIfIndex: ifIdx, - }) - - for { - greDetails := &gre.GreTunnelDetails{} - stop, err := reqCtx.ReceiveReply(greDetails) - if stop { - break - } - if err != nil { - return nil, fmt.Errorf("failed to dump span: %v", err) - } - - var srcAddr, dstAddr net.IP - if greDetails.IsIPv6 == 1 { - srcAddr = net.IP(greDetails.SrcAddress) - dstAddr = net.IP(greDetails.DstAddress) - } else { - srcAddr = net.IP(greDetails.SrcAddress[:4]) - dstAddr = net.IP(greDetails.DstAddress[:4]) - } - - gre := &vppcalls.GreTunnelDetails{ - SwIfIndex: greDetails.SwIfIndex, - Instance: greDetails.Instance, - TunnelType: greDetails.TunnelType, - SrcAddress: srcAddr, - DstAddress: dstAddr, - OuterFibID: greDetails.OuterFibID, - SessionID: greDetails.SessionID, - } - gres = append(gres, gre) - } - return gres, nil -} From 103def0eb7a365f0502068ac1e9d8d847852e34b Mon Sep 17 00:00:00 2001 From: rewenset Date: Thu, 29 Aug 2019 14:35:19 +0300 Subject: [PATCH 7/7] Test also removing of GRE tunnel --- tests/integration/vpp/080_gre_test.go | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/integration/vpp/080_gre_test.go b/tests/integration/vpp/080_gre_test.go index 45a277d069..141c441bb1 100644 --- a/tests/integration/vpp/080_gre_test.go +++ b/tests/integration/vpp/080_gre_test.go @@ -106,7 +106,8 @@ func TestGre(t *testing.T) { } for i, test := range tests { t.Run(test.name, func(t *testing.T) { - ifIdx, err := h.AddGreTunnel(fmt.Sprintf("test%d", i), test.greLink) + ifName := fmt.Sprintf("test%d", i) + ifIdx, err := h.AddGreTunnel(ifName, test.greLink) if err != nil { if test.isFail { @@ -145,6 +146,20 @@ func TestGre(t *testing.T) { if test.greLink.SessionId != gre.SessionId { t.Fatalf("expected session id <%d>, got: <%d>", test.greLink.SessionId, gre.SessionId) } + + ifIdx, err = h.DelGreTunnel(ifName, test.greLink) + if err != nil { + t.Fatalf("delete GRE tunnel failed: %v\n", err) + } + + ifaces, err = h.DumpInterfaces() + if err != nil { + t.Fatalf("dumping interfaces failed: %v", err) + } + iface, ok = ifaces[ifIdx] + if ok { + t.Fatalf("GRE interface was found in dump") + } }) } }