From c045b4d17ed9eecfff21fa716e6d689b7474c20e Mon Sep 17 00:00:00 2001 From: Sonika Jindal Date: Fri, 12 Dec 2025 01:25:44 +0000 Subject: [PATCH] Implement FDB Flush API, Add structs and stub --- dataplane/proto/sai/fdb.pb.go | 421 +++++++++++++++++++++-------- dataplane/proto/sai/fdb.proto | 19 ++ dataplane/proto/sai/fdb_grpc.pb.go | 38 +++ dataplane/saiserver/BUILD | 1 + dataplane/saiserver/fdb.go | 43 +++ dataplane/saiserver/saiserver.go | 12 +- 6 files changed, 414 insertions(+), 120 deletions(-) create mode 100644 dataplane/saiserver/fdb.go diff --git a/dataplane/proto/sai/fdb.pb.go b/dataplane/proto/sai/fdb.pb.go index dc8a9fa31..1e0921786 100644 --- a/dataplane/proto/sai/fdb.pb.go +++ b/dataplane/proto/sai/fdb.pb.go @@ -88,6 +88,58 @@ func (FdbEntryAttr) EnumDescriptor() ([]byte, []int) { return file_dataplane_proto_sai_fdb_proto_rawDescGZIP(), []int{0} } +type FdbFlushAttr int32 + +const ( + FdbFlushAttr_FDB_FLUSH_ATTR_UNSPECIFIED FdbFlushAttr = 0 + FdbFlushAttr_FDB_FLUSH_ATTR_BRIDGE_PORT_ID FdbFlushAttr = 1 + FdbFlushAttr_FDB_FLUSH_ATTR_BV_ID FdbFlushAttr = 2 + FdbFlushAttr_FDB_FLUSH_ATTR_ENTRY_TYPE FdbFlushAttr = 3 +) + +// Enum value maps for FdbFlushAttr. +var ( + FdbFlushAttr_name = map[int32]string{ + 0: "FDB_FLUSH_ATTR_UNSPECIFIED", + 1: "FDB_FLUSH_ATTR_BRIDGE_PORT_ID", + 2: "FDB_FLUSH_ATTR_BV_ID", + 3: "FDB_FLUSH_ATTR_ENTRY_TYPE", + } + FdbFlushAttr_value = map[string]int32{ + "FDB_FLUSH_ATTR_UNSPECIFIED": 0, + "FDB_FLUSH_ATTR_BRIDGE_PORT_ID": 1, + "FDB_FLUSH_ATTR_BV_ID": 2, + "FDB_FLUSH_ATTR_ENTRY_TYPE": 3, + } +) + +func (x FdbFlushAttr) Enum() *FdbFlushAttr { + p := new(FdbFlushAttr) + *p = x + return p +} + +func (x FdbFlushAttr) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FdbFlushAttr) Descriptor() protoreflect.EnumDescriptor { + return file_dataplane_proto_sai_fdb_proto_enumTypes[1].Descriptor() +} + +func (FdbFlushAttr) Type() protoreflect.EnumType { + return &file_dataplane_proto_sai_fdb_proto_enumTypes[1] +} + +func (x FdbFlushAttr) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FdbFlushAttr.Descriptor instead. +func (FdbFlushAttr) EnumDescriptor() ([]byte, []int) { + return file_dataplane_proto_sai_fdb_proto_rawDescGZIP(), []int{1} +} + type CreateFdbEntryRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Entry *FdbEntry `protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"` @@ -728,6 +780,110 @@ func (x *RemoveFdbEntriesResponse) GetResps() []*RemoveFdbEntryResponse { return nil } +type CreateFdbFlushRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + BridgePortId *uint64 `protobuf:"varint,1,opt,name=bridge_port_id,json=bridgePortId,proto3,oneof" json:"bridge_port_id,omitempty"` + BvId *uint64 `protobuf:"varint,2,opt,name=bv_id,json=bvId,proto3,oneof" json:"bv_id,omitempty"` + EntryType *int32 `protobuf:"varint,3,opt,name=entry_type,json=entryType,proto3,oneof" json:"entry_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateFdbFlushRequest) Reset() { + *x = CreateFdbFlushRequest{} + mi := &file_dataplane_proto_sai_fdb_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateFdbFlushRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateFdbFlushRequest) ProtoMessage() {} + +func (x *CreateFdbFlushRequest) ProtoReflect() protoreflect.Message { + mi := &file_dataplane_proto_sai_fdb_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateFdbFlushRequest.ProtoReflect.Descriptor instead. +func (*CreateFdbFlushRequest) Descriptor() ([]byte, []int) { + return file_dataplane_proto_sai_fdb_proto_rawDescGZIP(), []int{12} +} + +func (x *CreateFdbFlushRequest) GetBridgePortId() uint64 { + if x != nil && x.BridgePortId != nil { + return *x.BridgePortId + } + return 0 +} + +func (x *CreateFdbFlushRequest) GetBvId() uint64 { + if x != nil && x.BvId != nil { + return *x.BvId + } + return 0 +} + +func (x *CreateFdbFlushRequest) GetEntryType() int32 { + if x != nil && x.EntryType != nil { + return *x.EntryType + } + return 0 +} + +type CreateFdbFlushResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Oid uint64 `protobuf:"varint,1,opt,name=oid,proto3" json:"oid,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateFdbFlushResponse) Reset() { + *x = CreateFdbFlushResponse{} + mi := &file_dataplane_proto_sai_fdb_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateFdbFlushResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateFdbFlushResponse) ProtoMessage() {} + +func (x *CreateFdbFlushResponse) ProtoReflect() protoreflect.Message { + mi := &file_dataplane_proto_sai_fdb_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateFdbFlushResponse.ProtoReflect.Descriptor instead. +func (*CreateFdbFlushResponse) Descriptor() ([]byte, []int) { + return file_dataplane_proto_sai_fdb_proto_rawDescGZIP(), []int{13} +} + +func (x *CreateFdbFlushResponse) GetOid() uint64 { + if x != nil { + return x.Oid + } + return 0 +} + var File_dataplane_proto_sai_fdb_proto protoreflect.FileDescriptor var file_dataplane_proto_sai_fdb_proto_rawDesc = string([]byte{ @@ -867,76 +1023,107 @@ var file_dataplane_proto_sai_fdb_proto_rawDesc = string([]byte{ 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x73, 0x61, 0x69, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x05, 0x72, 0x65, 0x73, 0x70, 0x73, 0x2a, 0xad, 0x02, 0x0a, 0x0c, 0x46, 0x64, - 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x41, 0x74, 0x74, 0x72, 0x12, 0x1e, 0x0a, 0x1a, 0x46, 0x44, - 0x42, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x44, - 0x42, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x46, 0x44, 0x42, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, - 0x5f, 0x41, 0x54, 0x54, 0x52, 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x41, 0x43, 0x54, - 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x46, 0x44, 0x42, 0x5f, 0x45, 0x4e, 0x54, - 0x52, 0x59, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x52, 0x41, - 0x50, 0x5f, 0x49, 0x44, 0x10, 0x03, 0x12, 0x21, 0x0a, 0x1d, 0x46, 0x44, 0x42, 0x5f, 0x45, 0x4e, - 0x54, 0x52, 0x59, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x5f, 0x42, 0x52, 0x49, 0x44, 0x47, 0x45, 0x5f, - 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x49, 0x44, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x44, 0x42, - 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x5f, 0x4d, 0x45, 0x54, 0x41, - 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x46, 0x44, 0x42, 0x5f, 0x45, - 0x4e, 0x54, 0x52, 0x59, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x5f, 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, - 0x4e, 0x54, 0x5f, 0x49, 0x50, 0x10, 0x06, 0x12, 0x1d, 0x0a, 0x19, 0x46, 0x44, 0x42, 0x5f, 0x45, - 0x4e, 0x54, 0x52, 0x59, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x45, - 0x52, 0x5f, 0x49, 0x44, 0x10, 0x07, 0x12, 0x21, 0x0a, 0x1d, 0x46, 0x44, 0x42, 0x5f, 0x45, 0x4e, - 0x54, 0x52, 0x59, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x5f, 0x4d, - 0x41, 0x43, 0x5f, 0x4d, 0x4f, 0x56, 0x45, 0x10, 0x08, 0x32, 0xdd, 0x05, 0x0a, 0x03, 0x46, 0x64, - 0x62, 0x12, 0x6f, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x64, 0x62, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x2c, 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, + 0x73, 0x65, 0x52, 0x05, 0x72, 0x65, 0x73, 0x70, 0x73, 0x22, 0xcc, 0x01, 0x0a, 0x15, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x46, 0x64, 0x62, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x0e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x70, 0x6f, + 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x06, 0xf0, 0xdc, 0x93, + 0xad, 0x0f, 0x01, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x50, 0x6f, 0x72, + 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x05, 0x62, 0x76, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x06, 0xf0, 0xdc, 0x93, 0xad, 0x0f, 0x02, 0x48, 0x01, 0x52, + 0x04, 0x62, 0x76, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x42, 0x06, 0xf0, 0xdc, + 0x93, 0xad, 0x0f, 0x03, 0x48, 0x02, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x88, 0x01, 0x01, 0x3a, 0x06, 0xa0, 0xa9, 0x90, 0xad, 0x0f, 0x2d, 0x42, 0x11, 0x0a, 0x0f, + 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x69, 0x64, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x62, 0x76, 0x5f, 0x69, 0x64, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x2a, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x46, 0x64, 0x62, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x03, 0x6f, 0x69, 0x64, 0x2a, 0xad, 0x02, 0x0a, 0x0c, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x41, 0x74, 0x74, 0x72, 0x12, 0x1e, 0x0a, 0x1a, 0x46, 0x44, 0x42, 0x5f, 0x45, 0x4e, 0x54, + 0x52, 0x59, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x44, 0x42, 0x5f, 0x45, 0x4e, 0x54, + 0x52, 0x59, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x01, 0x12, 0x20, + 0x0a, 0x1c, 0x46, 0x44, 0x42, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x5f, 0x41, 0x54, 0x54, 0x52, + 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, + 0x12, 0x1f, 0x0a, 0x1b, 0x46, 0x44, 0x42, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x5f, 0x41, 0x54, + 0x54, 0x52, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x52, 0x41, 0x50, 0x5f, 0x49, 0x44, 0x10, + 0x03, 0x12, 0x21, 0x0a, 0x1d, 0x46, 0x44, 0x42, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x5f, 0x41, + 0x54, 0x54, 0x52, 0x5f, 0x42, 0x52, 0x49, 0x44, 0x47, 0x45, 0x5f, 0x50, 0x4f, 0x52, 0x54, 0x5f, + 0x49, 0x44, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x44, 0x42, 0x5f, 0x45, 0x4e, 0x54, 0x52, + 0x59, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x5f, 0x44, 0x41, 0x54, 0x41, + 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x46, 0x44, 0x42, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x5f, + 0x41, 0x54, 0x54, 0x52, 0x5f, 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x49, 0x50, + 0x10, 0x06, 0x12, 0x1d, 0x0a, 0x19, 0x46, 0x44, 0x42, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x5f, + 0x41, 0x54, 0x54, 0x52, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x49, 0x44, 0x10, + 0x07, 0x12, 0x21, 0x0a, 0x1d, 0x46, 0x44, 0x42, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x5f, 0x41, + 0x54, 0x54, 0x52, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x5f, 0x4d, 0x41, 0x43, 0x5f, 0x4d, 0x4f, + 0x56, 0x45, 0x10, 0x08, 0x2a, 0x8a, 0x01, 0x0a, 0x0c, 0x46, 0x64, 0x62, 0x46, 0x6c, 0x75, 0x73, + 0x68, 0x41, 0x74, 0x74, 0x72, 0x12, 0x1e, 0x0a, 0x1a, 0x46, 0x44, 0x42, 0x5f, 0x46, 0x4c, 0x55, + 0x53, 0x48, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x46, 0x44, 0x42, 0x5f, 0x46, 0x4c, 0x55, + 0x53, 0x48, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x5f, 0x42, 0x52, 0x49, 0x44, 0x47, 0x45, 0x5f, 0x50, + 0x4f, 0x52, 0x54, 0x5f, 0x49, 0x44, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x46, 0x44, 0x42, 0x5f, + 0x46, 0x4c, 0x55, 0x53, 0x48, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x5f, 0x42, 0x56, 0x5f, 0x49, 0x44, + 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, 0x46, 0x44, 0x42, 0x5f, 0x46, 0x4c, 0x55, 0x53, 0x48, 0x5f, + 0x41, 0x54, 0x54, 0x52, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, + 0x03, 0x32, 0xce, 0x06, 0x0a, 0x03, 0x46, 0x64, 0x62, 0x12, 0x6f, 0x0a, 0x0e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x2c, 0x2e, 0x6c, 0x65, + 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, + 0x73, 0x61, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6c, 0x65, 0x6d, 0x6d, + 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x73, 0x61, + 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6f, 0x0a, 0x0e, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x2c, 0x2e, 0x6c, + 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2e, 0x73, 0x61, 0x69, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x64, 0x62, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6c, 0x65, 0x6d, + 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x73, + 0x61, 0x69, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x81, 0x01, 0x0a, 0x14, + 0x53, 0x65, 0x74, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x12, 0x32, 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x73, 0x61, 0x69, 0x2e, 0x53, 0x65, 0x74, + 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, + 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x73, 0x61, 0x69, + 0x2e, 0x53, 0x65, 0x74, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x41, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x81, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x32, 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, + 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x73, 0x61, 0x69, + 0x2e, 0x47, 0x65, 0x74, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x41, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x6c, + 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2e, 0x73, 0x61, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x64, 0x62, + 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, + 0x67, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x73, 0x61, 0x69, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, + 0x67, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x73, 0x61, 0x69, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x10, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2e, + 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2e, 0x73, 0x61, 0x69, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x64, 0x62, + 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, + 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2e, 0x73, 0x61, 0x69, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x64, 0x62, + 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x6f, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x64, 0x62, 0x46, 0x6c, + 0x75, 0x73, 0x68, 0x12, 0x2c, 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x73, 0x61, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x65, 0x46, 0x64, 0x62, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x73, 0x61, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x6f, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x64, 0x62, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x2c, 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x73, 0x61, 0x69, 0x2e, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x73, 0x61, 0x69, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x81, 0x01, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x46, 0x64, 0x62, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x32, 0x2e, 0x6c, - 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, - 0x2e, 0x73, 0x61, 0x69, 0x2e, 0x53, 0x65, 0x74, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x33, 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, - 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x73, 0x61, 0x69, 0x2e, 0x53, 0x65, 0x74, 0x46, 0x64, 0x62, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x81, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x46, - 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x12, 0x32, 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, - 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x73, 0x61, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x64, 0x62, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x73, 0x61, 0x69, 0x2e, 0x47, 0x65, 0x74, - 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x10, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, - 0x2e, 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, - 0x61, 0x6e, 0x65, 0x2e, 0x73, 0x61, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x64, - 0x62, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2f, 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, - 0x61, 0x6e, 0x65, 0x2e, 0x73, 0x61, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x64, - 0x62, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x75, 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x64, 0x62, 0x45, - 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, - 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x73, 0x61, 0x69, 0x2e, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, - 0x2e, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x73, 0x61, 0x69, 0x2e, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x64, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2f, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x70, - 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x61, 0x69, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x46, 0x64, 0x62, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, 0x65, 0x6d, 0x6d, + 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x61, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( @@ -951,56 +1138,61 @@ func file_dataplane_proto_sai_fdb_proto_rawDescGZIP() []byte { return file_dataplane_proto_sai_fdb_proto_rawDescData } -var file_dataplane_proto_sai_fdb_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_dataplane_proto_sai_fdb_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_dataplane_proto_sai_fdb_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_dataplane_proto_sai_fdb_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_dataplane_proto_sai_fdb_proto_goTypes = []any{ (FdbEntryAttr)(0), // 0: lemming.dataplane.sai.FdbEntryAttr - (*CreateFdbEntryRequest)(nil), // 1: lemming.dataplane.sai.CreateFdbEntryRequest - (*CreateFdbEntryResponse)(nil), // 2: lemming.dataplane.sai.CreateFdbEntryResponse - (*RemoveFdbEntryRequest)(nil), // 3: lemming.dataplane.sai.RemoveFdbEntryRequest - (*RemoveFdbEntryResponse)(nil), // 4: lemming.dataplane.sai.RemoveFdbEntryResponse - (*SetFdbEntryAttributeRequest)(nil), // 5: lemming.dataplane.sai.SetFdbEntryAttributeRequest - (*SetFdbEntryAttributeResponse)(nil), // 6: lemming.dataplane.sai.SetFdbEntryAttributeResponse - (*GetFdbEntryAttributeRequest)(nil), // 7: lemming.dataplane.sai.GetFdbEntryAttributeRequest - (*GetFdbEntryAttributeResponse)(nil), // 8: lemming.dataplane.sai.GetFdbEntryAttributeResponse - (*CreateFdbEntriesRequest)(nil), // 9: lemming.dataplane.sai.CreateFdbEntriesRequest - (*CreateFdbEntriesResponse)(nil), // 10: lemming.dataplane.sai.CreateFdbEntriesResponse - (*RemoveFdbEntriesRequest)(nil), // 11: lemming.dataplane.sai.RemoveFdbEntriesRequest - (*RemoveFdbEntriesResponse)(nil), // 12: lemming.dataplane.sai.RemoveFdbEntriesResponse - (*FdbEntry)(nil), // 13: lemming.dataplane.sai.FdbEntry - (FdbEntryType)(0), // 14: lemming.dataplane.sai.FdbEntryType - (PacketAction)(0), // 15: lemming.dataplane.sai.PacketAction - (*FdbEntryAttribute)(nil), // 16: lemming.dataplane.sai.FdbEntryAttribute + (FdbFlushAttr)(0), // 1: lemming.dataplane.sai.FdbFlushAttr + (*CreateFdbEntryRequest)(nil), // 2: lemming.dataplane.sai.CreateFdbEntryRequest + (*CreateFdbEntryResponse)(nil), // 3: lemming.dataplane.sai.CreateFdbEntryResponse + (*RemoveFdbEntryRequest)(nil), // 4: lemming.dataplane.sai.RemoveFdbEntryRequest + (*RemoveFdbEntryResponse)(nil), // 5: lemming.dataplane.sai.RemoveFdbEntryResponse + (*SetFdbEntryAttributeRequest)(nil), // 6: lemming.dataplane.sai.SetFdbEntryAttributeRequest + (*SetFdbEntryAttributeResponse)(nil), // 7: lemming.dataplane.sai.SetFdbEntryAttributeResponse + (*GetFdbEntryAttributeRequest)(nil), // 8: lemming.dataplane.sai.GetFdbEntryAttributeRequest + (*GetFdbEntryAttributeResponse)(nil), // 9: lemming.dataplane.sai.GetFdbEntryAttributeResponse + (*CreateFdbEntriesRequest)(nil), // 10: lemming.dataplane.sai.CreateFdbEntriesRequest + (*CreateFdbEntriesResponse)(nil), // 11: lemming.dataplane.sai.CreateFdbEntriesResponse + (*RemoveFdbEntriesRequest)(nil), // 12: lemming.dataplane.sai.RemoveFdbEntriesRequest + (*RemoveFdbEntriesResponse)(nil), // 13: lemming.dataplane.sai.RemoveFdbEntriesResponse + (*CreateFdbFlushRequest)(nil), // 14: lemming.dataplane.sai.CreateFdbFlushRequest + (*CreateFdbFlushResponse)(nil), // 15: lemming.dataplane.sai.CreateFdbFlushResponse + (*FdbEntry)(nil), // 16: lemming.dataplane.sai.FdbEntry + (FdbEntryType)(0), // 17: lemming.dataplane.sai.FdbEntryType + (PacketAction)(0), // 18: lemming.dataplane.sai.PacketAction + (*FdbEntryAttribute)(nil), // 19: lemming.dataplane.sai.FdbEntryAttribute } var file_dataplane_proto_sai_fdb_proto_depIdxs = []int32{ - 13, // 0: lemming.dataplane.sai.CreateFdbEntryRequest.entry:type_name -> lemming.dataplane.sai.FdbEntry - 14, // 1: lemming.dataplane.sai.CreateFdbEntryRequest.type:type_name -> lemming.dataplane.sai.FdbEntryType - 15, // 2: lemming.dataplane.sai.CreateFdbEntryRequest.packet_action:type_name -> lemming.dataplane.sai.PacketAction - 13, // 3: lemming.dataplane.sai.RemoveFdbEntryRequest.entry:type_name -> lemming.dataplane.sai.FdbEntry - 13, // 4: lemming.dataplane.sai.SetFdbEntryAttributeRequest.entry:type_name -> lemming.dataplane.sai.FdbEntry - 14, // 5: lemming.dataplane.sai.SetFdbEntryAttributeRequest.type:type_name -> lemming.dataplane.sai.FdbEntryType - 15, // 6: lemming.dataplane.sai.SetFdbEntryAttributeRequest.packet_action:type_name -> lemming.dataplane.sai.PacketAction - 13, // 7: lemming.dataplane.sai.GetFdbEntryAttributeRequest.entry:type_name -> lemming.dataplane.sai.FdbEntry + 16, // 0: lemming.dataplane.sai.CreateFdbEntryRequest.entry:type_name -> lemming.dataplane.sai.FdbEntry + 17, // 1: lemming.dataplane.sai.CreateFdbEntryRequest.type:type_name -> lemming.dataplane.sai.FdbEntryType + 18, // 2: lemming.dataplane.sai.CreateFdbEntryRequest.packet_action:type_name -> lemming.dataplane.sai.PacketAction + 16, // 3: lemming.dataplane.sai.RemoveFdbEntryRequest.entry:type_name -> lemming.dataplane.sai.FdbEntry + 16, // 4: lemming.dataplane.sai.SetFdbEntryAttributeRequest.entry:type_name -> lemming.dataplane.sai.FdbEntry + 17, // 5: lemming.dataplane.sai.SetFdbEntryAttributeRequest.type:type_name -> lemming.dataplane.sai.FdbEntryType + 18, // 6: lemming.dataplane.sai.SetFdbEntryAttributeRequest.packet_action:type_name -> lemming.dataplane.sai.PacketAction + 16, // 7: lemming.dataplane.sai.GetFdbEntryAttributeRequest.entry:type_name -> lemming.dataplane.sai.FdbEntry 0, // 8: lemming.dataplane.sai.GetFdbEntryAttributeRequest.attr_type:type_name -> lemming.dataplane.sai.FdbEntryAttr - 16, // 9: lemming.dataplane.sai.GetFdbEntryAttributeResponse.attr:type_name -> lemming.dataplane.sai.FdbEntryAttribute - 1, // 10: lemming.dataplane.sai.CreateFdbEntriesRequest.reqs:type_name -> lemming.dataplane.sai.CreateFdbEntryRequest - 2, // 11: lemming.dataplane.sai.CreateFdbEntriesResponse.resps:type_name -> lemming.dataplane.sai.CreateFdbEntryResponse - 3, // 12: lemming.dataplane.sai.RemoveFdbEntriesRequest.reqs:type_name -> lemming.dataplane.sai.RemoveFdbEntryRequest - 4, // 13: lemming.dataplane.sai.RemoveFdbEntriesResponse.resps:type_name -> lemming.dataplane.sai.RemoveFdbEntryResponse - 1, // 14: lemming.dataplane.sai.Fdb.CreateFdbEntry:input_type -> lemming.dataplane.sai.CreateFdbEntryRequest - 3, // 15: lemming.dataplane.sai.Fdb.RemoveFdbEntry:input_type -> lemming.dataplane.sai.RemoveFdbEntryRequest - 5, // 16: lemming.dataplane.sai.Fdb.SetFdbEntryAttribute:input_type -> lemming.dataplane.sai.SetFdbEntryAttributeRequest - 7, // 17: lemming.dataplane.sai.Fdb.GetFdbEntryAttribute:input_type -> lemming.dataplane.sai.GetFdbEntryAttributeRequest - 9, // 18: lemming.dataplane.sai.Fdb.CreateFdbEntries:input_type -> lemming.dataplane.sai.CreateFdbEntriesRequest - 11, // 19: lemming.dataplane.sai.Fdb.RemoveFdbEntries:input_type -> lemming.dataplane.sai.RemoveFdbEntriesRequest - 2, // 20: lemming.dataplane.sai.Fdb.CreateFdbEntry:output_type -> lemming.dataplane.sai.CreateFdbEntryResponse - 4, // 21: lemming.dataplane.sai.Fdb.RemoveFdbEntry:output_type -> lemming.dataplane.sai.RemoveFdbEntryResponse - 6, // 22: lemming.dataplane.sai.Fdb.SetFdbEntryAttribute:output_type -> lemming.dataplane.sai.SetFdbEntryAttributeResponse - 8, // 23: lemming.dataplane.sai.Fdb.GetFdbEntryAttribute:output_type -> lemming.dataplane.sai.GetFdbEntryAttributeResponse - 10, // 24: lemming.dataplane.sai.Fdb.CreateFdbEntries:output_type -> lemming.dataplane.sai.CreateFdbEntriesResponse - 12, // 25: lemming.dataplane.sai.Fdb.RemoveFdbEntries:output_type -> lemming.dataplane.sai.RemoveFdbEntriesResponse - 20, // [20:26] is the sub-list for method output_type - 14, // [14:20] is the sub-list for method input_type + 19, // 9: lemming.dataplane.sai.GetFdbEntryAttributeResponse.attr:type_name -> lemming.dataplane.sai.FdbEntryAttribute + 2, // 10: lemming.dataplane.sai.CreateFdbEntriesRequest.reqs:type_name -> lemming.dataplane.sai.CreateFdbEntryRequest + 3, // 11: lemming.dataplane.sai.CreateFdbEntriesResponse.resps:type_name -> lemming.dataplane.sai.CreateFdbEntryResponse + 4, // 12: lemming.dataplane.sai.RemoveFdbEntriesRequest.reqs:type_name -> lemming.dataplane.sai.RemoveFdbEntryRequest + 5, // 13: lemming.dataplane.sai.RemoveFdbEntriesResponse.resps:type_name -> lemming.dataplane.sai.RemoveFdbEntryResponse + 2, // 14: lemming.dataplane.sai.Fdb.CreateFdbEntry:input_type -> lemming.dataplane.sai.CreateFdbEntryRequest + 4, // 15: lemming.dataplane.sai.Fdb.RemoveFdbEntry:input_type -> lemming.dataplane.sai.RemoveFdbEntryRequest + 6, // 16: lemming.dataplane.sai.Fdb.SetFdbEntryAttribute:input_type -> lemming.dataplane.sai.SetFdbEntryAttributeRequest + 8, // 17: lemming.dataplane.sai.Fdb.GetFdbEntryAttribute:input_type -> lemming.dataplane.sai.GetFdbEntryAttributeRequest + 10, // 18: lemming.dataplane.sai.Fdb.CreateFdbEntries:input_type -> lemming.dataplane.sai.CreateFdbEntriesRequest + 12, // 19: lemming.dataplane.sai.Fdb.RemoveFdbEntries:input_type -> lemming.dataplane.sai.RemoveFdbEntriesRequest + 14, // 20: lemming.dataplane.sai.Fdb.CreateFdbFlush:input_type -> lemming.dataplane.sai.CreateFdbFlushRequest + 3, // 21: lemming.dataplane.sai.Fdb.CreateFdbEntry:output_type -> lemming.dataplane.sai.CreateFdbEntryResponse + 5, // 22: lemming.dataplane.sai.Fdb.RemoveFdbEntry:output_type -> lemming.dataplane.sai.RemoveFdbEntryResponse + 7, // 23: lemming.dataplane.sai.Fdb.SetFdbEntryAttribute:output_type -> lemming.dataplane.sai.SetFdbEntryAttributeResponse + 9, // 24: lemming.dataplane.sai.Fdb.GetFdbEntryAttribute:output_type -> lemming.dataplane.sai.GetFdbEntryAttributeResponse + 11, // 25: lemming.dataplane.sai.Fdb.CreateFdbEntries:output_type -> lemming.dataplane.sai.CreateFdbEntriesResponse + 13, // 26: lemming.dataplane.sai.Fdb.RemoveFdbEntries:output_type -> lemming.dataplane.sai.RemoveFdbEntriesResponse + 15, // 27: lemming.dataplane.sai.Fdb.CreateFdbFlush:output_type -> lemming.dataplane.sai.CreateFdbFlushResponse + 21, // [21:28] is the sub-list for method output_type + 14, // [14:21] is the sub-list for method input_type 14, // [14:14] is the sub-list for extension type_name 14, // [14:14] is the sub-list for extension extendee 0, // [0:14] is the sub-list for field type_name @@ -1014,13 +1206,14 @@ func file_dataplane_proto_sai_fdb_proto_init() { file_dataplane_proto_sai_common_proto_init() file_dataplane_proto_sai_fdb_proto_msgTypes[0].OneofWrappers = []any{} file_dataplane_proto_sai_fdb_proto_msgTypes[4].OneofWrappers = []any{} + file_dataplane_proto_sai_fdb_proto_msgTypes[12].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_dataplane_proto_sai_fdb_proto_rawDesc), len(file_dataplane_proto_sai_fdb_proto_rawDesc)), - NumEnums: 1, - NumMessages: 12, + NumEnums: 2, + NumMessages: 14, NumExtensions: 0, NumServices: 1, }, diff --git a/dataplane/proto/sai/fdb.proto b/dataplane/proto/sai/fdb.proto index ca3427c77..c286aaea7 100644 --- a/dataplane/proto/sai/fdb.proto +++ b/dataplane/proto/sai/fdb.proto @@ -91,4 +91,23 @@ service Fdb { rpc GetFdbEntryAttribute (GetFdbEntryAttributeRequest) returns (GetFdbEntryAttributeResponse) {} rpc CreateFdbEntries (CreateFdbEntriesRequest) returns (CreateFdbEntriesResponse) {} rpc RemoveFdbEntries (RemoveFdbEntriesRequest) returns (RemoveFdbEntriesResponse) {} + rpc CreateFdbFlush (CreateFdbFlushRequest) returns (CreateFdbFlushResponse) {} +} + +enum FdbFlushAttr { + FDB_FLUSH_ATTR_UNSPECIFIED = 0; + FDB_FLUSH_ATTR_BRIDGE_PORT_ID = 1; + FDB_FLUSH_ATTR_BV_ID = 2; + FDB_FLUSH_ATTR_ENTRY_TYPE = 3; +} + +message CreateFdbFlushRequest { + option (sai_type) = OBJECT_TYPE_FDB_FLUSH; + optional uint64 bridge_port_id = 1 [(attr_enum_value) = 1]; + optional uint64 bv_id = 2 [(attr_enum_value) = 2]; + optional int32 entry_type = 3 [(attr_enum_value) = 3]; +} + +message CreateFdbFlushResponse { + uint64 oid = 1; } diff --git a/dataplane/proto/sai/fdb_grpc.pb.go b/dataplane/proto/sai/fdb_grpc.pb.go index 5bfd3ef91..29351e7b6 100755 --- a/dataplane/proto/sai/fdb_grpc.pb.go +++ b/dataplane/proto/sai/fdb_grpc.pb.go @@ -25,6 +25,7 @@ const ( Fdb_GetFdbEntryAttribute_FullMethodName = "/lemming.dataplane.sai.Fdb/GetFdbEntryAttribute" Fdb_CreateFdbEntries_FullMethodName = "/lemming.dataplane.sai.Fdb/CreateFdbEntries" Fdb_RemoveFdbEntries_FullMethodName = "/lemming.dataplane.sai.Fdb/RemoveFdbEntries" + Fdb_CreateFdbFlush_FullMethodName = "/lemming.dataplane.sai.Fdb/CreateFdbFlush" ) // FdbClient is the client API for Fdb service. @@ -37,6 +38,7 @@ type FdbClient interface { GetFdbEntryAttribute(ctx context.Context, in *GetFdbEntryAttributeRequest, opts ...grpc.CallOption) (*GetFdbEntryAttributeResponse, error) CreateFdbEntries(ctx context.Context, in *CreateFdbEntriesRequest, opts ...grpc.CallOption) (*CreateFdbEntriesResponse, error) RemoveFdbEntries(ctx context.Context, in *RemoveFdbEntriesRequest, opts ...grpc.CallOption) (*RemoveFdbEntriesResponse, error) + CreateFdbFlush(ctx context.Context, in *CreateFdbFlushRequest, opts ...grpc.CallOption) (*CreateFdbFlushResponse, error) } type fdbClient struct { @@ -107,6 +109,16 @@ func (c *fdbClient) RemoveFdbEntries(ctx context.Context, in *RemoveFdbEntriesRe return out, nil } +func (c *fdbClient) CreateFdbFlush(ctx context.Context, in *CreateFdbFlushRequest, opts ...grpc.CallOption) (*CreateFdbFlushResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateFdbFlushResponse) + err := c.cc.Invoke(ctx, Fdb_CreateFdbFlush_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // FdbServer is the server API for Fdb service. // All implementations should embed UnimplementedFdbServer // for forward compatibility. @@ -117,6 +129,7 @@ type FdbServer interface { GetFdbEntryAttribute(context.Context, *GetFdbEntryAttributeRequest) (*GetFdbEntryAttributeResponse, error) CreateFdbEntries(context.Context, *CreateFdbEntriesRequest) (*CreateFdbEntriesResponse, error) RemoveFdbEntries(context.Context, *RemoveFdbEntriesRequest) (*RemoveFdbEntriesResponse, error) + CreateFdbFlush(context.Context, *CreateFdbFlushRequest) (*CreateFdbFlushResponse, error) } // UnimplementedFdbServer should be embedded to have @@ -144,6 +157,9 @@ func (UnimplementedFdbServer) CreateFdbEntries(context.Context, *CreateFdbEntrie func (UnimplementedFdbServer) RemoveFdbEntries(context.Context, *RemoveFdbEntriesRequest) (*RemoveFdbEntriesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveFdbEntries not implemented") } +func (UnimplementedFdbServer) CreateFdbFlush(context.Context, *CreateFdbFlushRequest) (*CreateFdbFlushResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateFdbFlush not implemented") +} func (UnimplementedFdbServer) testEmbeddedByValue() {} // UnsafeFdbServer may be embedded to opt out of forward compatibility for this service. @@ -272,6 +288,24 @@ func _Fdb_RemoveFdbEntries_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _Fdb_CreateFdbFlush_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateFdbFlushRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FdbServer).CreateFdbFlush(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Fdb_CreateFdbFlush_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FdbServer).CreateFdbFlush(ctx, req.(*CreateFdbFlushRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Fdb_ServiceDesc is the grpc.ServiceDesc for Fdb service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -303,6 +337,10 @@ var Fdb_ServiceDesc = grpc.ServiceDesc{ MethodName: "RemoveFdbEntries", Handler: _Fdb_RemoveFdbEntries_Handler, }, + { + MethodName: "CreateFdbFlush", + Handler: _Fdb_CreateFdbFlush_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "dataplane/proto/sai/fdb.proto", diff --git a/dataplane/saiserver/BUILD b/dataplane/saiserver/BUILD index f96764338..8e0926157 100644 --- a/dataplane/saiserver/BUILD +++ b/dataplane/saiserver/BUILD @@ -4,6 +4,7 @@ go_library( name = "saiserver", srcs = [ "acl.go", + "fdb.go", "hostif.go", "isolation_group.go", "l2.go", diff --git a/dataplane/saiserver/fdb.go b/dataplane/saiserver/fdb.go new file mode 100644 index 000000000..04c3f80c9 --- /dev/null +++ b/dataplane/saiserver/fdb.go @@ -0,0 +1,43 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package saiserver + +import ( + "context" + + "google.golang.org/grpc" + + saipb "github.com/openconfig/lemming/dataplane/proto/sai" + "github.com/openconfig/lemming/dataplane/saiserver/attrmgr" +) + +type fdb struct { + saipb.UnimplementedFdbServer + mgr *attrmgr.AttrMgr + dataplane switchDataplaneAPI +} + +func newFdb(mgr *attrmgr.AttrMgr, dataplane switchDataplaneAPI, s *grpc.Server) (*fdb, error) { + f := &fdb{ + mgr: mgr, + dataplane: dataplane, + } + saipb.RegisterFdbServer(s, f) + return f, nil +} + +func (f *fdb) CreateFdbFlush(ctx context.Context, req *saipb.CreateFdbFlushRequest) (*saipb.CreateFdbFlushResponse, error) { + return &saipb.CreateFdbFlushResponse{}, nil +} diff --git a/dataplane/saiserver/saiserver.go b/dataplane/saiserver/saiserver.go index 6b98465bf..45a243a5f 100644 --- a/dataplane/saiserver/saiserver.go +++ b/dataplane/saiserver/saiserver.go @@ -47,10 +47,6 @@ type dtel struct { saipb.UnimplementedDtelServer } -type fdb struct { - saipb.UnimplementedFdbServer -} - type ipmcGroup struct { saipb.UnimplementedIpmcGroupServer } @@ -202,6 +198,11 @@ func New(ctx context.Context, mgr *attrmgr.AttrMgr, s *grpc.Server, opts *dplane return nil, err } + fdb, err := newFdb(mgr, fwdCtx, s) + if err != nil { + return nil, err + } + srv := &Server{ mgr: mgr, forwardingContext: fwdCtx, @@ -209,7 +210,7 @@ func New(ctx context.Context, mgr *attrmgr.AttrMgr, s *grpc.Server, opts *dplane counter: &counter{}, debugCounter: &debugCounter{}, dtel: &dtel{}, - fdb: &fdb{}, + fdb: fdb, ipmcGroup: &ipmcGroup{}, ipmc: &ipmc{}, ipsec: &ipsec{}, @@ -232,7 +233,6 @@ func New(ctx context.Context, mgr *attrmgr.AttrMgr, s *grpc.Server, opts *dplane saipb.RegisterCounterServer(s, srv.counter) saipb.RegisterDebugCounterServer(s, srv.debugCounter) saipb.RegisterDtelServer(s, srv.dtel) - saipb.RegisterFdbServer(s, srv.fdb) saipb.RegisterIpmcGroupServer(s, srv.ipmcGroup) saipb.RegisterIpmcServer(s, srv.ipmc) saipb.RegisterIpsecServer(s, srv.ipsec)