diff --git a/.github/linters/.protolintrc.yml b/.github/linters/.protolintrc.yml new file mode 100644 index 00000000..a7bfa046 --- /dev/null +++ b/.github/linters/.protolintrc.yml @@ -0,0 +1,5 @@ +lint: + directories: + # The SAI generated proto doesn't follow all the proto naming conventions. + exclude: + - dataplane/standalone/proto \ No newline at end of file diff --git a/dataplane/standalone/apigen/BUILD b/dataplane/standalone/apigen/BUILD index 7f7faec2..605bcde4 100644 --- a/dataplane/standalone/apigen/BUILD +++ b/dataplane/standalone/apigen/BUILD @@ -5,14 +5,13 @@ go_library( srcs = [ "apigen.go", "ccgen.go", - "protogen.go", - "xml.go", ], importpath = "github.com/openconfig/lemming/dataplane/standalone/apigen", visibility = ["//visibility:private"], deps = [ - "@com_github_golang_glog//:glog", - "@com_github_stoewer_go_strcase//:go-strcase", + "//dataplane/standalone/apigen/docparser", + "//dataplane/standalone/apigen/protogen", + "//dataplane/standalone/apigen/saiast", "@org_modernc_cc_v4//:cc", ], ) diff --git a/dataplane/standalone/apigen/README.md b/dataplane/standalone/apigen/README.md new file mode 100644 index 00000000..1b868c97 --- /dev/null +++ b/dataplane/standalone/apigen/README.md @@ -0,0 +1,8 @@ +# APIGen + +## How to Use + +1. Checkout the [SAI API](https://github.com/opencomputeproject/SAI) +2. Install doxygen and run `make doc` +3. Copy the xml files to dataplane/standalone/apigen/xml +4. Run the apigen `go run ./dataplane/standalone/apigen` \ No newline at end of file diff --git a/dataplane/standalone/apigen/apigen.go b/dataplane/standalone/apigen/apigen.go index b241aa14..ad59f767 100644 --- a/dataplane/standalone/apigen/apigen.go +++ b/dataplane/standalone/apigen/apigen.go @@ -20,123 +20,16 @@ import ( "log" "os" "path/filepath" - "regexp" "runtime" "strings" + "github.com/openconfig/lemming/dataplane/standalone/apigen/docparser" + "github.com/openconfig/lemming/dataplane/standalone/apigen/protogen" + "github.com/openconfig/lemming/dataplane/standalone/apigen/saiast" + cc "modernc.org/cc/v4" ) -type saiAPI struct { - ifaces []*saiInterface - funcs map[string]*saiFunc -} - -type saiInterface struct { - name string - funcs []typeDecl -} - -type saiFunc struct { - name string - returnType string - params []typeDecl -} - -type typeDecl struct { - name string - typ string -} - -func handleFunc(name string, decl *cc.Declaration, directDecl *cc.DirectDeclarator) *saiFunc { - sf := &saiFunc{ - name: name, - returnType: decl.DeclarationSpecifiers.Type().String(), - } - if directDecl.ParameterTypeList == nil { - return nil - } - for paramList := directDecl.ParameterTypeList.ParameterList; paramList != nil; paramList = paramList.ParameterList { - if paramList.ParameterDeclaration.Declarator == nil { // When the parameter is void. - return nil - } - pd := typeDecl{ - name: paramList.ParameterDeclaration.Declarator.Name(), - typ: paramList.ParameterDeclaration.Declarator.Type().String(), - } - if ptr, ok := paramList.ParameterDeclaration.Declarator.Type().(*cc.PointerType); ok { - pd.typ = ptr.Elem().String() - pd.name = fmt.Sprintf("*%s", pd.name) - if ptr2, ok := ptr.Elem().(*cc.PointerType); ok { - pd.typ = ptr2.Elem().String() - pd.name = fmt.Sprintf("*%s", pd.name) - } - } - - if paramList.ParameterDeclaration.DeclarationSpecifiers.TypeQualifier != nil && paramList.ParameterDeclaration.DeclarationSpecifiers.TypeQualifier.Case == cc.TypeQualifierConst { - pd.typ = fmt.Sprintf("const %s", pd.typ) - } - sf.params = append(sf.params, pd) - } - return sf -} - -func handleIfaces(name string, decl *cc.Declaration) *saiInterface { - ts := decl.DeclarationSpecifiers.DeclarationSpecifiers.TypeSpecifier - if ts.StructOrUnionSpecifier == nil || ts.StructOrUnionSpecifier.StructDeclarationList == nil { - return nil - } - if !strings.Contains(name, "api_t") { - return nil - } - si := &saiInterface{ - name: name, - } - - structSpec := ts.StructOrUnionSpecifier.StructDeclarationList - for sd := structSpec; sd != nil; sd = sd.StructDeclarationList { - si.funcs = append(si.funcs, typeDecl{ - name: sd.StructDeclaration.StructDeclaratorList.StructDeclarator.Declarator.Name(), - typ: sd.StructDeclaration.StructDeclaratorList.StructDeclarator.Declarator.Type().String(), - }) - } - return si -} - -func getFuncAndTypes(ast *cc.AST) *saiAPI { - sa := saiAPI{ - funcs: map[string]*saiFunc{}, - } - for unit := ast.TranslationUnit; unit != nil; unit = unit.TranslationUnit { - decl := unit.ExternalDeclaration.Declaration - if decl == nil { - continue - } - if decl.InitDeclaratorList == nil { - continue - } - - name := decl.InitDeclaratorList.InitDeclarator.Declarator.Name() - if !strings.Contains(name, "sai") { - continue - } - - directDecl := decl.InitDeclaratorList.InitDeclarator.Declarator.DirectDeclarator - if directDecl != nil { // Possible func declaration. - if fn := handleFunc(name, decl, directDecl); fn != nil { - sa.funcs[fn.name] = fn - } - } - // Possible struct type declaration. - if decl.DeclarationSpecifiers != nil && decl.DeclarationSpecifiers.DeclarationSpecifiers != nil && decl.DeclarationSpecifiers.DeclarationSpecifiers.TypeSpecifier != nil { - if si := handleIfaces(name, decl); si != nil { - sa.ifaces = append(sa.ifaces, si) - } - } - } - return &sa -} - func parse(header string, includePaths ...string) (*cc.AST, error) { cfg, err := cc.NewConfig(runtime.GOOS, runtime.GOARCH) if err != nil { @@ -160,19 +53,6 @@ const ( protoOutDir = "dataplane/standalone/proto" ) -var ( - supportedOperation = map[string]bool{ - "create": true, - "remove": true, - "get_attribute": true, - "set_attribute": true, - "clear_stats": true, - "get_stats": true, - "get_stats_ext": true, - } - funcExpr = regexp.MustCompile(`^([a-z]*_)(\w*)_(attribute|stats_ext|stats)|([a-z]*)_(\w*)$`) -) - func generate() error { headerFile, err := filepath.Abs(filepath.Join(saiPath, "inc/sai.h")) if err != nil { @@ -190,36 +70,30 @@ func generate() error { if err != nil { return err } - sai := getFuncAndTypes(ast) - xmlInfo, err := parseSAIXMLDir() + sai := saiast.Get(ast) + xmlInfo, err := docparser.ParseSAIXMLDir() if err != nil { return err } - apis := make(map[string]*protoAPITmplData) - common, err := populateCommonTypes(xmlInfo) + protos, err := protogen.Generate(xmlInfo, sai) if err != nil { return err } - for _, iface := range sai.ifaces { - nameTrimmed := strings.TrimSuffix(strings.TrimPrefix(iface.name, "sai_"), "_api_t") + for _, iface := range sai.Ifaces { + nameTrimmed := strings.TrimSuffix(strings.TrimPrefix(iface.Name, "sai_"), "_api_t") ccData := ccTemplateData{ IncludeGuard: fmt.Sprintf("DATAPLANE_STANDALONE_SAI_%s_H_", strings.ToUpper(nameTrimmed)), Header: fmt.Sprintf("%s.h", nameTrimmed), - APIType: iface.name, + APIType: iface.Name, APIName: nameTrimmed, } - for _, fn := range iface.funcs { - tf, isSwitchScoped, entry := createCCData(sai, fn) + for _, fn := range iface.Funcs { + meta := sai.GetFuncMeta(fn) + tf := createCCData(meta, sai, fn) ccData.Funcs = append(ccData.Funcs, *tf) - - err := populateTmplDataFromFunc(apis, xmlInfo, tf.Name, entry, tf.Operation, tf.TypeName, iface.name, isSwitchScoped) - if err != nil { - return err - } } - header, err := os.Create(filepath.Join(ccOutDir, ccData.Header)) if err != nil { return err @@ -228,26 +102,21 @@ func generate() error { if err != nil { return err } - proto, err := os.Create(filepath.Join(protoOutDir, fmt.Sprintf("%s.proto", nameTrimmed))) - if err != nil { - return err - } + if err := headerTmpl.Execute(header, ccData); err != nil { return err } if err := ccTmpl.Execute(impl, ccData); err != nil { return err } - if err := protoTmpl.Execute(proto, apis[iface.name]); err != nil { + } + for file, content := range protos { + if err := os.WriteFile(filepath.Join(protoOutDir, file), []byte(content), 0600); err != nil { return err } } - protoCommonFile, err := os.Create(filepath.Join(protoOutDir, "common.proto")) - if err != nil { - return err - } - return protoCommonTmpl.Execute(protoCommonFile, common) + return nil } func main() { diff --git a/dataplane/standalone/apigen/ccgen.go b/dataplane/standalone/apigen/ccgen.go index 99cfa4f0..0d48728c 100644 --- a/dataplane/standalone/apigen/ccgen.go +++ b/dataplane/standalone/apigen/ccgen.go @@ -18,58 +18,56 @@ import ( "fmt" "strings" "text/template" + + "github.com/openconfig/lemming/dataplane/standalone/apigen/saiast" ) -func createCCData(sai *saiAPI, fn typeDecl) (*templateFunc, bool, string) { - name := strings.TrimSuffix(strings.TrimPrefix(fn.name, "sai_"), "_fn") +func createCCData(meta *saiast.FuncMetadata, sai *saiast.SAIAPI, fn *saiast.TypeDecl) *templateFunc { + name := meta.Name tf := &templateFunc{ - ReturnType: sai.funcs[fn.typ].returnType, + ReturnType: sai.Funcs[fn.Typ].ReturnType, Name: name, + Operation: meta.Operation, + TypeName: meta.TypeName, } - isSwitchScoped := false - entryType := "" var paramDefs []string var paramVars []string - for i, param := range sai.funcs[fn.typ].params { - paramDefs = append(paramDefs, fmt.Sprintf("%s %s", param.typ, param.name)) - name := strings.ReplaceAll(param.name, "*", "") + for _, param := range sai.Funcs[fn.Typ].Params { + paramDefs = append(paramDefs, fmt.Sprintf("%s %s", param.Typ, param.Name)) + name := strings.ReplaceAll(param.Name, "*", "") // Functions that operator on entries take some entry type instead of an object id as argument. // Generate a entry union with the pointer to entry instead. - if strings.Contains(param.typ, "entry") { + if strings.Contains(param.Typ, "entry") { tf.Entry = fmt.Sprintf("common_entry_t entry = {.%s = %s};", name, name) name = "entry" - entryType = trimSAIName(strings.TrimPrefix(param.typ, "const "), true, false) - } - if i == 1 && param.name == "switch_id" { - isSwitchScoped = true } paramVars = append(paramVars, name) } tf.Args = strings.Join(paramDefs, ", ") tf.Vars = strings.Join(paramVars, ", ") - matches := funcExpr.FindStringSubmatch(name) - tf.Operation = matches[1] + matches[4] + matches[3] - tf.UseCommonAPI = supportedOperation[tf.Operation] - tf.TypeName = strings.ToUpper(matches[2]) + strings.ToUpper(matches[5]) - - // Handle plural types using the bulk API. - if strings.HasSuffix(tf.TypeName, "PORTS") || strings.HasSuffix(tf.TypeName, "ENTRIES") || strings.HasSuffix(tf.TypeName, "MEMBERS") || strings.HasSuffix(tf.TypeName, "LISTS") { - tf.Operation += "_bulk" - tf.TypeName = strings.TrimSuffix(tf.TypeName, "S") - if strings.HasSuffix(tf.TypeName, "IE") { - tf.TypeName = strings.TrimSuffix(tf.TypeName, "IE") - tf.TypeName += "Y" - } - } // Function or types that don't follow standard naming. if strings.Contains(tf.TypeName, "PORT_ALL") || strings.Contains(tf.TypeName, "ALL_NEIGHBOR") { tf.UseCommonAPI = false } - return tf, isSwitchScoped, entryType + return tf +} + +var supportedOperation = map[string]bool{ + "create": true, + "remove": true, + "get_attribute": true, + "set_attribute": true, + "clear_stats": true, + "get_stats": true, + "get_stats_ext": true, + "create_bulk": true, + "remove_bulk": true, + "set_attribute_bulk": true, + "get_attribute_bulk": true, } var ( diff --git a/dataplane/standalone/apigen/docparser/BUILD b/dataplane/standalone/apigen/docparser/BUILD new file mode 100644 index 00000000..afcc5e67 --- /dev/null +++ b/dataplane/standalone/apigen/docparser/BUILD @@ -0,0 +1,8 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "docparser", + srcs = ["docparser.go"], + importpath = "github.com/openconfig/lemming/dataplane/standalone/apigen/docparser", + visibility = ["//visibility:public"], +) diff --git a/dataplane/standalone/apigen/xml.go b/dataplane/standalone/apigen/docparser/docparser.go similarity index 83% rename from dataplane/standalone/apigen/xml.go rename to dataplane/standalone/apigen/docparser/docparser.go index 5a8492c3..4d89be45 100644 --- a/dataplane/standalone/apigen/xml.go +++ b/dataplane/standalone/apigen/docparser/docparser.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -package main +// Package docparser implements a parser for Doxygen xml. +package docparser import ( "encoding/xml" @@ -23,6 +24,29 @@ import ( "strings" ) +// SAIInfo contains all the info parsed from the doxygen. +type SAIInfo struct { + // attrs is a map from sai type (sai_port_t) to its attributes. + Attrs map[string]*Attr + // attrs is a map from enum name (sai_port_media_type_t) to the values of the enum. + Enums map[string][]string +} + +// attrInfo holds values and types for an attribute enum. +type Attr struct { + CreateFields []*AttrTypeName + SetFields []*AttrTypeName + ReadFields []*AttrTypeName +} + +// attrTypeName contains the type and name of the attribute. +type AttrTypeName struct { + MemberName string + SaiType string + EnumName string + Comment string +} + // Doxygen is the root of the generated xml struct. type Doxygen struct { CompoundDef CompoundDef `xml:"compounddef"` @@ -72,11 +96,11 @@ type SimpleSect struct { const xmlPath = "dataplane/standalone/apigen/xml" -// parseSAIXMLDir parses all the SAI Doxygen XML files in a directory. -func parseSAIXMLDir() (*protoGenInfo, error) { - i := &protoGenInfo{ - attrs: make(map[string]attrInfo), - enums: make(map[string][]string), +// ParseSAIXMLDir parses all the SAI Doxygen XML files in a directory. +func ParseSAIXMLDir() (*SAIInfo, error) { + i := &SAIInfo{ + Attrs: make(map[string]*Attr), + Enums: make(map[string][]string), } files, err := os.ReadDir(xmlPath) if err != nil { @@ -94,8 +118,8 @@ var typeNameExpr = regexp.MustCompile("sai_(.*)_attr.*") // memberToAttrInfo converts the MemberDef into attrInfo extracting the enum values, // their types, and if they createable, readable, and/or writable. -func memberToAttrInfo(enum MemberDef) attrInfo { - info := attrInfo{} +func memberToAttrInfo(enum MemberDef) *Attr { + info := &Attr{} trimStr := strings.TrimSuffix(strings.TrimPrefix(enum.Name, "_"), "_t") + "_" for _, value := range enum.EnumValues { var canCreate, canRead, canSet bool @@ -122,20 +146,20 @@ func memberToAttrInfo(enum MemberDef) attrInfo { if !canCreate && !canRead && !canSet { continue } - atn := attrTypeName{ + atn := &AttrTypeName{ EnumName: value.Name, MemberName: strings.TrimPrefix(strings.ToLower(value.Name), trimStr), SaiType: saiType, Comment: strings.TrimSpace(value.BriefDescription.Paragraph.InlineText), } if canCreate { - info.createFields = append(info.createFields, atn) + info.CreateFields = append(info.CreateFields, atn) } if canRead { - info.readFields = append(info.readFields, atn) + info.ReadFields = append(info.ReadFields, atn) } if canSet { - info.setFields = append(info.setFields, atn) + info.SetFields = append(info.SetFields, atn) } } return info @@ -150,7 +174,7 @@ func memberToEnumValueStrings(enum MemberDef) []string { } // parseXMLFile parses a single XML and appends the values into xmlInfo. -func parseXMLFile(file string, xmlInfo *protoGenInfo) error { +func parseXMLFile(file string, xmlInfo *SAIInfo) error { b, err := os.ReadFile(file) if err != nil { return err @@ -172,35 +196,12 @@ func parseXMLFile(file string, xmlInfo *protoGenInfo) error { return fmt.Errorf("unexpected number of matches: got %v", matches) } info := memberToAttrInfo(enum) - xmlInfo.attrs[strings.ToUpper(matches[1])] = info + xmlInfo.Attrs[strings.ToUpper(matches[1])] = info } else { - xmlInfo.enums[strings.TrimPrefix(enum.Name, "_")] = memberToEnumValueStrings(enum) + xmlInfo.Enums[strings.TrimPrefix(enum.Name, "_")] = memberToEnumValueStrings(enum) } } } return nil } - -// attrInfo holds values and types for an attribute enum. -type attrInfo struct { - createFields []attrTypeName - setFields []attrTypeName - readFields []attrTypeName -} - -// attrTypeName contains the type and name of the attribute. -type attrTypeName struct { - MemberName string - SaiType string - EnumName string - Comment string -} - -// protoGenInfo contains all the info parsed from the doxygen. -type protoGenInfo struct { - // attrs is a map from sai type (sai_port_t) to its attributes. - attrs map[string]attrInfo - // attrs is a map from enum name (sai_port_media_type_t) to the values of the enum. - enums map[string][]string -} diff --git a/dataplane/standalone/apigen/protogen/BUILD b/dataplane/standalone/apigen/protogen/BUILD new file mode 100644 index 00000000..33339245 --- /dev/null +++ b/dataplane/standalone/apigen/protogen/BUILD @@ -0,0 +1,14 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "protogen", + srcs = ["protogen.go"], + importpath = "github.com/openconfig/lemming/dataplane/standalone/apigen/protogen", + visibility = ["//visibility:public"], + deps = [ + "//dataplane/standalone/apigen/docparser", + "//dataplane/standalone/apigen/saiast", + "@com_github_golang_glog//:glog", + "@com_github_stoewer_go_strcase//:go-strcase", + ], +) diff --git a/dataplane/standalone/apigen/protogen.go b/dataplane/standalone/apigen/protogen/protogen.go similarity index 83% rename from dataplane/standalone/apigen/protogen.go rename to dataplane/standalone/apigen/protogen/protogen.go index 17716315..3e48cac8 100644 --- a/dataplane/standalone/apigen/protogen.go +++ b/dataplane/standalone/apigen/protogen/protogen.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -package main +// Package protogen implements a generator for SAI to protobuf. +package protogen import ( "fmt" @@ -20,13 +21,43 @@ import ( "text/template" "unicode" + "github.com/openconfig/lemming/dataplane/standalone/apigen/docparser" + "github.com/openconfig/lemming/dataplane/standalone/apigen/saiast" + log "github.com/golang/glog" strcase "github.com/stoewer/go-strcase" ) -// populateCommonTypes fills the templates for all types that aren't attributes. +// Generates returns a map of files containing the generated code code. +func Generate(doc *docparser.SAIInfo, sai *saiast.SAIAPI) (map[string]string, error) { + files := map[string]string{} + common, err := generateCommonTypes(doc) + if err != nil { + return nil, err + } + files["common.proto"] = common + + apis := map[string]*protoAPITmplData{} + for _, iface := range sai.Ifaces { + apiName := strings.TrimSuffix(strings.TrimPrefix(iface.Name, "sai_"), "_api_t") + for _, fn := range iface.Funcs { + meta := sai.GetFuncMeta(fn) + if err := populateTmplDataFromFunc(apis, doc, apiName, meta); err != nil { + return nil, err + } + } + var builder strings.Builder + if err := protoTmpl.Execute(&builder, apis[apiName]); err != nil { + return nil, err + } + files[apiName+".proto"] = builder.String() + } + return files, nil +} + +// generateCommonTypes returns all contents of the common proto. // These all reside in the common.proto file to simplify handling imports. -func populateCommonTypes(docInfo *protoGenInfo) (*protoCommonTmplData, error) { +func generateCommonTypes(docInfo *docparser.SAIInfo) (string, error) { common := &protoCommonTmplData{ Enums: map[string]*protoEnum{}, Lists: map[string]*protoTmplMessage{}, @@ -38,9 +69,9 @@ func populateCommonTypes(docInfo *protoGenInfo) (*protoCommonTmplData, error) { } } // Generate non-attribute enums. - for name, vals := range docInfo.enums { - protoName := trimSAIName(name, true, false) - unspecifiedName := trimSAIName(name, false, true) + "_UNSPECIFIED" + for name, vals := range docInfo.Enums { + protoName := saiast.TrimSAIName(name, true, false) + unspecifiedName := saiast.TrimSAIName(name, false, true) + "_UNSPECIFIED" enum := &protoEnum{ Name: protoName, Values: []protoEnumValues{{Index: 0, Name: unspecifiedName}}, @@ -57,18 +88,18 @@ func populateCommonTypes(docInfo *protoGenInfo) (*protoCommonTmplData, error) { common.Enums[protoName] = enum } // Find all the repeated fields that appear in oneof and generate a list wrapper type. - for n, attr := range docInfo.attrs { - for _, f := range attr.readFields { + for n, attr := range docInfo.Attrs { + for _, f := range attr.ReadFields { msgName, isRepeated, err := saiTypeToProtoType(f.SaiType, docInfo, true) if err != nil { - return nil, err + return "", err } if !isRepeated { continue } repeatedName, _, err := saiTypeToProtoType(f.SaiType, docInfo, false) if err != nil { - return nil, err + return "", err } msg := &protoTmplMessage{ Name: msgName, @@ -80,34 +111,38 @@ func populateCommonTypes(docInfo *protoGenInfo) (*protoCommonTmplData, error) { } common.Lists[msgName] = msg } - attrFields, err := createAttrs(2, docInfo, attr.readFields, true) + attrFields, err := createAttrs(2, docInfo, attr.ReadFields, true) if err != nil { - return nil, err + return "", err } common.Lists[n] = &protoTmplMessage{ Fields: attrFields, - Name: trimSAIName(n, true, false) + "Attribute", + Name: saiast.TrimSAIName(n, true, false) + "Attribute", AttrsWrapperStart: "oneof {", AttrsWrapperEnd: "}", } } - return common, nil + var builder strings.Builder + if err := protoCommonTmpl.Execute(&builder, common); err != nil { + return "", err + } + return builder.String(), nil } // populateTmplDataFromFunc populatsd the protobuf template struct from a SAI function call. -func populateTmplDataFromFunc(apis map[string]*protoAPITmplData, docInfo *protoGenInfo, funcName, entryType, operation, typeName, apiName string, isSwitchScoped bool) error { +func populateTmplDataFromFunc(apis map[string]*protoAPITmplData, docInfo *docparser.SAIInfo, apiName string, meta *saiast.FuncMetadata) error { if _, ok := apis[apiName]; !ok { apis[apiName] = &protoAPITmplData{ Enums: make(map[string]protoEnum), - ServiceName: trimSAIName(apiName, true, false), + ServiceName: saiast.TrimSAIName(apiName, true, false), } } req := &protoTmplMessage{ - Name: strcase.UpperCamelCase(funcName + "_request"), + Name: strcase.UpperCamelCase(meta.Name + "_request"), } resp := &protoTmplMessage{ - Name: strcase.UpperCamelCase(funcName + "_response"), + Name: strcase.UpperCamelCase(meta.Name + "_response"), } idField := protoTmplField{ @@ -115,29 +150,29 @@ func populateTmplDataFromFunc(apis map[string]*protoAPITmplData, docInfo *protoG ProtoType: "uint64", Name: "oid", } - if entryType != "" { + if meta.Entry != "" { idField = protoTmplField{ Index: 1, - ProtoType: entryType, + ProtoType: meta.Entry, Name: "entry", } } // Handle proto generation - switch operation { + switch meta.Operation { case "create": requestIdx := 1 - if isSwitchScoped { + if meta.IsSwitchScoped { req.Fields = append(req.Fields, protoTmplField{ Index: requestIdx, ProtoType: "uint64", Name: "switch", }) - } else if entryType != "" { + } else if meta.Entry != "" { req.Fields = append(req.Fields, idField) } requestIdx++ - attrs, err := createAttrs(requestIdx, docInfo, docInfo.attrs[typeName].createFields, false) + attrs, err := createAttrs(requestIdx, docInfo, docInfo.Attrs[meta.TypeName].CreateFields, false) if err != nil { return err } @@ -150,37 +185,37 @@ func populateTmplDataFromFunc(apis map[string]*protoAPITmplData, docInfo *protoG }) case "set_attribute": // If there are no settable attributes, do nothing. - if len(docInfo.attrs[typeName].setFields) == 0 { + if len(docInfo.Attrs[meta.TypeName].SetFields) == 0 { return nil } req.Fields = append(req.Fields, idField) req.AttrsWrapperStart = "oneof attr {" req.AttrsWrapperEnd = "}" - attrs, err := createAttrs(2, docInfo, docInfo.attrs[typeName].setFields, true) + attrs, err := createAttrs(2, docInfo, docInfo.Attrs[meta.TypeName].SetFields, true) if err != nil { return err } req.Attrs = attrs case "get_attribute": req.Fields = append(req.Fields, idField, protoTmplField{ - ProtoType: strcase.UpperCamelCase(typeName + " attr"), + ProtoType: strcase.UpperCamelCase(meta.TypeName + " attr"), Index: 2, Name: "attr_type", }) resp.Fields = append(resp.Fields, protoTmplField{ Index: 1, Name: "attr", - ProtoType: strcase.UpperCamelCase(typeName + "Attribute"), + ProtoType: strcase.UpperCamelCase(meta.TypeName + "Attribute"), }) // attrEnum is the special emun that describes the possible values can be set/get for the API. attrEnum := protoEnum{ - Name: strcase.UpperCamelCase(typeName + "_ATTR"), - Values: []protoEnumValues{{Index: 0, Name: typeName + "_ATTR_UNSPECIFIED"}}, + Name: strcase.UpperCamelCase(meta.TypeName + "_ATTR"), + Values: []protoEnumValues{{Index: 0, Name: meta.TypeName + "_ATTR_UNSPECIFIED"}}, } // For the attributes, generate code for the type if needed. - for i, attr := range docInfo.attrs[typeName].readFields { + for i, attr := range docInfo.Attrs[meta.TypeName].ReadFields { attrEnum.Values = append(attrEnum.Values, protoEnumValues{ Index: i + 1, Name: strings.TrimPrefix(attr.EnumName, "SAI_"), @@ -188,7 +223,7 @@ func populateTmplDataFromFunc(apis map[string]*protoAPITmplData, docInfo *protoG // Handle function pointers as streaming RPCs. if strings.Contains(attr.SaiType, "sai_pointer_t") { funcName := strings.Split(attr.SaiType, " ")[1] - name := trimSAIName(strings.TrimSuffix(funcName, "_fn"), true, false) + name := saiast.TrimSAIName(strings.TrimSuffix(funcName, "_fn"), true, false) req := &protoTmplMessage{ Name: strcase.UpperCamelCase(name + "_request"), } @@ -216,12 +251,12 @@ func populateTmplDataFromFunc(apis map[string]*protoAPITmplData, docInfo *protoG apis[apiName].RPCs = append(apis[apiName].RPCs, protoRPC{ RequestName: req.Name, ResponseName: resp.Name, - Name: strcase.UpperCamelCase(funcName), + Name: strcase.UpperCamelCase(meta.Name), }) return nil } -func createAttrs(startIdx int, xmlInfo *protoGenInfo, attrs []attrTypeName, inOneof bool) ([]protoTmplField, error) { +func createAttrs(startIdx int, xmlInfo *docparser.SAIInfo, attrs []*docparser.AttrTypeName, inOneof bool) ([]protoTmplField, error) { fields := []protoTmplField{} for _, attr := range attrs { // Function pointers are implemented as streaming RPCs instead of settable attributes. @@ -861,25 +896,28 @@ message FdbEventNotificationData { // saiTypeToProtoTypeCompound handles compound sai types (eg list of enums). // The map key contains the base type (eg list) and func accepts the subtype (eg an enum type) // and returns the full type string (eg repeated sample_enum). -var saiTypeToProtoTypeCompound = map[string]func(subType string, xmlInfo *protoGenInfo, inOneof bool) (string, bool){ - "sai_s32_list_t": func(subType string, xmlInfo *protoGenInfo, inOneof bool) (string, bool) { - if _, ok := xmlInfo.enums[subType]; !ok { +var saiTypeToProtoTypeCompound = map[string]func(subType string, xmlInfo *docparser.SAIInfo, inOneof bool) (string, bool){ + "sai_s32_list_t": func(subType string, xmlInfo *docparser.SAIInfo, inOneof bool) (string, bool) { + if _, ok := xmlInfo.Enums[subType]; !ok { return "", false } if inOneof { - return trimSAIName(subType, true, false) + "List", true + return saiast.TrimSAIName(subType, true, false) + "List", true } - return "repeated " + trimSAIName(subType, true, false), true + return "repeated " + saiast.TrimSAIName(subType, true, false), true + }, + "sai_acl_field_data_t": func(next string, xmlInfo *docparser.SAIInfo, inOneof bool) (string, bool) { + return "AclFieldData", false + }, + "sai_acl_action_data_t": func(next string, xmlInfo *docparser.SAIInfo, inOneof bool) (string, bool) { + return "AclActionData", false }, - // TODO: Support these types - "sai_acl_field_data_t": func(next string, xmlInfo *protoGenInfo, inOneof bool) (string, bool) { return "AclFieldData", false }, - "sai_acl_action_data_t": func(next string, xmlInfo *protoGenInfo, inOneof bool) (string, bool) { return "AclActionData", false }, - "sai_pointer_t": func(next string, xmlInfo *protoGenInfo, inOneof bool) (string, bool) { return "-", false }, + "sai_pointer_t": func(next string, xmlInfo *docparser.SAIInfo, inOneof bool) (string, bool) { return "-", false }, // Noop, these are special cases. } // saiTypeToProtoType returns the protobuf type string for a SAI type. // example: sai_u8_list_t -> repeated uint32 -func saiTypeToProtoType(saiType string, xmlInfo *protoGenInfo, inOneof bool) (string, bool, error) { +func saiTypeToProtoType(saiType string, xmlInfo *docparser.SAIInfo, inOneof bool) (string, bool, error) { saiType = strings.TrimPrefix(saiType, "const ") if pt, ok := saiTypeToProto[saiType]; ok { @@ -891,8 +929,8 @@ func saiTypeToProtoType(saiType string, xmlInfo *protoGenInfo, inOneof bool) (st } return pt.ProtoType, false, nil } - if _, ok := xmlInfo.enums[saiType]; ok { - return trimSAIName(saiType, true, false), false, nil + if _, ok := xmlInfo.Enums[saiType]; ok { + return saiast.TrimSAIName(saiType, true, false), false, nil } if splits := strings.Split(saiType, " "); len(splits) == 2 { @@ -906,16 +944,3 @@ func saiTypeToProtoType(saiType string, xmlInfo *protoGenInfo, inOneof bool) (st return "", false, fmt.Errorf("unknown sai type: %v", saiType) } - -// trimSAIName trims sai_ prefix and _t from the string -func trimSAIName(name string, makeCamel, makeUpper bool) string { - str := strings.TrimSuffix(strings.TrimPrefix(name, "sai_"), "_t") - if makeCamel { - str = strcase.UpperCamelCase(str) - } - if makeUpper { - str = strings.ToUpper(str) - } - - return str -} diff --git a/dataplane/standalone/apigen/saiast/BUILD b/dataplane/standalone/apigen/saiast/BUILD new file mode 100644 index 00000000..b952c10c --- /dev/null +++ b/dataplane/standalone/apigen/saiast/BUILD @@ -0,0 +1,12 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "saiast", + srcs = ["saiast.go"], + importpath = "github.com/openconfig/lemming/dataplane/standalone/apigen/saiast", + visibility = ["//visibility:public"], + deps = [ + "@com_github_stoewer_go_strcase//:go-strcase", + "@org_modernc_cc_v4//:cc", + ], +) diff --git a/dataplane/standalone/apigen/saiast/saiast.go b/dataplane/standalone/apigen/saiast/saiast.go new file mode 100644 index 00000000..0df0da49 --- /dev/null +++ b/dataplane/standalone/apigen/saiast/saiast.go @@ -0,0 +1,199 @@ +// Copyright 2023 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 saiast contains information parsed from AST of the SAI header. +package saiast + +import ( + "fmt" + "regexp" + "strings" + + "modernc.org/cc/v4" + + "github.com/stoewer/go-strcase" +) + +// SAIAPI contains the information retreived from the AST. +type SAIAPI struct { + Ifaces []*SAIInterface + Funcs map[string]*SAIFunc +} + +// SAIInterface contains the functions contained in the interface. +type SAIInterface struct { + Name string + Funcs []*TypeDecl +} + +// SAIFunc is a function definition. +type SAIFunc struct { + Name string + ReturnType string + Params []TypeDecl +} + +// TypeDecl stores the name and type of a declation. +type TypeDecl struct { + Name string + Typ string +} + +// Get returns the information parses from the AST. +func Get(ast *cc.AST) *SAIAPI { + sa := SAIAPI{ + Funcs: map[string]*SAIFunc{}, + } + for unit := ast.TranslationUnit; unit != nil; unit = unit.TranslationUnit { + decl := unit.ExternalDeclaration.Declaration + if decl == nil { + continue + } + if decl.InitDeclaratorList == nil { + continue + } + + name := decl.InitDeclaratorList.InitDeclarator.Declarator.Name() + if !strings.Contains(name, "sai") { + continue + } + + directDecl := decl.InitDeclaratorList.InitDeclarator.Declarator.DirectDeclarator + if directDecl != nil { // Possible func declaration. + if fn := handleFunc(name, decl, directDecl); fn != nil { + sa.Funcs[fn.Name] = fn + } + } + // Possible struct type declaration. + if decl.DeclarationSpecifiers != nil && decl.DeclarationSpecifiers.DeclarationSpecifiers != nil && decl.DeclarationSpecifiers.DeclarationSpecifiers.TypeSpecifier != nil { + if si := handleIfaces(name, decl); si != nil { + sa.Ifaces = append(sa.Ifaces, si) + } + } + } + return &sa +} + +// TrimSAIName trims sai_ prefix and _t from the string +func TrimSAIName(name string, makeCamel, makeUpper bool) string { + str := strings.TrimSuffix(strings.TrimPrefix(name, "sai_"), "_t") + if makeCamel { + str = strcase.UpperCamelCase(str) + } + if makeUpper { + str = strings.ToUpper(str) + } + + return str +} + +var funcExpr = regexp.MustCompile(`^([a-z]*_)(\w*)_(attribute|stats_ext|stats)|([a-z]*)_(\w*)$`) + +// FuncMetadata contains additional information derived from a func definition. +type FuncMetadata struct { + // Name is the name of the function: create_acl_table + Name string + // Operation is the action to take: create + Operation string + // TypeName is the name of the type: acl_table + TypeName string + // Entry is the name of the entry using the instead of id. + Entry string + // IsSwitchScoped is whether the API take a switch id as a parameter. + IsSwitchScoped bool +} + +// GetFuncMeta returns the metadata for a SAI func. +func (sai *SAIAPI) GetFuncMeta(fn *TypeDecl) *FuncMetadata { + meta := &FuncMetadata{} + meta.Name = strings.TrimSuffix(strings.TrimPrefix(fn.Name, "sai_"), "_fn") + matches := funcExpr.FindStringSubmatch(meta.Name) + meta.Operation = matches[1] + matches[4] + matches[3] + meta.TypeName = strings.ToUpper(matches[2]) + strings.ToUpper(matches[5]) + + for i, param := range sai.Funcs[fn.Typ].Params { + if strings.Contains(param.Typ, "entry") { + meta.Entry = TrimSAIName(strings.TrimPrefix(param.Typ, "const "), true, false) + } + if i == 1 && param.Name == "switch_id" { + meta.IsSwitchScoped = true + } + } + // Handle plural types using the bulk API. + if strings.HasSuffix(meta.TypeName, "PORTS") || strings.HasSuffix(meta.TypeName, "ENTRIES") || strings.HasSuffix(meta.TypeName, "MEMBERS") || strings.HasSuffix(meta.TypeName, "LISTS") { + meta.Operation += "_bulk" + meta.TypeName = strings.TrimSuffix(meta.TypeName, "S") + if strings.HasSuffix(meta.TypeName, "IE") { + meta.TypeName = strings.TrimSuffix(meta.TypeName, "IE") + meta.TypeName += "Y" + } + } + + return meta +} + +func handleFunc(name string, decl *cc.Declaration, directDecl *cc.DirectDeclarator) *SAIFunc { + sf := &SAIFunc{ + Name: name, + ReturnType: decl.DeclarationSpecifiers.Type().String(), + } + if directDecl.ParameterTypeList == nil { + return nil + } + for paramList := directDecl.ParameterTypeList.ParameterList; paramList != nil; paramList = paramList.ParameterList { + if paramList.ParameterDeclaration.Declarator == nil { // When the parameter is void. + return nil + } + pd := TypeDecl{ + Name: paramList.ParameterDeclaration.Declarator.Name(), + Typ: paramList.ParameterDeclaration.Declarator.Type().String(), + } + if ptr, ok := paramList.ParameterDeclaration.Declarator.Type().(*cc.PointerType); ok { + pd.Typ = ptr.Elem().String() + pd.Name = fmt.Sprintf("*%s", pd.Name) + if ptr2, ok := ptr.Elem().(*cc.PointerType); ok { + pd.Typ = ptr2.Elem().String() + pd.Name = fmt.Sprintf("*%s", pd.Name) + } + } + + if paramList.ParameterDeclaration.DeclarationSpecifiers.TypeQualifier != nil && paramList.ParameterDeclaration.DeclarationSpecifiers.TypeQualifier.Case == cc.TypeQualifierConst { + pd.Typ = fmt.Sprintf("const %s", pd.Typ) + } + sf.Params = append(sf.Params, pd) + } + return sf +} + +func handleIfaces(name string, decl *cc.Declaration) *SAIInterface { + ts := decl.DeclarationSpecifiers.DeclarationSpecifiers.TypeSpecifier + if ts.StructOrUnionSpecifier == nil || ts.StructOrUnionSpecifier.StructDeclarationList == nil { + return nil + } + if !strings.Contains(name, "api_t") { + return nil + } + si := &SAIInterface{ + Name: name, + } + + structSpec := ts.StructOrUnionSpecifier.StructDeclarationList + for sd := structSpec; sd != nil; sd = sd.StructDeclarationList { + si.Funcs = append(si.Funcs, &TypeDecl{ + Name: sd.StructDeclaration.StructDeclaratorList.StructDeclarator.Declarator.Name(), + Typ: sd.StructDeclaration.StructDeclaratorList.StructDeclarator.Declarator.Type().String(), + }) + } + return si +} diff --git a/dataplane/standalone/port.h b/dataplane/standalone/port.h index e79b35a3..87c04e06 100644 --- a/dataplane/standalone/port.h +++ b/dataplane/standalone/port.h @@ -50,6 +50,4 @@ class Port : public APIBase { bool portExists; }; - - #endif // DATAPLANE_STANDALONE_PORT_H_ diff --git a/dataplane/standalone/proto/BUILD b/dataplane/standalone/proto/BUILD new file mode 100644 index 00000000..77507f36 --- /dev/null +++ b/dataplane/standalone/proto/BUILD @@ -0,0 +1,73 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") + +proto_library( + name = "sai_proto", + srcs = [ + "acl.proto", + "bfd.proto", + "bridge.proto", + "buffer.proto", + "common.proto", + "counter.proto", + "debug_counter.proto", + "dtel.proto", + "fdb.proto", + "hash.proto", + "hostif.proto", + "ipmc.proto", + "ipmc_group.proto", + "ipsec.proto", + "isolation_group.proto", + "l2mc.proto", + "l2mc_group.proto", + "lag.proto", + "macsec.proto", + "mcast_fdb.proto", + "mirror.proto", + "mpls.proto", + "my_mac.proto", + "nat.proto", + "neighbor.proto", + "next_hop.proto", + "next_hop_group.proto", + "policer.proto", + "port.proto", + "qos_map.proto", + "queue.proto", + "route.proto", + "router_interface.proto", + "rpf_group.proto", + "samplepacket.proto", + "scheduler.proto", + "scheduler_group.proto", + "srv6.proto", + "stp.proto", + "switch.proto", + "system_port.proto", + "tam.proto", + "tunnel.proto", + "udf.proto", + "virtual_router.proto", + "vlan.proto", + "wred.proto", + ], + visibility = ["//visibility:public"], + deps = ["@com_google_protobuf//:timestamp_proto"], +) + +go_proto_library( + name = "sai_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "github.com/openconfig/lemming/proto/dataplane/sai", + proto = ":sai_proto", + visibility = ["//visibility:public"], +) + +go_library( + name = "sai", + embed = [":sai_go_proto"], + importpath = "github.com/openconfig/lemming/proto/dataplane/sai", + visibility = ["//visibility:public"], +) diff --git a/dataplane/standalone/proto/acl.proto b/dataplane/standalone/proto/acl.proto new file mode 100644 index 00000000..beefce5c --- /dev/null +++ b/dataplane/standalone/proto/acl.proto @@ -0,0 +1,901 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum AclCounterAttr { + ACL_COUNTER_ATTR_UNSPECIFIED = 0; + ACL_COUNTER_ATTR_TABLE_ID = 1; + ACL_COUNTER_ATTR_ENABLE_PACKET_COUNT = 2; + ACL_COUNTER_ATTR_ENABLE_BYTE_COUNT = 3; + ACL_COUNTER_ATTR_PACKETS = 4; + ACL_COUNTER_ATTR_BYTES = 5; +} + +enum AclEntryAttr { + ACL_ENTRY_ATTR_UNSPECIFIED = 0; + ACL_ENTRY_ATTR_TABLE_ID = 1; + ACL_ENTRY_ATTR_PRIORITY = 2; + ACL_ENTRY_ATTR_ADMIN_STATE = 3; + ACL_ENTRY_ATTR_FIELD_SRC_IPV6 = 4; + ACL_ENTRY_ATTR_FIELD_SRC_IPV6_WORD3 = 5; + ACL_ENTRY_ATTR_FIELD_SRC_IPV6_WORD2 = 6; + ACL_ENTRY_ATTR_FIELD_SRC_IPV6_WORD1 = 7; + ACL_ENTRY_ATTR_FIELD_SRC_IPV6_WORD0 = 8; + ACL_ENTRY_ATTR_FIELD_DST_IPV6 = 9; + ACL_ENTRY_ATTR_FIELD_DST_IPV6_WORD3 = 10; + ACL_ENTRY_ATTR_FIELD_DST_IPV6_WORD2 = 11; + ACL_ENTRY_ATTR_FIELD_DST_IPV6_WORD1 = 12; + ACL_ENTRY_ATTR_FIELD_DST_IPV6_WORD0 = 13; + ACL_ENTRY_ATTR_FIELD_INNER_SRC_IPV6 = 14; + ACL_ENTRY_ATTR_FIELD_INNER_DST_IPV6 = 15; + ACL_ENTRY_ATTR_FIELD_SRC_MAC = 16; + ACL_ENTRY_ATTR_FIELD_DST_MAC = 17; + ACL_ENTRY_ATTR_FIELD_SRC_IP = 18; + ACL_ENTRY_ATTR_FIELD_DST_IP = 19; + ACL_ENTRY_ATTR_FIELD_INNER_SRC_IP = 20; + ACL_ENTRY_ATTR_FIELD_INNER_DST_IP = 21; + ACL_ENTRY_ATTR_FIELD_IN_PORTS = 22; + ACL_ENTRY_ATTR_FIELD_OUT_PORTS = 23; + ACL_ENTRY_ATTR_FIELD_IN_PORT = 24; + ACL_ENTRY_ATTR_FIELD_OUT_PORT = 25; + ACL_ENTRY_ATTR_FIELD_SRC_PORT = 26; + ACL_ENTRY_ATTR_FIELD_OUTER_VLAN_ID = 27; + ACL_ENTRY_ATTR_FIELD_OUTER_VLAN_PRI = 28; + ACL_ENTRY_ATTR_FIELD_OUTER_VLAN_CFI = 29; + ACL_ENTRY_ATTR_FIELD_INNER_VLAN_ID = 30; + ACL_ENTRY_ATTR_FIELD_INNER_VLAN_PRI = 31; + ACL_ENTRY_ATTR_FIELD_INNER_VLAN_CFI = 32; + ACL_ENTRY_ATTR_FIELD_L4_SRC_PORT = 33; + ACL_ENTRY_ATTR_FIELD_L4_DST_PORT = 34; + ACL_ENTRY_ATTR_FIELD_INNER_L4_SRC_PORT = 35; + ACL_ENTRY_ATTR_FIELD_INNER_L4_DST_PORT = 36; + ACL_ENTRY_ATTR_FIELD_ETHER_TYPE = 37; + ACL_ENTRY_ATTR_FIELD_INNER_ETHER_TYPE = 38; + ACL_ENTRY_ATTR_FIELD_IP_PROTOCOL = 39; + ACL_ENTRY_ATTR_FIELD_INNER_IP_PROTOCOL = 40; + ACL_ENTRY_ATTR_FIELD_IP_IDENTIFICATION = 41; + ACL_ENTRY_ATTR_FIELD_DSCP = 42; + ACL_ENTRY_ATTR_FIELD_ECN = 43; + ACL_ENTRY_ATTR_FIELD_TTL = 44; + ACL_ENTRY_ATTR_FIELD_TOS = 45; + ACL_ENTRY_ATTR_FIELD_IP_FLAGS = 46; + ACL_ENTRY_ATTR_FIELD_TCP_FLAGS = 47; + ACL_ENTRY_ATTR_FIELD_ACL_IP_TYPE = 48; + ACL_ENTRY_ATTR_FIELD_ACL_IP_FRAG = 49; + ACL_ENTRY_ATTR_FIELD_IPV6_FLOW_LABEL = 50; + ACL_ENTRY_ATTR_FIELD_TC = 51; + ACL_ENTRY_ATTR_FIELD_ICMP_TYPE = 52; + ACL_ENTRY_ATTR_FIELD_ICMP_CODE = 53; + ACL_ENTRY_ATTR_FIELD_ICMPV6_TYPE = 54; + ACL_ENTRY_ATTR_FIELD_ICMPV6_CODE = 55; + ACL_ENTRY_ATTR_FIELD_PACKET_VLAN = 56; + ACL_ENTRY_ATTR_FIELD_TUNNEL_VNI = 57; + ACL_ENTRY_ATTR_FIELD_HAS_VLAN_TAG = 58; + ACL_ENTRY_ATTR_FIELD_MACSEC_SCI = 59; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL0_LABEL = 60; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL0_TTL = 61; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL0_EXP = 62; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL0_BOS = 63; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL1_LABEL = 64; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL1_TTL = 65; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL1_EXP = 66; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL1_BOS = 67; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL2_LABEL = 68; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL2_TTL = 69; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL2_EXP = 70; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL2_BOS = 71; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL3_LABEL = 72; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL3_TTL = 73; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL3_EXP = 74; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL3_BOS = 75; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL4_LABEL = 76; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL4_TTL = 77; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL4_EXP = 78; + ACL_ENTRY_ATTR_FIELD_MPLS_LABEL4_BOS = 79; + ACL_ENTRY_ATTR_FIELD_FDB_DST_USER_META = 80; + ACL_ENTRY_ATTR_FIELD_ROUTE_DST_USER_META = 81; + ACL_ENTRY_ATTR_FIELD_NEIGHBOR_DST_USER_META = 82; + ACL_ENTRY_ATTR_FIELD_PORT_USER_META = 83; + ACL_ENTRY_ATTR_FIELD_VLAN_USER_META = 84; + ACL_ENTRY_ATTR_FIELD_ACL_USER_META = 85; + ACL_ENTRY_ATTR_FIELD_FDB_NPU_META_DST_HIT = 86; + ACL_ENTRY_ATTR_FIELD_NEIGHBOR_NPU_META_DST_HIT = 87; + ACL_ENTRY_ATTR_FIELD_ROUTE_NPU_META_DST_HIT = 88; + ACL_ENTRY_ATTR_FIELD_BTH_OPCODE = 89; + ACL_ENTRY_ATTR_FIELD_AETH_SYNDROME = 90; + ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN = 91; + ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MAX = 92; + ACL_ENTRY_ATTR_FIELD_ACL_RANGE_TYPE = 93; + ACL_ENTRY_ATTR_FIELD_IPV6_NEXT_HEADER = 94; + ACL_ENTRY_ATTR_FIELD_GRE_KEY = 95; + ACL_ENTRY_ATTR_FIELD_TAM_INT_TYPE = 96; + ACL_ENTRY_ATTR_ACTION_REDIRECT = 97; + ACL_ENTRY_ATTR_ACTION_ENDPOINT_IP = 98; + ACL_ENTRY_ATTR_ACTION_REDIRECT_LIST = 99; + ACL_ENTRY_ATTR_ACTION_PACKET_ACTION = 100; + ACL_ENTRY_ATTR_ACTION_FLOOD = 101; + ACL_ENTRY_ATTR_ACTION_COUNTER = 102; + ACL_ENTRY_ATTR_ACTION_MIRROR_INGRESS = 103; + ACL_ENTRY_ATTR_ACTION_MIRROR_EGRESS = 104; + ACL_ENTRY_ATTR_ACTION_SET_POLICER = 105; + ACL_ENTRY_ATTR_ACTION_DECREMENT_TTL = 106; + ACL_ENTRY_ATTR_ACTION_SET_TC = 107; + ACL_ENTRY_ATTR_ACTION_SET_PACKET_COLOR = 108; + ACL_ENTRY_ATTR_ACTION_SET_INNER_VLAN_ID = 109; + ACL_ENTRY_ATTR_ACTION_SET_INNER_VLAN_PRI = 110; + ACL_ENTRY_ATTR_ACTION_SET_OUTER_VLAN_ID = 111; + ACL_ENTRY_ATTR_ACTION_SET_OUTER_VLAN_PRI = 112; + ACL_ENTRY_ATTR_ACTION_ADD_VLAN_ID = 113; + ACL_ENTRY_ATTR_ACTION_ADD_VLAN_PRI = 114; + ACL_ENTRY_ATTR_ACTION_SET_SRC_MAC = 115; + ACL_ENTRY_ATTR_ACTION_SET_DST_MAC = 116; + ACL_ENTRY_ATTR_ACTION_SET_SRC_IP = 117; + ACL_ENTRY_ATTR_ACTION_SET_DST_IP = 118; + ACL_ENTRY_ATTR_ACTION_SET_SRC_IPV6 = 119; + ACL_ENTRY_ATTR_ACTION_SET_DST_IPV6 = 120; + ACL_ENTRY_ATTR_ACTION_SET_DSCP = 121; + ACL_ENTRY_ATTR_ACTION_SET_ECN = 122; + ACL_ENTRY_ATTR_ACTION_SET_L4_SRC_PORT = 123; + ACL_ENTRY_ATTR_ACTION_SET_L4_DST_PORT = 124; + ACL_ENTRY_ATTR_ACTION_INGRESS_SAMPLEPACKET_ENABLE = 125; + ACL_ENTRY_ATTR_ACTION_EGRESS_SAMPLEPACKET_ENABLE = 126; + ACL_ENTRY_ATTR_ACTION_SET_ACL_META_DATA = 127; + ACL_ENTRY_ATTR_ACTION_EGRESS_BLOCK_PORT_LIST = 128; + ACL_ENTRY_ATTR_ACTION_SET_USER_TRAP_ID = 129; + ACL_ENTRY_ATTR_ACTION_SET_DO_NOT_LEARN = 130; + ACL_ENTRY_ATTR_ACTION_ACL_DTEL_FLOW_OP = 131; + ACL_ENTRY_ATTR_ACTION_DTEL_INT_SESSION = 132; + ACL_ENTRY_ATTR_ACTION_DTEL_DROP_REPORT_ENABLE = 133; + ACL_ENTRY_ATTR_ACTION_DTEL_TAIL_DROP_REPORT_ENABLE = 134; + ACL_ENTRY_ATTR_ACTION_DTEL_FLOW_SAMPLE_PERCENT = 135; + ACL_ENTRY_ATTR_ACTION_DTEL_REPORT_ALL_PACKETS = 136; + ACL_ENTRY_ATTR_ACTION_NO_NAT = 137; + ACL_ENTRY_ATTR_ACTION_INT_INSERT = 138; + ACL_ENTRY_ATTR_ACTION_INT_DELETE = 139; + ACL_ENTRY_ATTR_ACTION_INT_REPORT_FLOW = 140; + ACL_ENTRY_ATTR_ACTION_INT_REPORT_DROPS = 141; + ACL_ENTRY_ATTR_ACTION_INT_REPORT_TAIL_DROPS = 142; + ACL_ENTRY_ATTR_ACTION_TAM_INT_OBJECT = 143; + ACL_ENTRY_ATTR_ACTION_SET_ISOLATION_GROUP = 144; + ACL_ENTRY_ATTR_ACTION_MACSEC_FLOW = 145; + ACL_ENTRY_ATTR_ACTION_SET_LAG_HASH_ID = 146; + ACL_ENTRY_ATTR_ACTION_SET_ECMP_HASH_ID = 147; + ACL_ENTRY_ATTR_ACTION_SET_VRF = 148; + ACL_ENTRY_ATTR_ACTION_SET_FORWARDING_CLASS = 149; +} + +enum AclRangeAttr { + ACL_RANGE_ATTR_UNSPECIFIED = 0; + ACL_RANGE_ATTR_TYPE = 1; + ACL_RANGE_ATTR_LIMIT = 2; +} + +enum AclTableAttr { + ACL_TABLE_ATTR_UNSPECIFIED = 0; + ACL_TABLE_ATTR_ACL_STAGE = 1; + ACL_TABLE_ATTR_ACL_BIND_POINT_TYPE_LIST = 2; + ACL_TABLE_ATTR_SIZE = 3; + ACL_TABLE_ATTR_ACL_ACTION_TYPE_LIST = 4; + ACL_TABLE_ATTR_FIELD_SRC_IPV6 = 5; + ACL_TABLE_ATTR_FIELD_SRC_IPV6_WORD3 = 6; + ACL_TABLE_ATTR_FIELD_SRC_IPV6_WORD2 = 7; + ACL_TABLE_ATTR_FIELD_SRC_IPV6_WORD1 = 8; + ACL_TABLE_ATTR_FIELD_SRC_IPV6_WORD0 = 9; + ACL_TABLE_ATTR_FIELD_DST_IPV6 = 10; + ACL_TABLE_ATTR_FIELD_DST_IPV6_WORD3 = 11; + ACL_TABLE_ATTR_FIELD_DST_IPV6_WORD2 = 12; + ACL_TABLE_ATTR_FIELD_DST_IPV6_WORD1 = 13; + ACL_TABLE_ATTR_FIELD_DST_IPV6_WORD0 = 14; + ACL_TABLE_ATTR_FIELD_INNER_SRC_IPV6 = 15; + ACL_TABLE_ATTR_FIELD_INNER_DST_IPV6 = 16; + ACL_TABLE_ATTR_FIELD_SRC_MAC = 17; + ACL_TABLE_ATTR_FIELD_DST_MAC = 18; + ACL_TABLE_ATTR_FIELD_SRC_IP = 19; + ACL_TABLE_ATTR_FIELD_DST_IP = 20; + ACL_TABLE_ATTR_FIELD_INNER_SRC_IP = 21; + ACL_TABLE_ATTR_FIELD_INNER_DST_IP = 22; + ACL_TABLE_ATTR_FIELD_IN_PORTS = 23; + ACL_TABLE_ATTR_FIELD_OUT_PORTS = 24; + ACL_TABLE_ATTR_FIELD_IN_PORT = 25; + ACL_TABLE_ATTR_FIELD_OUT_PORT = 26; + ACL_TABLE_ATTR_FIELD_SRC_PORT = 27; + ACL_TABLE_ATTR_FIELD_OUTER_VLAN_ID = 28; + ACL_TABLE_ATTR_FIELD_OUTER_VLAN_PRI = 29; + ACL_TABLE_ATTR_FIELD_OUTER_VLAN_CFI = 30; + ACL_TABLE_ATTR_FIELD_INNER_VLAN_ID = 31; + ACL_TABLE_ATTR_FIELD_INNER_VLAN_PRI = 32; + ACL_TABLE_ATTR_FIELD_INNER_VLAN_CFI = 33; + ACL_TABLE_ATTR_FIELD_L4_SRC_PORT = 34; + ACL_TABLE_ATTR_FIELD_L4_DST_PORT = 35; + ACL_TABLE_ATTR_FIELD_INNER_L4_SRC_PORT = 36; + ACL_TABLE_ATTR_FIELD_INNER_L4_DST_PORT = 37; + ACL_TABLE_ATTR_FIELD_ETHER_TYPE = 38; + ACL_TABLE_ATTR_FIELD_INNER_ETHER_TYPE = 39; + ACL_TABLE_ATTR_FIELD_IP_PROTOCOL = 40; + ACL_TABLE_ATTR_FIELD_INNER_IP_PROTOCOL = 41; + ACL_TABLE_ATTR_FIELD_IP_IDENTIFICATION = 42; + ACL_TABLE_ATTR_FIELD_DSCP = 43; + ACL_TABLE_ATTR_FIELD_ECN = 44; + ACL_TABLE_ATTR_FIELD_TTL = 45; + ACL_TABLE_ATTR_FIELD_TOS = 46; + ACL_TABLE_ATTR_FIELD_IP_FLAGS = 47; + ACL_TABLE_ATTR_FIELD_TCP_FLAGS = 48; + ACL_TABLE_ATTR_FIELD_ACL_IP_TYPE = 49; + ACL_TABLE_ATTR_FIELD_ACL_IP_FRAG = 50; + ACL_TABLE_ATTR_FIELD_IPV6_FLOW_LABEL = 51; + ACL_TABLE_ATTR_FIELD_TC = 52; + ACL_TABLE_ATTR_FIELD_ICMP_TYPE = 53; + ACL_TABLE_ATTR_FIELD_ICMP_CODE = 54; + ACL_TABLE_ATTR_FIELD_ICMPV6_TYPE = 55; + ACL_TABLE_ATTR_FIELD_ICMPV6_CODE = 56; + ACL_TABLE_ATTR_FIELD_PACKET_VLAN = 57; + ACL_TABLE_ATTR_FIELD_TUNNEL_VNI = 58; + ACL_TABLE_ATTR_FIELD_HAS_VLAN_TAG = 59; + ACL_TABLE_ATTR_FIELD_MACSEC_SCI = 60; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL0_LABEL = 61; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL0_TTL = 62; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL0_EXP = 63; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL0_BOS = 64; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL1_LABEL = 65; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL1_TTL = 66; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL1_EXP = 67; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL1_BOS = 68; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL2_LABEL = 69; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL2_TTL = 70; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL2_EXP = 71; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL2_BOS = 72; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL3_LABEL = 73; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL3_TTL = 74; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL3_EXP = 75; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL3_BOS = 76; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL4_LABEL = 77; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL4_TTL = 78; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL4_EXP = 79; + ACL_TABLE_ATTR_FIELD_MPLS_LABEL4_BOS = 80; + ACL_TABLE_ATTR_FIELD_FDB_DST_USER_META = 81; + ACL_TABLE_ATTR_FIELD_ROUTE_DST_USER_META = 82; + ACL_TABLE_ATTR_FIELD_NEIGHBOR_DST_USER_META = 83; + ACL_TABLE_ATTR_FIELD_PORT_USER_META = 84; + ACL_TABLE_ATTR_FIELD_VLAN_USER_META = 85; + ACL_TABLE_ATTR_FIELD_ACL_USER_META = 86; + ACL_TABLE_ATTR_FIELD_FDB_NPU_META_DST_HIT = 87; + ACL_TABLE_ATTR_FIELD_NEIGHBOR_NPU_META_DST_HIT = 88; + ACL_TABLE_ATTR_FIELD_ROUTE_NPU_META_DST_HIT = 89; + ACL_TABLE_ATTR_FIELD_BTH_OPCODE = 90; + ACL_TABLE_ATTR_FIELD_AETH_SYNDROME = 91; + ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN = 92; + ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MAX = 93; + ACL_TABLE_ATTR_FIELD_ACL_RANGE_TYPE = 94; + ACL_TABLE_ATTR_FIELD_IPV6_NEXT_HEADER = 95; + ACL_TABLE_ATTR_FIELD_GRE_KEY = 96; + ACL_TABLE_ATTR_FIELD_TAM_INT_TYPE = 97; + ACL_TABLE_ATTR_ENTRY_LIST = 98; + ACL_TABLE_ATTR_AVAILABLE_ACL_ENTRY = 99; + ACL_TABLE_ATTR_AVAILABLE_ACL_COUNTER = 100; +} + +enum AclTableGroupAttr { + ACL_TABLE_GROUP_ATTR_UNSPECIFIED = 0; + ACL_TABLE_GROUP_ATTR_ACL_STAGE = 1; + ACL_TABLE_GROUP_ATTR_ACL_BIND_POINT_TYPE_LIST = 2; + ACL_TABLE_GROUP_ATTR_TYPE = 3; + ACL_TABLE_GROUP_ATTR_MEMBER_LIST = 4; +} + +enum AclTableGroupMemberAttr { + ACL_TABLE_GROUP_MEMBER_ATTR_UNSPECIFIED = 0; + ACL_TABLE_GROUP_MEMBER_ATTR_ACL_TABLE_GROUP_ID = 1; + ACL_TABLE_GROUP_MEMBER_ATTR_ACL_TABLE_ID = 2; + ACL_TABLE_GROUP_MEMBER_ATTR_PRIORITY = 3; +} + +message CreateAclTableRequest { + uint64 switch = 1; + + AclStage acl_stage = 2; + repeated AclBindPointType acl_bind_point_type_list = 3; + uint32 size = 4; + repeated AclActionType acl_action_type_list = 5; + bool field_src_ipv6 = 6; + bool field_src_ipv6_word3 = 7; + bool field_src_ipv6_word2 = 8; + bool field_src_ipv6_word1 = 9; + bool field_src_ipv6_word0 = 10; + bool field_dst_ipv6 = 11; + bool field_dst_ipv6_word3 = 12; + bool field_dst_ipv6_word2 = 13; + bool field_dst_ipv6_word1 = 14; + bool field_dst_ipv6_word0 = 15; + bool field_inner_src_ipv6 = 16; + bool field_inner_dst_ipv6 = 17; + bool field_src_mac = 18; + bool field_dst_mac = 19; + bool field_src_ip = 20; + bool field_dst_ip = 21; + bool field_inner_src_ip = 22; + bool field_inner_dst_ip = 23; + bool field_in_ports = 24; + bool field_out_ports = 25; + bool field_in_port = 26; + bool field_out_port = 27; + bool field_src_port = 28; + bool field_outer_vlan_id = 29; + bool field_outer_vlan_pri = 30; + bool field_outer_vlan_cfi = 31; + bool field_inner_vlan_id = 32; + bool field_inner_vlan_pri = 33; + bool field_inner_vlan_cfi = 34; + bool field_l4_src_port = 35; + bool field_l4_dst_port = 36; + bool field_inner_l4_src_port = 37; + bool field_inner_l4_dst_port = 38; + bool field_ether_type = 39; + bool field_inner_ether_type = 40; + bool field_ip_protocol = 41; + bool field_inner_ip_protocol = 42; + bool field_ip_identification = 43; + bool field_dscp = 44; + bool field_ecn = 45; + bool field_ttl = 46; + bool field_tos = 47; + bool field_ip_flags = 48; + bool field_tcp_flags = 49; + bool field_acl_ip_type = 50; + bool field_acl_ip_frag = 51; + bool field_ipv6_flow_label = 52; + bool field_tc = 53; + bool field_icmp_type = 54; + bool field_icmp_code = 55; + bool field_icmpv6_type = 56; + bool field_icmpv6_code = 57; + bool field_packet_vlan = 58; + bool field_tunnel_vni = 59; + bool field_has_vlan_tag = 60; + bool field_macsec_sci = 61; + bool field_mpls_label0_label = 62; + bool field_mpls_label0_ttl = 63; + bool field_mpls_label0_exp = 64; + bool field_mpls_label0_bos = 65; + bool field_mpls_label1_label = 66; + bool field_mpls_label1_ttl = 67; + bool field_mpls_label1_exp = 68; + bool field_mpls_label1_bos = 69; + bool field_mpls_label2_label = 70; + bool field_mpls_label2_ttl = 71; + bool field_mpls_label2_exp = 72; + bool field_mpls_label2_bos = 73; + bool field_mpls_label3_label = 74; + bool field_mpls_label3_ttl = 75; + bool field_mpls_label3_exp = 76; + bool field_mpls_label3_bos = 77; + bool field_mpls_label4_label = 78; + bool field_mpls_label4_ttl = 79; + bool field_mpls_label4_exp = 80; + bool field_mpls_label4_bos = 81; + bool field_fdb_dst_user_meta = 82; + bool field_route_dst_user_meta = 83; + bool field_neighbor_dst_user_meta = 84; + bool field_port_user_meta = 85; + bool field_vlan_user_meta = 86; + bool field_acl_user_meta = 87; + bool field_fdb_npu_meta_dst_hit = 88; + bool field_neighbor_npu_meta_dst_hit = 89; + bool field_route_npu_meta_dst_hit = 90; + bool field_bth_opcode = 91; + bool field_aeth_syndrome = 92; + uint64 user_defined_field_group_min = 93; + uint64 user_defined_field_group_max = 94; + repeated AclRangeType field_acl_range_type = 95; + bool field_ipv6_next_header = 96; + bool field_gre_key = 97; + bool field_tam_int_type = 98; +} + +message CreateAclTableResponse { + uint64 oid = 1; +} + +message RemoveAclTableRequest { + uint64 oid = 1; +} + +message RemoveAclTableResponse {} + +message GetAclTableAttributeRequest { + uint64 oid = 1; + AclTableAttr attr_type = 2; +} + +message GetAclTableAttributeResponse { + AclTableAttribute attr = 1; +} + +message CreateAclEntryRequest { + uint64 switch = 1; + + uint64 table_id = 2; + uint32 priority = 3; + bool admin_state = 4; + AclFieldData field_src_ipv6 = 5; + AclFieldData field_src_ipv6_word3 = 6; + AclFieldData field_src_ipv6_word2 = 7; + AclFieldData field_src_ipv6_word1 = 8; + AclFieldData field_src_ipv6_word0 = 9; + AclFieldData field_dst_ipv6 = 10; + AclFieldData field_dst_ipv6_word3 = 11; + AclFieldData field_dst_ipv6_word2 = 12; + AclFieldData field_dst_ipv6_word1 = 13; + AclFieldData field_dst_ipv6_word0 = 14; + AclFieldData field_inner_src_ipv6 = 15; + AclFieldData field_inner_dst_ipv6 = 16; + AclFieldData field_src_mac = 17; + AclFieldData field_dst_mac = 18; + AclFieldData field_src_ip = 19; + AclFieldData field_dst_ip = 20; + AclFieldData field_inner_src_ip = 21; + AclFieldData field_inner_dst_ip = 22; + AclFieldData field_in_ports = 23; + AclFieldData field_out_ports = 24; + AclFieldData field_in_port = 25; + AclFieldData field_out_port = 26; + AclFieldData field_src_port = 27; + AclFieldData field_outer_vlan_id = 28; + AclFieldData field_outer_vlan_pri = 29; + AclFieldData field_outer_vlan_cfi = 30; + AclFieldData field_inner_vlan_id = 31; + AclFieldData field_inner_vlan_pri = 32; + AclFieldData field_inner_vlan_cfi = 33; + AclFieldData field_l4_src_port = 34; + AclFieldData field_l4_dst_port = 35; + AclFieldData field_inner_l4_src_port = 36; + AclFieldData field_inner_l4_dst_port = 37; + AclFieldData field_ether_type = 38; + AclFieldData field_inner_ether_type = 39; + AclFieldData field_ip_protocol = 40; + AclFieldData field_inner_ip_protocol = 41; + AclFieldData field_ip_identification = 42; + AclFieldData field_dscp = 43; + AclFieldData field_ecn = 44; + AclFieldData field_ttl = 45; + AclFieldData field_tos = 46; + AclFieldData field_ip_flags = 47; + AclFieldData field_tcp_flags = 48; + AclFieldData field_acl_ip_type = 49; + AclFieldData field_acl_ip_frag = 50; + AclFieldData field_ipv6_flow_label = 51; + AclFieldData field_tc = 52; + AclFieldData field_icmp_type = 53; + AclFieldData field_icmp_code = 54; + AclFieldData field_icmpv6_type = 55; + AclFieldData field_icmpv6_code = 56; + AclFieldData field_packet_vlan = 57; + AclFieldData field_tunnel_vni = 58; + AclFieldData field_has_vlan_tag = 59; + AclFieldData field_macsec_sci = 60; + AclFieldData field_mpls_label0_label = 61; + AclFieldData field_mpls_label0_ttl = 62; + AclFieldData field_mpls_label0_exp = 63; + AclFieldData field_mpls_label0_bos = 64; + AclFieldData field_mpls_label1_label = 65; + AclFieldData field_mpls_label1_ttl = 66; + AclFieldData field_mpls_label1_exp = 67; + AclFieldData field_mpls_label1_bos = 68; + AclFieldData field_mpls_label2_label = 69; + AclFieldData field_mpls_label2_ttl = 70; + AclFieldData field_mpls_label2_exp = 71; + AclFieldData field_mpls_label2_bos = 72; + AclFieldData field_mpls_label3_label = 73; + AclFieldData field_mpls_label3_ttl = 74; + AclFieldData field_mpls_label3_exp = 75; + AclFieldData field_mpls_label3_bos = 76; + AclFieldData field_mpls_label4_label = 77; + AclFieldData field_mpls_label4_ttl = 78; + AclFieldData field_mpls_label4_exp = 79; + AclFieldData field_mpls_label4_bos = 80; + AclFieldData field_fdb_dst_user_meta = 81; + AclFieldData field_route_dst_user_meta = 82; + AclFieldData field_neighbor_dst_user_meta = 83; + AclFieldData field_port_user_meta = 84; + AclFieldData field_vlan_user_meta = 85; + AclFieldData field_acl_user_meta = 86; + AclFieldData field_fdb_npu_meta_dst_hit = 87; + AclFieldData field_neighbor_npu_meta_dst_hit = 88; + AclFieldData field_route_npu_meta_dst_hit = 89; + AclFieldData field_bth_opcode = 90; + AclFieldData field_aeth_syndrome = 91; + AclFieldData user_defined_field_group_min = 92; + AclFieldData user_defined_field_group_max = 93; + AclFieldData field_acl_range_type = 94; + AclFieldData field_ipv6_next_header = 95; + AclFieldData field_gre_key = 96; + AclFieldData field_tam_int_type = 97; + AclActionData action_redirect = 98; + AclActionData action_endpoint_ip = 99; + AclActionData action_redirect_list = 100; + AclActionData action_packet_action = 101; + AclActionData action_flood = 102; + AclActionData action_counter = 103; + AclActionData action_mirror_ingress = 104; + AclActionData action_mirror_egress = 105; + AclActionData action_set_policer = 106; + AclActionData action_decrement_ttl = 107; + AclActionData action_set_tc = 108; + AclActionData action_set_packet_color = 109; + AclActionData action_set_inner_vlan_id = 110; + AclActionData action_set_inner_vlan_pri = 111; + AclActionData action_set_outer_vlan_id = 112; + AclActionData action_set_outer_vlan_pri = 113; + AclActionData action_add_vlan_id = 114; + AclActionData action_add_vlan_pri = 115; + AclActionData action_set_src_mac = 116; + AclActionData action_set_dst_mac = 117; + AclActionData action_set_src_ip = 118; + AclActionData action_set_dst_ip = 119; + AclActionData action_set_src_ipv6 = 120; + AclActionData action_set_dst_ipv6 = 121; + AclActionData action_set_dscp = 122; + AclActionData action_set_ecn = 123; + AclActionData action_set_l4_src_port = 124; + AclActionData action_set_l4_dst_port = 125; + AclActionData action_ingress_samplepacket_enable = 126; + AclActionData action_egress_samplepacket_enable = 127; + AclActionData action_set_acl_meta_data = 128; + AclActionData action_egress_block_port_list = 129; + AclActionData action_set_user_trap_id = 130; + AclActionData action_set_do_not_learn = 131; + AclActionData action_acl_dtel_flow_op = 132; + AclActionData action_dtel_int_session = 133; + AclActionData action_dtel_drop_report_enable = 134; + AclActionData action_dtel_tail_drop_report_enable = 135; + AclActionData action_dtel_flow_sample_percent = 136; + AclActionData action_dtel_report_all_packets = 137; + AclActionData action_no_nat = 138; + AclActionData action_int_insert = 139; + AclActionData action_int_delete = 140; + AclActionData action_int_report_flow = 141; + AclActionData action_int_report_drops = 142; + AclActionData action_int_report_tail_drops = 143; + AclActionData action_tam_int_object = 144; + AclActionData action_set_isolation_group = 145; + AclActionData action_macsec_flow = 146; + AclActionData action_set_lag_hash_id = 147; + AclActionData action_set_ecmp_hash_id = 148; + AclActionData action_set_vrf = 149; + AclActionData action_set_forwarding_class = 150; +} + +message CreateAclEntryResponse { + uint64 oid = 1; +} + +message RemoveAclEntryRequest { + uint64 oid = 1; +} + +message RemoveAclEntryResponse {} + +message SetAclEntryAttributeRequest { + uint64 oid = 1; + oneof attr { + uint32 priority = 2; + bool admin_state = 3; + AclFieldData field_src_ipv6 = 4; + AclFieldData field_src_ipv6_word3 = 5; + AclFieldData field_src_ipv6_word2 = 6; + AclFieldData field_src_ipv6_word1 = 7; + AclFieldData field_src_ipv6_word0 = 8; + AclFieldData field_dst_ipv6 = 9; + AclFieldData field_dst_ipv6_word3 = 10; + AclFieldData field_dst_ipv6_word2 = 11; + AclFieldData field_dst_ipv6_word1 = 12; + AclFieldData field_dst_ipv6_word0 = 13; + AclFieldData field_inner_src_ipv6 = 14; + AclFieldData field_inner_dst_ipv6 = 15; + AclFieldData field_src_mac = 16; + AclFieldData field_dst_mac = 17; + AclFieldData field_src_ip = 18; + AclFieldData field_dst_ip = 19; + AclFieldData field_inner_src_ip = 20; + AclFieldData field_inner_dst_ip = 21; + AclFieldData field_in_ports = 22; + AclFieldData field_out_ports = 23; + AclFieldData field_in_port = 24; + AclFieldData field_out_port = 25; + AclFieldData field_src_port = 26; + AclFieldData field_outer_vlan_id = 27; + AclFieldData field_outer_vlan_pri = 28; + AclFieldData field_outer_vlan_cfi = 29; + AclFieldData field_inner_vlan_id = 30; + AclFieldData field_inner_vlan_pri = 31; + AclFieldData field_inner_vlan_cfi = 32; + AclFieldData field_l4_src_port = 33; + AclFieldData field_l4_dst_port = 34; + AclFieldData field_inner_l4_src_port = 35; + AclFieldData field_inner_l4_dst_port = 36; + AclFieldData field_ether_type = 37; + AclFieldData field_inner_ether_type = 38; + AclFieldData field_ip_protocol = 39; + AclFieldData field_inner_ip_protocol = 40; + AclFieldData field_ip_identification = 41; + AclFieldData field_dscp = 42; + AclFieldData field_ecn = 43; + AclFieldData field_ttl = 44; + AclFieldData field_tos = 45; + AclFieldData field_ip_flags = 46; + AclFieldData field_tcp_flags = 47; + AclFieldData field_acl_ip_type = 48; + AclFieldData field_acl_ip_frag = 49; + AclFieldData field_ipv6_flow_label = 50; + AclFieldData field_tc = 51; + AclFieldData field_icmp_type = 52; + AclFieldData field_icmp_code = 53; + AclFieldData field_icmpv6_type = 54; + AclFieldData field_icmpv6_code = 55; + AclFieldData field_packet_vlan = 56; + AclFieldData field_tunnel_vni = 57; + AclFieldData field_has_vlan_tag = 58; + AclFieldData field_macsec_sci = 59; + AclFieldData field_mpls_label0_label = 60; + AclFieldData field_mpls_label0_ttl = 61; + AclFieldData field_mpls_label0_exp = 62; + AclFieldData field_mpls_label0_bos = 63; + AclFieldData field_mpls_label1_label = 64; + AclFieldData field_mpls_label1_ttl = 65; + AclFieldData field_mpls_label1_exp = 66; + AclFieldData field_mpls_label1_bos = 67; + AclFieldData field_mpls_label2_label = 68; + AclFieldData field_mpls_label2_ttl = 69; + AclFieldData field_mpls_label2_exp = 70; + AclFieldData field_mpls_label2_bos = 71; + AclFieldData field_mpls_label3_label = 72; + AclFieldData field_mpls_label3_ttl = 73; + AclFieldData field_mpls_label3_exp = 74; + AclFieldData field_mpls_label3_bos = 75; + AclFieldData field_mpls_label4_label = 76; + AclFieldData field_mpls_label4_ttl = 77; + AclFieldData field_mpls_label4_exp = 78; + AclFieldData field_mpls_label4_bos = 79; + AclFieldData field_fdb_dst_user_meta = 80; + AclFieldData field_route_dst_user_meta = 81; + AclFieldData field_neighbor_dst_user_meta = 82; + AclFieldData field_port_user_meta = 83; + AclFieldData field_vlan_user_meta = 84; + AclFieldData field_acl_user_meta = 85; + AclFieldData field_fdb_npu_meta_dst_hit = 86; + AclFieldData field_neighbor_npu_meta_dst_hit = 87; + AclFieldData field_route_npu_meta_dst_hit = 88; + AclFieldData field_bth_opcode = 89; + AclFieldData field_aeth_syndrome = 90; + AclFieldData user_defined_field_group_min = 91; + AclFieldData user_defined_field_group_max = 92; + AclFieldData field_acl_range_type = 93; + AclFieldData field_ipv6_next_header = 94; + AclFieldData field_gre_key = 95; + AclFieldData field_tam_int_type = 96; + AclActionData action_redirect = 97; + AclActionData action_endpoint_ip = 98; + AclActionData action_redirect_list = 99; + AclActionData action_packet_action = 100; + AclActionData action_flood = 101; + AclActionData action_counter = 102; + AclActionData action_mirror_ingress = 103; + AclActionData action_mirror_egress = 104; + AclActionData action_set_policer = 105; + AclActionData action_decrement_ttl = 106; + AclActionData action_set_tc = 107; + AclActionData action_set_packet_color = 108; + AclActionData action_set_inner_vlan_id = 109; + AclActionData action_set_inner_vlan_pri = 110; + AclActionData action_set_outer_vlan_id = 111; + AclActionData action_set_outer_vlan_pri = 112; + AclActionData action_add_vlan_id = 113; + AclActionData action_add_vlan_pri = 114; + AclActionData action_set_src_mac = 115; + AclActionData action_set_dst_mac = 116; + AclActionData action_set_src_ip = 117; + AclActionData action_set_dst_ip = 118; + AclActionData action_set_src_ipv6 = 119; + AclActionData action_set_dst_ipv6 = 120; + AclActionData action_set_dscp = 121; + AclActionData action_set_ecn = 122; + AclActionData action_set_l4_src_port = 123; + AclActionData action_set_l4_dst_port = 124; + AclActionData action_ingress_samplepacket_enable = 125; + AclActionData action_egress_samplepacket_enable = 126; + AclActionData action_set_acl_meta_data = 127; + AclActionData action_egress_block_port_list = 128; + AclActionData action_set_user_trap_id = 129; + AclActionData action_set_do_not_learn = 130; + AclActionData action_acl_dtel_flow_op = 131; + AclActionData action_dtel_int_session = 132; + AclActionData action_dtel_drop_report_enable = 133; + AclActionData action_dtel_tail_drop_report_enable = 134; + AclActionData action_dtel_flow_sample_percent = 135; + AclActionData action_dtel_report_all_packets = 136; + AclActionData action_no_nat = 137; + AclActionData action_int_insert = 138; + AclActionData action_int_delete = 139; + AclActionData action_int_report_flow = 140; + AclActionData action_int_report_drops = 141; + AclActionData action_int_report_tail_drops = 142; + AclActionData action_tam_int_object = 143; + AclActionData action_set_isolation_group = 144; + AclActionData action_macsec_flow = 145; + AclActionData action_set_lag_hash_id = 146; + AclActionData action_set_ecmp_hash_id = 147; + AclActionData action_set_vrf = 148; + AclActionData action_set_forwarding_class = 149; + } +} + +message SetAclEntryAttributeResponse {} + +message GetAclEntryAttributeRequest { + uint64 oid = 1; + AclEntryAttr attr_type = 2; +} + +message GetAclEntryAttributeResponse { + AclEntryAttribute attr = 1; +} + +message CreateAclCounterRequest { + uint64 switch = 1; + + uint64 table_id = 2; + bool enable_packet_count = 3; + bool enable_byte_count = 4; + uint64 packets = 5; + uint64 bytes = 6; +} + +message CreateAclCounterResponse { + uint64 oid = 1; +} + +message RemoveAclCounterRequest { + uint64 oid = 1; +} + +message RemoveAclCounterResponse {} + +message SetAclCounterAttributeRequest { + uint64 oid = 1; + oneof attr { + uint64 packets = 2; + uint64 bytes = 3; + } +} + +message SetAclCounterAttributeResponse {} + +message GetAclCounterAttributeRequest { + uint64 oid = 1; + AclCounterAttr attr_type = 2; +} + +message GetAclCounterAttributeResponse { + AclCounterAttribute attr = 1; +} + +message CreateAclRangeRequest { + uint64 switch = 1; + + AclRangeType type = 2; + Uint32Range limit = 3; +} + +message CreateAclRangeResponse { + uint64 oid = 1; +} + +message RemoveAclRangeRequest { + uint64 oid = 1; +} + +message RemoveAclRangeResponse {} + +message GetAclRangeAttributeRequest { + uint64 oid = 1; + AclRangeAttr attr_type = 2; +} + +message GetAclRangeAttributeResponse { + AclRangeAttribute attr = 1; +} + +message CreateAclTableGroupRequest { + uint64 switch = 1; + + AclStage acl_stage = 2; + repeated AclBindPointType acl_bind_point_type_list = 3; + AclTableGroupType type = 4; +} + +message CreateAclTableGroupResponse { + uint64 oid = 1; +} + +message RemoveAclTableGroupRequest { + uint64 oid = 1; +} + +message RemoveAclTableGroupResponse {} + +message GetAclTableGroupAttributeRequest { + uint64 oid = 1; + AclTableGroupAttr attr_type = 2; +} + +message GetAclTableGroupAttributeResponse { + AclTableGroupAttribute attr = 1; +} + +message CreateAclTableGroupMemberRequest { + uint64 switch = 1; + + uint64 acl_table_group_id = 2; + uint64 acl_table_id = 3; + uint32 priority = 4; +} + +message CreateAclTableGroupMemberResponse { + uint64 oid = 1; +} + +message RemoveAclTableGroupMemberRequest { + uint64 oid = 1; +} + +message RemoveAclTableGroupMemberResponse {} + +message GetAclTableGroupMemberAttributeRequest { + uint64 oid = 1; + AclTableGroupMemberAttr attr_type = 2; +} + +message GetAclTableGroupMemberAttributeResponse { + AclTableGroupMemberAttribute attr = 1; +} + +service Acl { + rpc CreateAclTable(CreateAclTableRequest) returns (CreateAclTableResponse) {} + rpc RemoveAclTable(RemoveAclTableRequest) returns (RemoveAclTableResponse) {} + rpc GetAclTableAttribute(GetAclTableAttributeRequest) + returns (GetAclTableAttributeResponse) {} + rpc CreateAclEntry(CreateAclEntryRequest) returns (CreateAclEntryResponse) {} + rpc RemoveAclEntry(RemoveAclEntryRequest) returns (RemoveAclEntryResponse) {} + rpc SetAclEntryAttribute(SetAclEntryAttributeRequest) + returns (SetAclEntryAttributeResponse) {} + rpc GetAclEntryAttribute(GetAclEntryAttributeRequest) + returns (GetAclEntryAttributeResponse) {} + rpc CreateAclCounter(CreateAclCounterRequest) + returns (CreateAclCounterResponse) {} + rpc RemoveAclCounter(RemoveAclCounterRequest) + returns (RemoveAclCounterResponse) {} + rpc SetAclCounterAttribute(SetAclCounterAttributeRequest) + returns (SetAclCounterAttributeResponse) {} + rpc GetAclCounterAttribute(GetAclCounterAttributeRequest) + returns (GetAclCounterAttributeResponse) {} + rpc CreateAclRange(CreateAclRangeRequest) returns (CreateAclRangeResponse) {} + rpc RemoveAclRange(RemoveAclRangeRequest) returns (RemoveAclRangeResponse) {} + rpc GetAclRangeAttribute(GetAclRangeAttributeRequest) + returns (GetAclRangeAttributeResponse) {} + rpc CreateAclTableGroup(CreateAclTableGroupRequest) + returns (CreateAclTableGroupResponse) {} + rpc RemoveAclTableGroup(RemoveAclTableGroupRequest) + returns (RemoveAclTableGroupResponse) {} + rpc GetAclTableGroupAttribute(GetAclTableGroupAttributeRequest) + returns (GetAclTableGroupAttributeResponse) {} + rpc CreateAclTableGroupMember(CreateAclTableGroupMemberRequest) + returns (CreateAclTableGroupMemberResponse) {} + rpc RemoveAclTableGroupMember(RemoveAclTableGroupMemberRequest) + returns (RemoveAclTableGroupMemberResponse) {} + rpc GetAclTableGroupMemberAttribute(GetAclTableGroupMemberAttributeRequest) + returns (GetAclTableGroupMemberAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/bfd.proto b/dataplane/standalone/proto/bfd.proto new file mode 100644 index 00000000..243a7e79 --- /dev/null +++ b/dataplane/standalone/proto/bfd.proto @@ -0,0 +1,144 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum BfdSessionAttr { + BFD_SESSION_ATTR_UNSPECIFIED = 0; + BFD_SESSION_ATTR_TYPE = 1; + BFD_SESSION_ATTR_HW_LOOKUP_VALID = 2; + BFD_SESSION_ATTR_VIRTUAL_ROUTER = 3; + BFD_SESSION_ATTR_PORT = 4; + BFD_SESSION_ATTR_LOCAL_DISCRIMINATOR = 5; + BFD_SESSION_ATTR_REMOTE_DISCRIMINATOR = 6; + BFD_SESSION_ATTR_UDP_SRC_PORT = 7; + BFD_SESSION_ATTR_TC = 8; + BFD_SESSION_ATTR_VLAN_TPID = 9; + BFD_SESSION_ATTR_VLAN_ID = 10; + BFD_SESSION_ATTR_VLAN_PRI = 11; + BFD_SESSION_ATTR_VLAN_CFI = 12; + BFD_SESSION_ATTR_VLAN_HEADER_VALID = 13; + BFD_SESSION_ATTR_BFD_ENCAPSULATION_TYPE = 14; + BFD_SESSION_ATTR_IPHDR_VERSION = 15; + BFD_SESSION_ATTR_TOS = 16; + BFD_SESSION_ATTR_TTL = 17; + BFD_SESSION_ATTR_SRC_IP_ADDRESS = 18; + BFD_SESSION_ATTR_DST_IP_ADDRESS = 19; + BFD_SESSION_ATTR_TUNNEL_TOS = 20; + BFD_SESSION_ATTR_TUNNEL_TTL = 21; + BFD_SESSION_ATTR_TUNNEL_SRC_IP_ADDRESS = 22; + BFD_SESSION_ATTR_TUNNEL_DST_IP_ADDRESS = 23; + BFD_SESSION_ATTR_SRC_MAC_ADDRESS = 24; + BFD_SESSION_ATTR_DST_MAC_ADDRESS = 25; + BFD_SESSION_ATTR_ECHO_ENABLE = 26; + BFD_SESSION_ATTR_MULTIHOP = 27; + BFD_SESSION_ATTR_CBIT = 28; + BFD_SESSION_ATTR_MIN_TX = 29; + BFD_SESSION_ATTR_MIN_RX = 30; + BFD_SESSION_ATTR_MULTIPLIER = 31; + BFD_SESSION_ATTR_REMOTE_MIN_TX = 32; + BFD_SESSION_ATTR_REMOTE_MIN_RX = 33; + BFD_SESSION_ATTR_STATE = 34; + BFD_SESSION_ATTR_OFFLOAD_TYPE = 35; + BFD_SESSION_ATTR_NEGOTIATED_TX = 36; + BFD_SESSION_ATTR_NEGOTIATED_RX = 37; + BFD_SESSION_ATTR_LOCAL_DIAG = 38; + BFD_SESSION_ATTR_REMOTE_DIAG = 39; + BFD_SESSION_ATTR_REMOTE_MULTIPLIER = 40; +} + +message CreateBfdSessionRequest { + uint64 switch = 1; + + BfdSessionType type = 2; + bool hw_lookup_valid = 3; + uint64 virtual_router = 4; + uint64 port = 5; + uint32 local_discriminator = 6; + uint32 remote_discriminator = 7; + uint32 udp_src_port = 8; + uint32 tc = 9; + uint32 vlan_tpid = 10; + uint32 vlan_id = 11; + uint32 vlan_pri = 12; + uint32 vlan_cfi = 13; + bool vlan_header_valid = 14; + BfdEncapsulationType bfd_encapsulation_type = 15; + uint32 iphdr_version = 16; + uint32 tos = 17; + uint32 ttl = 18; + bytes src_ip_address = 19; + bytes dst_ip_address = 20; + uint32 tunnel_tos = 21; + uint32 tunnel_ttl = 22; + bytes tunnel_src_ip_address = 23; + bytes tunnel_dst_ip_address = 24; + bytes src_mac_address = 25; + bytes dst_mac_address = 26; + bool echo_enable = 27; + bool multihop = 28; + bool cbit = 29; + uint32 min_tx = 30; + uint32 min_rx = 31; + uint32 multiplier = 32; + BfdSessionOffloadType offload_type = 33; +} + +message CreateBfdSessionResponse { + uint64 oid = 1; +} + +message RemoveBfdSessionRequest { + uint64 oid = 1; +} + +message RemoveBfdSessionResponse {} + +message SetBfdSessionAttributeRequest { + uint64 oid = 1; + oneof attr { + uint64 virtual_router = 2; + uint64 port = 3; + uint32 tc = 4; + uint32 vlan_tpid = 5; + uint32 vlan_pri = 6; + uint32 vlan_cfi = 7; + uint32 iphdr_version = 8; + uint32 tos = 9; + uint32 ttl = 10; + uint32 tunnel_tos = 11; + uint32 tunnel_ttl = 12; + bytes src_mac_address = 13; + bytes dst_mac_address = 14; + bool echo_enable = 15; + uint32 min_tx = 16; + uint32 min_rx = 17; + uint32 multiplier = 18; + } +} + +message SetBfdSessionAttributeResponse {} + +message GetBfdSessionAttributeRequest { + uint64 oid = 1; + BfdSessionAttr attr_type = 2; +} + +message GetBfdSessionAttributeResponse { + BfdSessionAttribute attr = 1; +} + +service Bfd { + rpc CreateBfdSession(CreateBfdSessionRequest) + returns (CreateBfdSessionResponse) {} + rpc RemoveBfdSession(RemoveBfdSessionRequest) + returns (RemoveBfdSessionResponse) {} + rpc SetBfdSessionAttribute(SetBfdSessionAttributeRequest) + returns (SetBfdSessionAttributeResponse) {} + rpc GetBfdSessionAttribute(GetBfdSessionAttributeRequest) + returns (GetBfdSessionAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/bridge.proto b/dataplane/standalone/proto/bridge.proto new file mode 100644 index 00000000..7b4197d5 --- /dev/null +++ b/dataplane/standalone/proto/bridge.proto @@ -0,0 +1,161 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum BridgeAttr { + BRIDGE_ATTR_UNSPECIFIED = 0; + BRIDGE_ATTR_TYPE = 1; + BRIDGE_ATTR_PORT_LIST = 2; + BRIDGE_ATTR_MAX_LEARNED_ADDRESSES = 3; + BRIDGE_ATTR_LEARN_DISABLE = 4; + BRIDGE_ATTR_UNKNOWN_UNICAST_FLOOD_CONTROL_TYPE = 5; + BRIDGE_ATTR_UNKNOWN_UNICAST_FLOOD_GROUP = 6; + BRIDGE_ATTR_UNKNOWN_MULTICAST_FLOOD_CONTROL_TYPE = 7; + BRIDGE_ATTR_UNKNOWN_MULTICAST_FLOOD_GROUP = 8; + BRIDGE_ATTR_BROADCAST_FLOOD_CONTROL_TYPE = 9; + BRIDGE_ATTR_BROADCAST_FLOOD_GROUP = 10; +} + +enum BridgePortAttr { + BRIDGE_PORT_ATTR_UNSPECIFIED = 0; + BRIDGE_PORT_ATTR_TYPE = 1; + BRIDGE_PORT_ATTR_PORT_ID = 2; + BRIDGE_PORT_ATTR_TAGGING_MODE = 3; + BRIDGE_PORT_ATTR_VLAN_ID = 4; + BRIDGE_PORT_ATTR_RIF_ID = 5; + BRIDGE_PORT_ATTR_TUNNEL_ID = 6; + BRIDGE_PORT_ATTR_BRIDGE_ID = 7; + BRIDGE_PORT_ATTR_FDB_LEARNING_MODE = 8; + BRIDGE_PORT_ATTR_MAX_LEARNED_ADDRESSES = 9; + BRIDGE_PORT_ATTR_FDB_LEARNING_LIMIT_VIOLATION_PACKET_ACTION = 10; + BRIDGE_PORT_ATTR_ADMIN_STATE = 11; + BRIDGE_PORT_ATTR_INGRESS_FILTERING = 12; + BRIDGE_PORT_ATTR_EGRESS_FILTERING = 13; + BRIDGE_PORT_ATTR_ISOLATION_GROUP = 14; +} + +message CreateBridgeRequest { + uint64 switch = 1; + + BridgeType type = 2; + uint32 max_learned_addresses = 3; + bool learn_disable = 4; + BridgeFloodControlType unknown_unicast_flood_control_type = 5; + uint64 unknown_unicast_flood_group = 6; + BridgeFloodControlType unknown_multicast_flood_control_type = 7; + uint64 unknown_multicast_flood_group = 8; + BridgeFloodControlType broadcast_flood_control_type = 9; + uint64 broadcast_flood_group = 10; +} + +message CreateBridgeResponse { + uint64 oid = 1; +} + +message RemoveBridgeRequest { + uint64 oid = 1; +} + +message RemoveBridgeResponse {} + +message SetBridgeAttributeRequest { + uint64 oid = 1; + oneof attr { + uint32 max_learned_addresses = 2; + bool learn_disable = 3; + BridgeFloodControlType unknown_unicast_flood_control_type = 4; + uint64 unknown_unicast_flood_group = 5; + BridgeFloodControlType unknown_multicast_flood_control_type = 6; + uint64 unknown_multicast_flood_group = 7; + BridgeFloodControlType broadcast_flood_control_type = 8; + uint64 broadcast_flood_group = 9; + } +} + +message SetBridgeAttributeResponse {} + +message GetBridgeAttributeRequest { + uint64 oid = 1; + BridgeAttr attr_type = 2; +} + +message GetBridgeAttributeResponse { + BridgeAttribute attr = 1; +} + +message CreateBridgePortRequest { + uint64 switch = 1; + + BridgePortType type = 2; + uint64 port_id = 3; + BridgePortTaggingMode tagging_mode = 4; + uint32 vlan_id = 5; + uint64 rif_id = 6; + uint64 tunnel_id = 7; + uint64 bridge_id = 8; + BridgePortFdbLearningMode fdb_learning_mode = 9; + uint32 max_learned_addresses = 10; + PacketAction fdb_learning_limit_violation_packet_action = 11; + bool admin_state = 12; + bool ingress_filtering = 13; + bool egress_filtering = 14; + uint64 isolation_group = 15; +} + +message CreateBridgePortResponse { + uint64 oid = 1; +} + +message RemoveBridgePortRequest { + uint64 oid = 1; +} + +message RemoveBridgePortResponse {} + +message SetBridgePortAttributeRequest { + uint64 oid = 1; + oneof attr { + BridgePortTaggingMode tagging_mode = 2; + uint64 bridge_id = 3; + BridgePortFdbLearningMode fdb_learning_mode = 4; + uint32 max_learned_addresses = 5; + PacketAction fdb_learning_limit_violation_packet_action = 6; + bool admin_state = 7; + bool ingress_filtering = 8; + bool egress_filtering = 9; + uint64 isolation_group = 10; + } +} + +message SetBridgePortAttributeResponse {} + +message GetBridgePortAttributeRequest { + uint64 oid = 1; + BridgePortAttr attr_type = 2; +} + +message GetBridgePortAttributeResponse { + BridgePortAttribute attr = 1; +} + +service Bridge { + rpc CreateBridge(CreateBridgeRequest) returns (CreateBridgeResponse) {} + rpc RemoveBridge(RemoveBridgeRequest) returns (RemoveBridgeResponse) {} + rpc SetBridgeAttribute(SetBridgeAttributeRequest) + returns (SetBridgeAttributeResponse) {} + rpc GetBridgeAttribute(GetBridgeAttributeRequest) + returns (GetBridgeAttributeResponse) {} + rpc CreateBridgePort(CreateBridgePortRequest) + returns (CreateBridgePortResponse) {} + rpc RemoveBridgePort(RemoveBridgePortRequest) + returns (RemoveBridgePortResponse) {} + rpc SetBridgePortAttribute(SetBridgePortAttributeRequest) + returns (SetBridgePortAttributeResponse) {} + rpc GetBridgePortAttribute(GetBridgePortAttributeRequest) + returns (GetBridgePortAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/buffer.proto b/dataplane/standalone/proto/buffer.proto new file mode 100644 index 00000000..676db388 --- /dev/null +++ b/dataplane/standalone/proto/buffer.proto @@ -0,0 +1,192 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum BufferPoolAttr { + BUFFER_POOL_ATTR_UNSPECIFIED = 0; + BUFFER_POOL_ATTR_SHARED_SIZE = 1; + BUFFER_POOL_ATTR_TYPE = 2; + BUFFER_POOL_ATTR_SIZE = 3; + BUFFER_POOL_ATTR_THRESHOLD_MODE = 4; + BUFFER_POOL_ATTR_TAM = 5; + BUFFER_POOL_ATTR_XOFF_SIZE = 6; + BUFFER_POOL_ATTR_WRED_PROFILE_ID = 7; +} + +enum BufferProfileAttr { + BUFFER_PROFILE_ATTR_UNSPECIFIED = 0; + BUFFER_PROFILE_ATTR_POOL_ID = 1; + BUFFER_PROFILE_ATTR_RESERVED_BUFFER_SIZE = 2; + BUFFER_PROFILE_ATTR_THRESHOLD_MODE = 3; + BUFFER_PROFILE_ATTR_SHARED_DYNAMIC_TH = 4; + BUFFER_PROFILE_ATTR_SHARED_STATIC_TH = 5; + BUFFER_PROFILE_ATTR_XOFF_TH = 6; + BUFFER_PROFILE_ATTR_XON_TH = 7; + BUFFER_PROFILE_ATTR_XON_OFFSET_TH = 8; +} + +enum IngressPriorityGroupAttr { + INGRESS_PRIORITY_GROUP_ATTR_UNSPECIFIED = 0; + INGRESS_PRIORITY_GROUP_ATTR_BUFFER_PROFILE = 1; + INGRESS_PRIORITY_GROUP_ATTR_PORT = 2; + INGRESS_PRIORITY_GROUP_ATTR_TAM = 3; + INGRESS_PRIORITY_GROUP_ATTR_INDEX = 4; +} + +message CreateBufferPoolRequest { + uint64 switch = 1; + + BufferPoolType type = 2; + uint64 size = 3; + BufferPoolThresholdMode threshold_mode = 4; + repeated uint64 tam = 5; + uint64 xoff_size = 6; + uint64 wred_profile_id = 7; +} + +message CreateBufferPoolResponse { + uint64 oid = 1; +} + +message RemoveBufferPoolRequest { + uint64 oid = 1; +} + +message RemoveBufferPoolResponse {} + +message SetBufferPoolAttributeRequest { + uint64 oid = 1; + oneof attr { + uint64 size = 2; + Uint64List tam = 3; + uint64 xoff_size = 4; + uint64 wred_profile_id = 5; + } +} + +message SetBufferPoolAttributeResponse {} + +message GetBufferPoolAttributeRequest { + uint64 oid = 1; + BufferPoolAttr attr_type = 2; +} + +message GetBufferPoolAttributeResponse { + BufferPoolAttribute attr = 1; +} + +message CreateIngressPriorityGroupRequest { + uint64 switch = 1; + + uint64 buffer_profile = 2; + uint64 port = 3; + repeated uint64 tam = 4; + uint32 index = 5; +} + +message CreateIngressPriorityGroupResponse { + uint64 oid = 1; +} + +message RemoveIngressPriorityGroupRequest { + uint64 oid = 1; +} + +message RemoveIngressPriorityGroupResponse {} + +message SetIngressPriorityGroupAttributeRequest { + uint64 oid = 1; + oneof attr { + uint64 buffer_profile = 2; + Uint64List tam = 3; + } +} + +message SetIngressPriorityGroupAttributeResponse {} + +message GetIngressPriorityGroupAttributeRequest { + uint64 oid = 1; + IngressPriorityGroupAttr attr_type = 2; +} + +message GetIngressPriorityGroupAttributeResponse { + IngressPriorityGroupAttribute attr = 1; +} + +message CreateBufferProfileRequest { + uint64 switch = 1; + + uint64 pool_id = 2; + uint64 reserved_buffer_size = 3; + BufferProfileThresholdMode threshold_mode = 4; + int32 shared_dynamic_th = 5; + uint64 shared_static_th = 6; + uint64 xoff_th = 7; + uint64 xon_th = 8; + uint64 xon_offset_th = 9; +} + +message CreateBufferProfileResponse { + uint64 oid = 1; +} + +message RemoveBufferProfileRequest { + uint64 oid = 1; +} + +message RemoveBufferProfileResponse {} + +message SetBufferProfileAttributeRequest { + uint64 oid = 1; + oneof attr { + uint64 reserved_buffer_size = 2; + int32 shared_dynamic_th = 3; + uint64 shared_static_th = 4; + uint64 xoff_th = 5; + uint64 xon_th = 6; + uint64 xon_offset_th = 7; + } +} + +message SetBufferProfileAttributeResponse {} + +message GetBufferProfileAttributeRequest { + uint64 oid = 1; + BufferProfileAttr attr_type = 2; +} + +message GetBufferProfileAttributeResponse { + BufferProfileAttribute attr = 1; +} + +service Buffer { + rpc CreateBufferPool(CreateBufferPoolRequest) + returns (CreateBufferPoolResponse) {} + rpc RemoveBufferPool(RemoveBufferPoolRequest) + returns (RemoveBufferPoolResponse) {} + rpc SetBufferPoolAttribute(SetBufferPoolAttributeRequest) + returns (SetBufferPoolAttributeResponse) {} + rpc GetBufferPoolAttribute(GetBufferPoolAttributeRequest) + returns (GetBufferPoolAttributeResponse) {} + rpc CreateIngressPriorityGroup(CreateIngressPriorityGroupRequest) + returns (CreateIngressPriorityGroupResponse) {} + rpc RemoveIngressPriorityGroup(RemoveIngressPriorityGroupRequest) + returns (RemoveIngressPriorityGroupResponse) {} + rpc SetIngressPriorityGroupAttribute(SetIngressPriorityGroupAttributeRequest) + returns (SetIngressPriorityGroupAttributeResponse) {} + rpc GetIngressPriorityGroupAttribute(GetIngressPriorityGroupAttributeRequest) + returns (GetIngressPriorityGroupAttributeResponse) {} + rpc CreateBufferProfile(CreateBufferProfileRequest) + returns (CreateBufferProfileResponse) {} + rpc RemoveBufferProfile(RemoveBufferProfileRequest) + returns (RemoveBufferProfileResponse) {} + rpc SetBufferProfileAttribute(SetBufferProfileAttributeRequest) + returns (SetBufferProfileAttributeResponse) {} + rpc GetBufferProfileAttribute(GetBufferProfileAttributeRequest) + returns (GetBufferProfileAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/common.proto b/dataplane/standalone/proto/common.proto new file mode 100644 index 00000000..a0ed6a9a --- /dev/null +++ b/dataplane/standalone/proto/common.proto @@ -0,0 +1,4039 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum AclActionType { + ACL_ACTION_TYPE_UNSPECIFIED = 0; + ACL_ACTION_TYPE_REDIRECT = 1; + ACL_ACTION_TYPE_ENDPOINT_IP = 2; + ACL_ACTION_TYPE_REDIRECT_LIST = 3; + ACL_ACTION_TYPE_PACKET_ACTION = 4; + ACL_ACTION_TYPE_FLOOD = 5; + ACL_ACTION_TYPE_COUNTER = 6; + ACL_ACTION_TYPE_MIRROR_INGRESS = 7; + ACL_ACTION_TYPE_MIRROR_EGRESS = 8; + ACL_ACTION_TYPE_SET_POLICER = 9; + ACL_ACTION_TYPE_DECREMENT_TTL = 10; + ACL_ACTION_TYPE_SET_TC = 11; + ACL_ACTION_TYPE_SET_PACKET_COLOR = 12; + ACL_ACTION_TYPE_SET_INNER_VLAN_ID = 13; + ACL_ACTION_TYPE_SET_INNER_VLAN_PRI = 14; + ACL_ACTION_TYPE_SET_OUTER_VLAN_ID = 15; + ACL_ACTION_TYPE_SET_OUTER_VLAN_PRI = 16; + ACL_ACTION_TYPE_ADD_VLAN_ID = 17; + ACL_ACTION_TYPE_ADD_VLAN_PRI = 18; + ACL_ACTION_TYPE_SET_SRC_MAC = 19; + ACL_ACTION_TYPE_SET_DST_MAC = 20; + ACL_ACTION_TYPE_SET_SRC_IP = 21; + ACL_ACTION_TYPE_SET_DST_IP = 22; + ACL_ACTION_TYPE_SET_SRC_IPV6 = 23; + ACL_ACTION_TYPE_SET_DST_IPV6 = 24; + ACL_ACTION_TYPE_SET_DSCP = 25; + ACL_ACTION_TYPE_SET_ECN = 26; + ACL_ACTION_TYPE_SET_L4_SRC_PORT = 27; + ACL_ACTION_TYPE_SET_L4_DST_PORT = 28; + ACL_ACTION_TYPE_INGRESS_SAMPLEPACKET_ENABLE = 29; + ACL_ACTION_TYPE_EGRESS_SAMPLEPACKET_ENABLE = 30; + ACL_ACTION_TYPE_SET_ACL_META_DATA = 31; + ACL_ACTION_TYPE_EGRESS_BLOCK_PORT_LIST = 32; + ACL_ACTION_TYPE_SET_USER_TRAP_ID = 33; + ACL_ACTION_TYPE_SET_DO_NOT_LEARN = 34; + ACL_ACTION_TYPE_ACL_DTEL_FLOW_OP = 35; + ACL_ACTION_TYPE_DTEL_INT_SESSION = 36; + ACL_ACTION_TYPE_DTEL_DROP_REPORT_ENABLE = 37; + ACL_ACTION_TYPE_DTEL_TAIL_DROP_REPORT_ENABLE = 38; + ACL_ACTION_TYPE_DTEL_FLOW_SAMPLE_PERCENT = 39; + ACL_ACTION_TYPE_DTEL_REPORT_ALL_PACKETS = 40; + ACL_ACTION_TYPE_NO_NAT = 41; + ACL_ACTION_TYPE_INT_INSERT = 42; + ACL_ACTION_TYPE_INT_DELETE = 43; + ACL_ACTION_TYPE_INT_REPORT_FLOW = 44; + ACL_ACTION_TYPE_INT_REPORT_DROPS = 45; + ACL_ACTION_TYPE_INT_REPORT_TAIL_DROPS = 46; + ACL_ACTION_TYPE_TAM_INT_OBJECT = 47; + ACL_ACTION_TYPE_SET_ISOLATION_GROUP = 48; + ACL_ACTION_TYPE_MACSEC_FLOW = 49; + ACL_ACTION_TYPE_SET_LAG_HASH_ID = 50; + ACL_ACTION_TYPE_SET_ECMP_HASH_ID = 51; + ACL_ACTION_TYPE_SET_VRF = 52; + ACL_ACTION_TYPE_SET_FORWARDING_CLASS = 53; +} + +enum AclBindPointType { + ACL_BIND_POINT_TYPE_UNSPECIFIED = 0; + ACL_BIND_POINT_TYPE_PORT = 1; + ACL_BIND_POINT_TYPE_LAG = 2; + ACL_BIND_POINT_TYPE_VLAN = 3; + ACL_BIND_POINT_TYPE_ROUTER_INTERFACE = 4; + ACL_BIND_POINT_TYPE_ROUTER_INTF = 5; + ACL_BIND_POINT_TYPE_SWITCH = 6; +} + +enum AclDtelFlowOp { + ACL_DTEL_FLOW_OP_UNSPECIFIED = 0; + ACL_DTEL_FLOW_OP_NOP = 1; + ACL_DTEL_FLOW_OP_INT = 2; + ACL_DTEL_FLOW_OP_IOAM = 3; + ACL_DTEL_FLOW_OP_POSTCARD = 4; +} + +enum AclIpFrag { + ACL_IP_FRAG_UNSPECIFIED = 0; + ACL_IP_FRAG_ANY = 1; + ACL_IP_FRAG_NON_FRAG = 2; + ACL_IP_FRAG_NON_FRAG_OR_HEAD = 3; + ACL_IP_FRAG_HEAD = 4; + ACL_IP_FRAG_NON_HEAD = 5; +} + +enum AclIpType { + ACL_IP_TYPE_UNSPECIFIED = 0; + ACL_IP_TYPE_ANY = 1; + ACL_IP_TYPE_IP = 2; + ACL_IP_TYPE_NON_IP = 3; + ACL_IP_TYPE_IPV4ANY = 4; + ACL_IP_TYPE_NON_IPV4 = 5; + ACL_IP_TYPE_IPV6ANY = 6; + ACL_IP_TYPE_NON_IPV6 = 7; + ACL_IP_TYPE_ARP = 8; + ACL_IP_TYPE_ARP_REQUEST = 9; + ACL_IP_TYPE_ARP_REPLY = 10; +} + +enum AclRangeType { + ACL_RANGE_TYPE_UNSPECIFIED = 0; + ACL_RANGE_TYPE_L4_SRC_PORT_RANGE = 1; + ACL_RANGE_TYPE_L4_DST_PORT_RANGE = 2; + ACL_RANGE_TYPE_OUTER_VLAN = 3; + ACL_RANGE_TYPE_INNER_VLAN = 4; + ACL_RANGE_TYPE_PACKET_LENGTH = 5; +} + +enum AclStage { + ACL_STAGE_UNSPECIFIED = 0; + ACL_STAGE_INGRESS = 1; + ACL_STAGE_EGRESS = 2; + ACL_STAGE_INGRESS_MACSEC = 3; + ACL_STAGE_EGRESS_MACSEC = 4; + ACL_STAGE_PRE_INGRESS = 5; +} + +enum AclTableGroupType { + ACL_TABLE_GROUP_TYPE_UNSPECIFIED = 0; + ACL_TABLE_GROUP_TYPE_SEQUENTIAL = 1; + ACL_TABLE_GROUP_TYPE_PARALLEL = 2; +} + +enum Api { + API_UNSPECIFIED = 0; + API_SWITCH = 2; + API_PORT = 3; + API_FDB = 4; + API_VLAN = 5; + API_VIRTUAL_ROUTER = 6; + API_ROUTE = 7; + API_NEXT_HOP = 8; + API_NEXT_HOP_GROUP = 9; + API_ROUTER_INTERFACE = 10; + API_NEIGHBOR = 11; + API_ACL = 12; + API_HOSTIF = 13; + API_MIRROR = 14; + API_SAMPLEPACKET = 15; + API_STP = 16; + API_LAG = 17; + API_POLICER = 18; + API_WRED = 19; + API_QOS_MAP = 20; + API_QUEUE = 21; + API_SCHEDULER = 22; + API_SCHEDULER_GROUP = 23; + API_BUFFER = 24; + API_HASH = 25; + API_UDF = 26; + API_TUNNEL = 27; + API_L2MC = 28; + API_IPMC = 29; + API_RPF_GROUP = 30; + API_L2MC_GROUP = 31; + API_IPMC_GROUP = 32; + API_MCAST_FDB = 33; + API_BRIDGE = 34; + API_TAM = 35; + API_SRV6 = 36; + API_MPLS = 37; + API_DTEL = 38; + API_BFD = 39; + API_ISOLATION_GROUP = 40; + API_NAT = 41; + API_COUNTER = 42; + API_DEBUG_COUNTER = 43; + API_MACSEC = 44; + API_SYSTEM_PORT = 45; + API_MY_MAC = 46; + API_IPSEC = 47; + API_MAX = 48; +} + +enum BfdEncapsulationType { + BFD_ENCAPSULATION_TYPE_UNSPECIFIED = 0; + BFD_ENCAPSULATION_TYPE_IP_IN_IP = 1; + BFD_ENCAPSULATION_TYPE_L3_GRE_TUNNEL = 2; + BFD_ENCAPSULATION_TYPE_NONE = 3; +} + +enum BfdSessionOffloadType { + BFD_SESSION_OFFLOAD_TYPE_UNSPECIFIED = 0; + BFD_SESSION_OFFLOAD_TYPE_NONE = 1; + BFD_SESSION_OFFLOAD_TYPE_FULL = 2; + BFD_SESSION_OFFLOAD_TYPE_SUSTENANCE = 3; +} + +enum BfdSessionStat { + BFD_SESSION_STAT_UNSPECIFIED = 0; + BFD_SESSION_STAT_IN_PACKETS = 1; + BFD_SESSION_STAT_OUT_PACKETS = 2; + BFD_SESSION_STAT_DROP_PACKETS = 3; +} + +enum BfdSessionState { + BFD_SESSION_STATE_UNSPECIFIED = 0; + BFD_SESSION_STATE_ADMIN_DOWN = 1; + BFD_SESSION_STATE_DOWN = 2; + BFD_SESSION_STATE_INIT = 3; + BFD_SESSION_STATE_UP = 4; +} + +enum BfdSessionType { + BFD_SESSION_TYPE_UNSPECIFIED = 0; + BFD_SESSION_TYPE_DEMAND_ACTIVE = 1; + BFD_SESSION_TYPE_DEMAND_PASSIVE = 2; + BFD_SESSION_TYPE_ASYNC_ACTIVE = 3; + BFD_SESSION_TYPE_ASYNC_PASSIVE = 4; +} + +enum BridgeFloodControlType { + BRIDGE_FLOOD_CONTROL_TYPE_UNSPECIFIED = 0; + BRIDGE_FLOOD_CONTROL_TYPE_SUB_PORTS = 1; + BRIDGE_FLOOD_CONTROL_TYPE_NONE = 2; + BRIDGE_FLOOD_CONTROL_TYPE_L2MC_GROUP = 3; + BRIDGE_FLOOD_CONTROL_TYPE_COMBINED = 4; +} + +enum BridgePortFdbLearningMode { + BRIDGE_PORT_FDB_LEARNING_MODE_UNSPECIFIED = 0; + BRIDGE_PORT_FDB_LEARNING_MODE_DROP = 1; + BRIDGE_PORT_FDB_LEARNING_MODE_DISABLE = 2; + BRIDGE_PORT_FDB_LEARNING_MODE_HW = 3; + BRIDGE_PORT_FDB_LEARNING_MODE_CPU_TRAP = 4; + BRIDGE_PORT_FDB_LEARNING_MODE_CPU_LOG = 5; + BRIDGE_PORT_FDB_LEARNING_MODE_FDB_NOTIFICATION = 6; +} + +enum BridgePortStat { + BRIDGE_PORT_STAT_UNSPECIFIED = 0; + BRIDGE_PORT_STAT_IN_OCTETS = 1; + BRIDGE_PORT_STAT_IN_PACKETS = 2; + BRIDGE_PORT_STAT_OUT_OCTETS = 3; + BRIDGE_PORT_STAT_OUT_PACKETS = 4; +} + +enum BridgePortTaggingMode { + BRIDGE_PORT_TAGGING_MODE_UNSPECIFIED = 0; + BRIDGE_PORT_TAGGING_MODE_UNTAGGED = 1; + BRIDGE_PORT_TAGGING_MODE_TAGGED = 2; +} + +enum BridgePortType { + BRIDGE_PORT_TYPE_UNSPECIFIED = 0; + BRIDGE_PORT_TYPE_PORT = 1; + BRIDGE_PORT_TYPE_SUB_PORT = 2; + BRIDGE_PORT_TYPE_1Q_ROUTER = 3; + BRIDGE_PORT_TYPE_1D_ROUTER = 4; + BRIDGE_PORT_TYPE_TUNNEL = 5; +} + +enum BridgeStat { + BRIDGE_STAT_UNSPECIFIED = 0; + BRIDGE_STAT_IN_OCTETS = 1; + BRIDGE_STAT_IN_PACKETS = 2; + BRIDGE_STAT_OUT_OCTETS = 3; + BRIDGE_STAT_OUT_PACKETS = 4; +} + +enum BridgeType { + BRIDGE_TYPE_UNSPECIFIED = 0; + BRIDGE_TYPE_1Q = 1; + BRIDGE_TYPE_1D = 2; +} + +enum BufferPoolStat { + BUFFER_POOL_STAT_UNSPECIFIED = 0; + BUFFER_POOL_STAT_CURR_OCCUPANCY_BYTES = 1; + BUFFER_POOL_STAT_WATERMARK_BYTES = 2; + BUFFER_POOL_STAT_DROPPED_PACKETS = 3; + BUFFER_POOL_STAT_GREEN_WRED_DROPPED_PACKETS = 4; + BUFFER_POOL_STAT_GREEN_WRED_DROPPED_BYTES = 5; + BUFFER_POOL_STAT_YELLOW_WRED_DROPPED_PACKETS = 6; + BUFFER_POOL_STAT_YELLOW_WRED_DROPPED_BYTES = 7; + BUFFER_POOL_STAT_RED_WRED_DROPPED_PACKETS = 8; + BUFFER_POOL_STAT_RED_WRED_DROPPED_BYTES = 9; + BUFFER_POOL_STAT_WRED_DROPPED_PACKETS = 10; + BUFFER_POOL_STAT_WRED_DROPPED_BYTES = 11; + BUFFER_POOL_STAT_GREEN_WRED_ECN_MARKED_PACKETS = 12; + BUFFER_POOL_STAT_GREEN_WRED_ECN_MARKED_BYTES = 13; + BUFFER_POOL_STAT_YELLOW_WRED_ECN_MARKED_PACKETS = 14; + BUFFER_POOL_STAT_YELLOW_WRED_ECN_MARKED_BYTES = 15; + BUFFER_POOL_STAT_RED_WRED_ECN_MARKED_PACKETS = 16; + BUFFER_POOL_STAT_RED_WRED_ECN_MARKED_BYTES = 17; + BUFFER_POOL_STAT_WRED_ECN_MARKED_PACKETS = 18; + BUFFER_POOL_STAT_WRED_ECN_MARKED_BYTES = 19; + BUFFER_POOL_STAT_XOFF_ROOM_CURR_OCCUPANCY_BYTES = 20; + BUFFER_POOL_STAT_XOFF_ROOM_WATERMARK_BYTES = 21; + BUFFER_POOL_STAT_CUSTOM_RANGE_BASE = 22; +} + +enum BufferPoolThresholdMode { + BUFFER_POOL_THRESHOLD_MODE_UNSPECIFIED = 0; + BUFFER_POOL_THRESHOLD_MODE_STATIC = 1; + BUFFER_POOL_THRESHOLD_MODE_DYNAMIC = 2; +} + +enum BufferPoolType { + BUFFER_POOL_TYPE_UNSPECIFIED = 0; + BUFFER_POOL_TYPE_INGRESS = 1; + BUFFER_POOL_TYPE_EGRESS = 2; + BUFFER_POOL_TYPE_BOTH = 3; +} + +enum BufferProfileThresholdMode { + BUFFER_PROFILE_THRESHOLD_MODE_UNSPECIFIED = 0; + BUFFER_PROFILE_THRESHOLD_MODE_STATIC = 1; + BUFFER_PROFILE_THRESHOLD_MODE_DYNAMIC = 2; +} + +enum BulkOpErrorMode { + BULK_OP_ERROR_MODE_UNSPECIFIED = 0; + BULK_OP_ERROR_MODE_STOP_ON_ERROR = 1; + BULK_OP_ERROR_MODE_IGNORE_ERROR = 2; +} + +enum CommonApi { + COMMON_API_UNSPECIFIED = 0; + COMMON_API_CREATE = 1; + COMMON_API_REMOVE = 2; + COMMON_API_SET = 3; + COMMON_API_GET = 4; + COMMON_API_BULK_CREATE = 5; + COMMON_API_BULK_REMOVE = 6; + COMMON_API_BULK_SET = 7; + COMMON_API_BULK_GET = 8; + COMMON_API_MAX = 9; +} + +enum CounterStat { + COUNTER_STAT_UNSPECIFIED = 0; + COUNTER_STAT_PACKETS = 1; + COUNTER_STAT_BYTES = 2; + COUNTER_STAT_CUSTOM_RANGE_BASE = 3; +} + +enum CounterType { + COUNTER_TYPE_UNSPECIFIED = 0; + COUNTER_TYPE_REGULAR = 1; +} + +enum DebugCounterBindMethod { + DEBUG_COUNTER_BIND_METHOD_UNSPECIFIED = 0; + DEBUG_COUNTER_BIND_METHOD_AUTOMATIC = 1; +} + +enum DebugCounterType { + DEBUG_COUNTER_TYPE_UNSPECIFIED = 0; + DEBUG_COUNTER_TYPE_PORT_IN_DROP_REASONS = 1; + DEBUG_COUNTER_TYPE_PORT_OUT_DROP_REASONS = 2; + DEBUG_COUNTER_TYPE_SWITCH_IN_DROP_REASONS = 3; + DEBUG_COUNTER_TYPE_SWITCH_OUT_DROP_REASONS = 4; +} + +enum DtelEventType { + DTEL_EVENT_TYPE_UNSPECIFIED = 0; + DTEL_EVENT_TYPE_FLOW_STATE = 1; + DTEL_EVENT_TYPE_FLOW_REPORT_ALL_PACKETS = 2; + DTEL_EVENT_TYPE_FLOW_TCPFLAG = 3; + DTEL_EVENT_TYPE_QUEUE_REPORT_THRESHOLD_BREACH = 4; + DTEL_EVENT_TYPE_QUEUE_REPORT_TAIL_DROP = 5; + DTEL_EVENT_TYPE_DROP_REPORT = 6; + DTEL_EVENT_TYPE_MAX = 7; +} + +enum EcnMarkMode { + ECN_MARK_MODE_UNSPECIFIED = 0; + ECN_MARK_MODE_NONE = 1; + ECN_MARK_MODE_GREEN = 2; + ECN_MARK_MODE_YELLOW = 3; + ECN_MARK_MODE_RED = 4; + ECN_MARK_MODE_GREEN_YELLOW = 5; + ECN_MARK_MODE_GREEN_RED = 6; + ECN_MARK_MODE_YELLOW_RED = 7; + ECN_MARK_MODE_ALL = 8; +} + +enum ErspanEncapsulationType { + ERSPAN_ENCAPSULATION_TYPE_UNSPECIFIED = 0; + ERSPAN_ENCAPSULATION_TYPE_MIRROR_L3_GRE_TUNNEL = 1; +} + +enum FdbEntryType { + FDB_ENTRY_TYPE_UNSPECIFIED = 0; + FDB_ENTRY_TYPE_DYNAMIC = 1; + FDB_ENTRY_TYPE_STATIC = 2; +} + +enum FdbEvent { + FDB_EVENT_UNSPECIFIED = 0; + FDB_EVENT_LEARNED = 1; + FDB_EVENT_AGED = 2; + FDB_EVENT_MOVE = 3; + FDB_EVENT_FLUSHED = 4; +} + +enum FdbFlushEntryType { + FDB_FLUSH_ENTRY_TYPE_UNSPECIFIED = 0; + FDB_FLUSH_ENTRY_TYPE_DYNAMIC = 1; + FDB_FLUSH_ENTRY_TYPE_STATIC = 2; + FDB_FLUSH_ENTRY_TYPE_ALL = 3; +} + +enum HashAlgorithm { + HASH_ALGORITHM_UNSPECIFIED = 0; + HASH_ALGORITHM_CRC = 1; + HASH_ALGORITHM_XOR = 2; + HASH_ALGORITHM_RANDOM = 3; + HASH_ALGORITHM_CRC_32LO = 4; + HASH_ALGORITHM_CRC_32HI = 5; + HASH_ALGORITHM_CRC_CCITT = 6; + HASH_ALGORITHM_CRC_XOR = 7; +} + +enum HostifTableEntryChannelType { + HOSTIF_TABLE_ENTRY_CHANNEL_TYPE_UNSPECIFIED = 0; + HOSTIF_TABLE_ENTRY_CHANNEL_TYPE_CB = 1; + HOSTIF_TABLE_ENTRY_CHANNEL_TYPE_FD = 2; + HOSTIF_TABLE_ENTRY_CHANNEL_TYPE_NETDEV_PHYSICAL_PORT = 3; + HOSTIF_TABLE_ENTRY_CHANNEL_TYPE_NETDEV_LOGICAL_PORT = 4; + HOSTIF_TABLE_ENTRY_CHANNEL_TYPE_NETDEV_L3 = 5; + HOSTIF_TABLE_ENTRY_CHANNEL_TYPE_GENETLINK = 6; +} + +enum HostifTableEntryType { + HOSTIF_TABLE_ENTRY_TYPE_UNSPECIFIED = 0; + HOSTIF_TABLE_ENTRY_TYPE_PORT = 1; + HOSTIF_TABLE_ENTRY_TYPE_LAG = 2; + HOSTIF_TABLE_ENTRY_TYPE_VLAN = 3; + HOSTIF_TABLE_ENTRY_TYPE_TRAP_ID = 4; + HOSTIF_TABLE_ENTRY_TYPE_WILDCARD = 5; +} + +enum HostifTrapType { + HOSTIF_TRAP_TYPE_UNSPECIFIED = 0; + HOSTIF_TRAP_TYPE_START = 1; + HOSTIF_TRAP_TYPE_STP = 2; + HOSTIF_TRAP_TYPE_LACP = 3; + HOSTIF_TRAP_TYPE_EAPOL = 4; + HOSTIF_TRAP_TYPE_LLDP = 5; + HOSTIF_TRAP_TYPE_PVRST = 6; + HOSTIF_TRAP_TYPE_IGMP_TYPE_QUERY = 7; + HOSTIF_TRAP_TYPE_IGMP_TYPE_LEAVE = 8; + HOSTIF_TRAP_TYPE_IGMP_TYPE_V1_REPORT = 9; + HOSTIF_TRAP_TYPE_IGMP_TYPE_V2_REPORT = 10; + HOSTIF_TRAP_TYPE_IGMP_TYPE_V3_REPORT = 11; + HOSTIF_TRAP_TYPE_SAMPLEPACKET = 12; + HOSTIF_TRAP_TYPE_UDLD = 13; + HOSTIF_TRAP_TYPE_CDP = 14; + HOSTIF_TRAP_TYPE_VTP = 15; + HOSTIF_TRAP_TYPE_DTP = 16; + HOSTIF_TRAP_TYPE_PAGP = 17; + HOSTIF_TRAP_TYPE_PTP = 18; + HOSTIF_TRAP_TYPE_PTP_TX_EVENT = 19; + HOSTIF_TRAP_TYPE_DHCP_L2 = 20; + HOSTIF_TRAP_TYPE_DHCPV6_L2 = 21; + HOSTIF_TRAP_TYPE_SWITCH_CUSTOM_RANGE_BASE = 22; + HOSTIF_TRAP_TYPE_ARP_REQUEST = 23; + HOSTIF_TRAP_TYPE_ARP_RESPONSE = 24; + HOSTIF_TRAP_TYPE_DHCP = 25; + HOSTIF_TRAP_TYPE_OSPF = 26; + HOSTIF_TRAP_TYPE_PIM = 27; + HOSTIF_TRAP_TYPE_VRRP = 28; + HOSTIF_TRAP_TYPE_DHCPV6 = 29; + HOSTIF_TRAP_TYPE_OSPFV6 = 30; + HOSTIF_TRAP_TYPE_VRRPV6 = 31; + HOSTIF_TRAP_TYPE_IPV6_NEIGHBOR_DISCOVERY = 32; + HOSTIF_TRAP_TYPE_IPV6_MLD_V1_V2 = 33; + HOSTIF_TRAP_TYPE_IPV6_MLD_V1_REPORT = 34; + HOSTIF_TRAP_TYPE_IPV6_MLD_V1_DONE = 35; + HOSTIF_TRAP_TYPE_MLD_V2_REPORT = 36; + HOSTIF_TRAP_TYPE_UNKNOWN_L3_MULTICAST = 37; + HOSTIF_TRAP_TYPE_SNAT_MISS = 38; + HOSTIF_TRAP_TYPE_DNAT_MISS = 39; + HOSTIF_TRAP_TYPE_NAT_HAIRPIN = 40; + HOSTIF_TRAP_TYPE_IPV6_NEIGHBOR_SOLICITATION = 41; + HOSTIF_TRAP_TYPE_IPV6_NEIGHBOR_ADVERTISEMENT = 42; + HOSTIF_TRAP_TYPE_ISIS = 43; + HOSTIF_TRAP_TYPE_ROUTER_CUSTOM_RANGE_BASE = 44; + HOSTIF_TRAP_TYPE_IP2ME = 45; + HOSTIF_TRAP_TYPE_SSH = 46; + HOSTIF_TRAP_TYPE_SNMP = 47; + HOSTIF_TRAP_TYPE_BGP = 48; + HOSTIF_TRAP_TYPE_BGPV6 = 49; + HOSTIF_TRAP_TYPE_BFD = 50; + HOSTIF_TRAP_TYPE_BFDV6 = 51; + HOSTIF_TRAP_TYPE_BFD_MICRO = 52; + HOSTIF_TRAP_TYPE_BFDV6_MICRO = 53; + HOSTIF_TRAP_TYPE_LDP = 54; + HOSTIF_TRAP_TYPE_LOCAL_IP_CUSTOM_RANGE_BASE = 55; + HOSTIF_TRAP_TYPE_L3_MTU_ERROR = 56; + HOSTIF_TRAP_TYPE_TTL_ERROR = 57; + HOSTIF_TRAP_TYPE_STATIC_FDB_MOVE = 58; + HOSTIF_TRAP_TYPE_PIPELINE_DISCARD_EGRESS_BUFFER = 59; + HOSTIF_TRAP_TYPE_PIPELINE_DISCARD_WRED = 60; + HOSTIF_TRAP_TYPE_PIPELINE_DISCARD_ROUTER = 61; + HOSTIF_TRAP_TYPE_MPLS_TTL_ERROR = 62; + HOSTIF_TRAP_TYPE_MPLS_ROUTER_ALERT_LABEL = 63; + HOSTIF_TRAP_TYPE_MPLS_LABEL_LOOKUP_MISS = 64; + HOSTIF_TRAP_TYPE_CUSTOM_EXCEPTION_RANGE_BASE = 65; + HOSTIF_TRAP_TYPE_END = 66; +} + +enum HostifTxType { + HOSTIF_TX_TYPE_UNSPECIFIED = 0; + HOSTIF_TX_TYPE_PIPELINE_BYPASS = 1; + HOSTIF_TX_TYPE_PIPELINE_LOOKUP = 2; + HOSTIF_TX_TYPE_CUSTOM_RANGE_BASE = 3; +} + +enum HostifType { + HOSTIF_TYPE_UNSPECIFIED = 0; + HOSTIF_TYPE_NETDEV = 1; + HOSTIF_TYPE_FD = 2; + HOSTIF_TYPE_GENETLINK = 3; +} + +enum HostifUserDefinedTrapType { + HOSTIF_USER_DEFINED_TRAP_TYPE_UNSPECIFIED = 0; + HOSTIF_USER_DEFINED_TRAP_TYPE_START = 1; + HOSTIF_USER_DEFINED_TRAP_TYPE_ROUTER = 2; + HOSTIF_USER_DEFINED_TRAP_TYPE_NEIGHBOR = 3; + HOSTIF_USER_DEFINED_TRAP_TYPE_NEIGH = 4; + HOSTIF_USER_DEFINED_TRAP_TYPE_ACL = 5; + HOSTIF_USER_DEFINED_TRAP_TYPE_FDB = 6; + HOSTIF_USER_DEFINED_TRAP_TYPE_INSEG_ENTRY = 7; + HOSTIF_USER_DEFINED_TRAP_TYPE_CUSTOM_RANGE_BASE = 8; + HOSTIF_USER_DEFINED_TRAP_TYPE_END = 9; +} + +enum HostifVlanTag { + HOSTIF_VLAN_TAG_UNSPECIFIED = 0; + HOSTIF_VLAN_TAG_STRIP = 1; + HOSTIF_VLAN_TAG_KEEP = 2; + HOSTIF_VLAN_TAG_ORIGINAL = 3; +} + +enum InDropReason { + IN_DROP_REASON_UNSPECIFIED = 0; + IN_DROP_REASON_START = 1; + IN_DROP_REASON_L2_ANY = 2; + IN_DROP_REASON_SMAC_MULTICAST = 3; + IN_DROP_REASON_SMAC_EQUALS_DMAC = 4; + IN_DROP_REASON_DMAC_RESERVED = 5; + IN_DROP_REASON_VLAN_TAG_NOT_ALLOWED = 6; + IN_DROP_REASON_INGRESS_VLAN_FILTER = 7; + IN_DROP_REASON_INGRESS_STP_FILTER = 8; + IN_DROP_REASON_FDB_UC_DISCARD = 9; + IN_DROP_REASON_FDB_MC_DISCARD = 10; + IN_DROP_REASON_L2_LOOPBACK_FILTER = 11; + IN_DROP_REASON_EXCEEDS_L2_MTU = 12; + IN_DROP_REASON_L3_ANY = 13; + IN_DROP_REASON_EXCEEDS_L3_MTU = 14; + IN_DROP_REASON_TTL = 15; + IN_DROP_REASON_L3_LOOPBACK_FILTER = 16; + IN_DROP_REASON_NON_ROUTABLE = 17; + IN_DROP_REASON_NO_L3_HEADER = 18; + IN_DROP_REASON_IP_HEADER_ERROR = 19; + IN_DROP_REASON_UC_DIP_MC_DMAC = 20; + IN_DROP_REASON_DIP_LOOPBACK = 21; + IN_DROP_REASON_SIP_LOOPBACK = 22; + IN_DROP_REASON_SIP_MC = 23; + IN_DROP_REASON_SIP_CLASS_E = 24; + IN_DROP_REASON_SIP_UNSPECIFIED = 25; + IN_DROP_REASON_MC_DMAC_MISMATCH = 26; + IN_DROP_REASON_SIP_EQUALS_DIP = 27; + IN_DROP_REASON_SIP_BC = 28; + IN_DROP_REASON_DIP_LOCAL = 29; + IN_DROP_REASON_DIP_LINK_LOCAL = 30; + IN_DROP_REASON_SIP_LINK_LOCAL = 31; + IN_DROP_REASON_IPV6_MC_SCOPE0 = 32; + IN_DROP_REASON_IPV6_MC_SCOPE1 = 33; + IN_DROP_REASON_IRIF_DISABLED = 34; + IN_DROP_REASON_ERIF_DISABLED = 35; + IN_DROP_REASON_LPM4_MISS = 36; + IN_DROP_REASON_LPM6_MISS = 37; + IN_DROP_REASON_BLACKHOLE_ROUTE = 38; + IN_DROP_REASON_BLACKHOLE_ARP = 39; + IN_DROP_REASON_UNRESOLVED_NEXT_HOP = 40; + IN_DROP_REASON_L3_EGRESS_LINK_DOWN = 41; + IN_DROP_REASON_DECAP_ERROR = 42; + IN_DROP_REASON_ACL_ANY = 43; + IN_DROP_REASON_ACL_INGRESS_PORT = 44; + IN_DROP_REASON_ACL_INGRESS_LAG = 45; + IN_DROP_REASON_ACL_INGRESS_VLAN = 46; + IN_DROP_REASON_ACL_INGRESS_RIF = 47; + IN_DROP_REASON_ACL_INGRESS_SWITCH = 48; + IN_DROP_REASON_ACL_EGRESS_PORT = 49; + IN_DROP_REASON_ACL_EGRESS_LAG = 50; + IN_DROP_REASON_ACL_EGRESS_VLAN = 51; + IN_DROP_REASON_ACL_EGRESS_RIF = 52; + IN_DROP_REASON_ACL_EGRESS_SWITCH = 53; + IN_DROP_REASON_FDB_AND_BLACKHOLE_DISCARDS = 54; + IN_DROP_REASON_MPLS_MISS = 55; + IN_DROP_REASON_SRV6_LOCAL_SID_DROP = 56; + IN_DROP_REASON_END = 57; + IN_DROP_REASON_CUSTOM_RANGE_BASE = 58; + IN_DROP_REASON_CUSTOM_RANGE_END = 59; +} + +enum IngressPriorityGroupStat { + INGRESS_PRIORITY_GROUP_STAT_UNSPECIFIED = 0; + INGRESS_PRIORITY_GROUP_STAT_PACKETS = 1; + INGRESS_PRIORITY_GROUP_STAT_BYTES = 2; + INGRESS_PRIORITY_GROUP_STAT_CURR_OCCUPANCY_BYTES = 3; + INGRESS_PRIORITY_GROUP_STAT_WATERMARK_BYTES = 4; + INGRESS_PRIORITY_GROUP_STAT_SHARED_CURR_OCCUPANCY_BYTES = 5; + INGRESS_PRIORITY_GROUP_STAT_SHARED_WATERMARK_BYTES = 6; + INGRESS_PRIORITY_GROUP_STAT_XOFF_ROOM_CURR_OCCUPANCY_BYTES = 7; + INGRESS_PRIORITY_GROUP_STAT_XOFF_ROOM_WATERMARK_BYTES = 8; + INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS = 9; + INGRESS_PRIORITY_GROUP_STAT_CUSTOM_RANGE_BASE = 10; +} + +enum InsegEntryPopQosMode { + INSEG_ENTRY_POP_QOS_MODE_UNSPECIFIED = 0; + INSEG_ENTRY_POP_QOS_MODE_UNIFORM = 1; + INSEG_ENTRY_POP_QOS_MODE_PIPE = 2; +} + +enum InsegEntryPopTtlMode { + INSEG_ENTRY_POP_TTL_MODE_UNSPECIFIED = 0; + INSEG_ENTRY_POP_TTL_MODE_UNIFORM = 1; + INSEG_ENTRY_POP_TTL_MODE_PIPE = 2; +} + +enum InsegEntryPscType { + INSEG_ENTRY_PSC_TYPE_UNSPECIFIED = 0; + INSEG_ENTRY_PSC_TYPE_ELSP = 1; + INSEG_ENTRY_PSC_TYPE_LLSP = 2; +} + +enum IpAddrFamily { + IP_ADDR_FAMILY_UNSPECIFIED = 0; + IP_ADDR_FAMILY_IPV4 = 1; + IP_ADDR_FAMILY_IPV6 = 2; +} + +enum IpmcEntryType { + IPMC_ENTRY_TYPE_UNSPECIFIED = 0; + IPMC_ENTRY_TYPE_SG = 1; + IPMC_ENTRY_TYPE_XG = 2; +} + +enum IpsecCipher { + IPSEC_CIPHER_UNSPECIFIED = 0; + IPSEC_CIPHER_AES128_GCM16 = 1; + IPSEC_CIPHER_AES256_GCM16 = 2; + IPSEC_CIPHER_AES128_GMAC = 3; + IPSEC_CIPHER_AES256_GMAC = 4; +} + +enum IpsecDirection { + IPSEC_DIRECTION_UNSPECIFIED = 0; + IPSEC_DIRECTION_EGRESS = 1; + IPSEC_DIRECTION_INGRESS = 2; +} + +enum IpsecPortStat { + IPSEC_PORT_STAT_UNSPECIFIED = 0; + IPSEC_PORT_STAT_TX_ERROR_PKTS = 1; + IPSEC_PORT_STAT_TX_IPSEC_PKTS = 2; + IPSEC_PORT_STAT_TX_NON_IPSEC_PKTS = 3; + IPSEC_PORT_STAT_RX_ERROR_PKTS = 4; + IPSEC_PORT_STAT_RX_IPSEC_PKTS = 5; + IPSEC_PORT_STAT_RX_NON_IPSEC_PKTS = 6; +} + +enum IpsecSaOctetCountStatus { + IPSEC_SA_OCTET_COUNT_STATUS_UNSPECIFIED = 0; + IPSEC_SA_OCTET_COUNT_STATUS_BELOW_LOW_WATERMARK = 1; + IPSEC_SA_OCTET_COUNT_STATUS_BELOW_HIGH_WATERMARK = 2; + IPSEC_SA_OCTET_COUNT_STATUS_ABOVE_HIGH_WATERMARK = 3; +} + +enum IpsecSaStat { + IPSEC_SA_STAT_UNSPECIFIED = 0; + IPSEC_SA_STAT_PROTECTED_OCTETS = 1; + IPSEC_SA_STAT_PROTECTED_PKTS = 2; + IPSEC_SA_STAT_GOOD_PKTS = 3; + IPSEC_SA_STAT_BAD_HEADER_PKTS_IN = 4; + IPSEC_SA_STAT_REPLAYED_PKTS_IN = 5; + IPSEC_SA_STAT_LATE_PKTS_IN = 6; + IPSEC_SA_STAT_BAD_TRAILER_PKTS_IN = 7; + IPSEC_SA_STAT_AUTH_FAIL_PKTS_IN = 8; + IPSEC_SA_STAT_DUMMY_DROPPED_PKTS_IN = 9; + IPSEC_SA_STAT_OTHER_DROPPED_PKTS = 10; +} + +enum IsolationGroupType { + ISOLATION_GROUP_TYPE_UNSPECIFIED = 0; + ISOLATION_GROUP_TYPE_PORT = 1; + ISOLATION_GROUP_TYPE_BRIDGE_PORT = 2; +} + +enum L2mcEntryType { + L2MC_ENTRY_TYPE_UNSPECIFIED = 0; + L2MC_ENTRY_TYPE_SG = 1; + L2MC_ENTRY_TYPE_XG = 2; +} + +enum LogLevel { + LOG_LEVEL_UNSPECIFIED = 0; + LOG_LEVEL_DEBUG = 1; + LOG_LEVEL_INFO = 2; + LOG_LEVEL_NOTICE = 3; + LOG_LEVEL_WARN = 4; + LOG_LEVEL_ERROR = 5; + LOG_LEVEL_CRITICAL = 6; +} + +enum MacsecCipherSuite { + MACSEC_CIPHER_SUITE_UNSPECIFIED = 0; + MACSEC_CIPHER_SUITE_GCM_AES_128 = 1; + MACSEC_CIPHER_SUITE_GCM_AES_256 = 2; + MACSEC_CIPHER_SUITE_GCM_AES_XPN_128 = 3; + MACSEC_CIPHER_SUITE_GCM_AES_XPN_256 = 4; +} + +enum MacsecDirection { + MACSEC_DIRECTION_UNSPECIFIED = 0; + MACSEC_DIRECTION_EGRESS = 1; + MACSEC_DIRECTION_INGRESS = 2; +} + +enum MacsecFlowStat { + MACSEC_FLOW_STAT_UNSPECIFIED = 0; + MACSEC_FLOW_STAT_OTHER_ERR = 1; + MACSEC_FLOW_STAT_OCTETS_UNCONTROLLED = 2; + MACSEC_FLOW_STAT_OCTETS_CONTROLLED = 3; + MACSEC_FLOW_STAT_OUT_OCTETS_COMMON = 4; + MACSEC_FLOW_STAT_UCAST_PKTS_UNCONTROLLED = 5; + MACSEC_FLOW_STAT_UCAST_PKTS_CONTROLLED = 6; + MACSEC_FLOW_STAT_MULTICAST_PKTS_UNCONTROLLED = 7; + MACSEC_FLOW_STAT_MULTICAST_PKTS_CONTROLLED = 8; + MACSEC_FLOW_STAT_BROADCAST_PKTS_UNCONTROLLED = 9; + MACSEC_FLOW_STAT_BROADCAST_PKTS_CONTROLLED = 10; + MACSEC_FLOW_STAT_CONTROL_PKTS = 11; + MACSEC_FLOW_STAT_PKTS_UNTAGGED = 12; + MACSEC_FLOW_STAT_IN_TAGGED_CONTROL_PKTS = 13; + MACSEC_FLOW_STAT_OUT_PKTS_TOO_LONG = 14; + MACSEC_FLOW_STAT_IN_PKTS_NO_TAG = 15; + MACSEC_FLOW_STAT_IN_PKTS_BAD_TAG = 16; + MACSEC_FLOW_STAT_IN_PKTS_NO_SCI = 17; + MACSEC_FLOW_STAT_IN_PKTS_UNKNOWN_SCI = 18; + MACSEC_FLOW_STAT_IN_PKTS_OVERRUN = 19; +} + +enum MacsecPortStat { + MACSEC_PORT_STAT_UNSPECIFIED = 0; + MACSEC_PORT_STAT_PRE_MACSEC_DROP_PKTS = 1; + MACSEC_PORT_STAT_CONTROL_PKTS = 2; + MACSEC_PORT_STAT_DATA_PKTS = 3; +} + +enum MacsecSaStat { + MACSEC_SA_STAT_UNSPECIFIED = 0; + MACSEC_SA_STAT_OCTETS_ENCRYPTED = 1; + MACSEC_SA_STAT_OCTETS_PROTECTED = 2; + MACSEC_SA_STAT_OUT_PKTS_ENCRYPTED = 3; + MACSEC_SA_STAT_OUT_PKTS_PROTECTED = 4; + MACSEC_SA_STAT_IN_PKTS_UNCHECKED = 5; + MACSEC_SA_STAT_IN_PKTS_DELAYED = 6; + MACSEC_SA_STAT_IN_PKTS_LATE = 7; + MACSEC_SA_STAT_IN_PKTS_INVALID = 8; + MACSEC_SA_STAT_IN_PKTS_NOT_VALID = 9; + MACSEC_SA_STAT_IN_PKTS_NOT_USING_SA = 10; + MACSEC_SA_STAT_IN_PKTS_UNUSED_SA = 11; + MACSEC_SA_STAT_IN_PKTS_OK = 12; +} + +enum MacsecScStat { + MACSEC_SC_STAT_UNSPECIFIED = 0; + MACSEC_SC_STAT_SA_NOT_IN_USE = 1; +} + +enum MeterType { + METER_TYPE_UNSPECIFIED = 0; + METER_TYPE_PACKETS = 1; + METER_TYPE_BYTES = 2; + METER_TYPE_CUSTOM_RANGE_BASE = 3; +} + +enum MirrorSessionCongestionMode { + MIRROR_SESSION_CONGESTION_MODE_UNSPECIFIED = 0; + MIRROR_SESSION_CONGESTION_MODE_INDEPENDENT = 1; + MIRROR_SESSION_CONGESTION_MODE_CORRELATED = 2; +} + +enum MirrorSessionType { + MIRROR_SESSION_TYPE_UNSPECIFIED = 0; + MIRROR_SESSION_TYPE_LOCAL = 1; + MIRROR_SESSION_TYPE_REMOTE = 2; + MIRROR_SESSION_TYPE_ENHANCED_REMOTE = 3; + MIRROR_SESSION_TYPE_SFLOW = 4; +} + +enum MySidEntryEndpointBehavior { + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_UNSPECIFIED = 0; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_E = 1; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_X = 2; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_T = 3; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_DX6 = 4; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_DX4 = 5; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_DT6 = 6; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_DT4 = 7; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_DT46 = 8; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_B6_ENCAPS = 9; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_B6_ENCAPS_RED = 10; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_B6_INSERT = 11; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_B6_INSERT_RED = 12; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_UN = 13; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_UA = 14; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_CUSTOM_RANGE_START = 15; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_CUSTOM_RANGE_END = 16; +} + +enum MySidEntryEndpointBehaviorFlavor { + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_FLAVOR_UNSPECIFIED = 0; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_FLAVOR_NONE = 1; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_FLAVOR_PSP = 2; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_FLAVOR_USP = 3; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_FLAVOR_USD = 4; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_FLAVOR_PSP_AND_USP = 5; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_FLAVOR_USD_AND_USP = 6; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_FLAVOR_PSP_AND_USD = 7; + MY_SID_ENTRY_ENDPOINT_BEHAVIOR_FLAVOR_PSP_AND_USP_AND_USD = 8; +} + +enum NatType { + NAT_TYPE_UNSPECIFIED = 0; + NAT_TYPE_NONE = 1; + NAT_TYPE_SOURCE_NAT = 2; + NAT_TYPE_DESTINATION_NAT = 3; + NAT_TYPE_DOUBLE_NAT = 4; + NAT_TYPE_DESTINATION_NAT_POOL = 5; +} + +enum NativeHashField { + NATIVE_HASH_FIELD_UNSPECIFIED = 0; + NATIVE_HASH_FIELD_SRC_IP = 1; + NATIVE_HASH_FIELD_DST_IP = 2; + NATIVE_HASH_FIELD_INNER_SRC_IP = 3; + NATIVE_HASH_FIELD_INNER_DST_IP = 4; + NATIVE_HASH_FIELD_SRC_IPV4 = 5; + NATIVE_HASH_FIELD_DST_IPV4 = 6; + NATIVE_HASH_FIELD_SRC_IPV6 = 7; + NATIVE_HASH_FIELD_DST_IPV6 = 8; + NATIVE_HASH_FIELD_INNER_SRC_IPV4 = 9; + NATIVE_HASH_FIELD_INNER_DST_IPV4 = 10; + NATIVE_HASH_FIELD_INNER_SRC_IPV6 = 11; + NATIVE_HASH_FIELD_INNER_DST_IPV6 = 12; + NATIVE_HASH_FIELD_VLAN_ID = 13; + NATIVE_HASH_FIELD_IP_PROTOCOL = 14; + NATIVE_HASH_FIELD_ETHERTYPE = 15; + NATIVE_HASH_FIELD_L4_SRC_PORT = 16; + NATIVE_HASH_FIELD_L4_DST_PORT = 17; + NATIVE_HASH_FIELD_SRC_MAC = 18; + NATIVE_HASH_FIELD_DST_MAC = 19; + NATIVE_HASH_FIELD_IN_PORT = 20; + NATIVE_HASH_FIELD_INNER_IP_PROTOCOL = 21; + NATIVE_HASH_FIELD_INNER_ETHERTYPE = 22; + NATIVE_HASH_FIELD_INNER_L4_SRC_PORT = 23; + NATIVE_HASH_FIELD_INNER_L4_DST_PORT = 24; + NATIVE_HASH_FIELD_INNER_SRC_MAC = 25; + NATIVE_HASH_FIELD_INNER_DST_MAC = 26; + NATIVE_HASH_FIELD_MPLS_LABEL_ALL = 27; + NATIVE_HASH_FIELD_MPLS_LABEL_0 = 28; + NATIVE_HASH_FIELD_MPLS_LABEL_1 = 29; + NATIVE_HASH_FIELD_MPLS_LABEL_2 = 30; + NATIVE_HASH_FIELD_MPLS_LABEL_3 = 31; + NATIVE_HASH_FIELD_MPLS_LABEL_4 = 32; + NATIVE_HASH_FIELD_IPV6_FLOW_LABEL = 33; + NATIVE_HASH_FIELD_NONE = 34; +} + +enum NextHopGroupMapType { + NEXT_HOP_GROUP_MAP_TYPE_UNSPECIFIED = 0; + NEXT_HOP_GROUP_MAP_TYPE_FORWARDING_CLASS_TO_INDEX = 1; +} + +enum NextHopGroupMemberConfiguredRole { + NEXT_HOP_GROUP_MEMBER_CONFIGURED_ROLE_UNSPECIFIED = 0; + NEXT_HOP_GROUP_MEMBER_CONFIGURED_ROLE_PRIMARY = 1; + NEXT_HOP_GROUP_MEMBER_CONFIGURED_ROLE_STANDBY = 2; +} + +enum NextHopGroupMemberObservedRole { + NEXT_HOP_GROUP_MEMBER_OBSERVED_ROLE_UNSPECIFIED = 0; + NEXT_HOP_GROUP_MEMBER_OBSERVED_ROLE_ACTIVE = 1; + NEXT_HOP_GROUP_MEMBER_OBSERVED_ROLE_INACTIVE = 2; +} + +enum NextHopGroupType { + NEXT_HOP_GROUP_TYPE_UNSPECIFIED = 0; + NEXT_HOP_GROUP_TYPE_DYNAMIC_UNORDERED_ECMP = 1; + NEXT_HOP_GROUP_TYPE_ECMP = 2; + NEXT_HOP_GROUP_TYPE_DYNAMIC_ORDERED_ECMP = 3; + NEXT_HOP_GROUP_TYPE_FINE_GRAIN_ECMP = 4; + NEXT_HOP_GROUP_TYPE_PROTECTION = 5; + NEXT_HOP_GROUP_TYPE_CLASS_BASED = 6; +} + +enum NextHopType { + NEXT_HOP_TYPE_UNSPECIFIED = 0; + NEXT_HOP_TYPE_IP = 1; + NEXT_HOP_TYPE_MPLS = 2; + NEXT_HOP_TYPE_TUNNEL_ENCAP = 3; + NEXT_HOP_TYPE_SRV6_SIDLIST = 4; +} + +enum ObjectType { + OBJECT_TYPE_UNSPECIFIED = 0; + OBJECT_TYPE_NULL = 1; + OBJECT_TYPE_PORT = 2; + OBJECT_TYPE_LAG = 3; + OBJECT_TYPE_VIRTUAL_ROUTER = 4; + OBJECT_TYPE_NEXT_HOP = 5; + OBJECT_TYPE_NEXT_HOP_GROUP = 6; + OBJECT_TYPE_ROUTER_INTERFACE = 7; + OBJECT_TYPE_ACL_TABLE = 8; + OBJECT_TYPE_ACL_ENTRY = 9; + OBJECT_TYPE_ACL_COUNTER = 10; + OBJECT_TYPE_ACL_RANGE = 11; + OBJECT_TYPE_ACL_TABLE_GROUP = 12; + OBJECT_TYPE_ACL_TABLE_GROUP_MEMBER = 13; + OBJECT_TYPE_HOSTIF = 14; + OBJECT_TYPE_MIRROR_SESSION = 15; + OBJECT_TYPE_SAMPLEPACKET = 16; + OBJECT_TYPE_STP = 17; + OBJECT_TYPE_HOSTIF_TRAP_GROUP = 18; + OBJECT_TYPE_POLICER = 19; + OBJECT_TYPE_WRED = 20; + OBJECT_TYPE_QOS_MAP = 21; + OBJECT_TYPE_QUEUE = 22; + OBJECT_TYPE_SCHEDULER = 23; + OBJECT_TYPE_SCHEDULER_GROUP = 24; + OBJECT_TYPE_BUFFER_POOL = 25; + OBJECT_TYPE_BUFFER_PROFILE = 26; + OBJECT_TYPE_INGRESS_PRIORITY_GROUP = 27; + OBJECT_TYPE_LAG_MEMBER = 28; + OBJECT_TYPE_HASH = 29; + OBJECT_TYPE_UDF = 30; + OBJECT_TYPE_UDF_MATCH = 31; + OBJECT_TYPE_UDF_GROUP = 32; + OBJECT_TYPE_FDB_ENTRY = 33; + OBJECT_TYPE_SWITCH = 34; + OBJECT_TYPE_HOSTIF_TRAP = 35; + OBJECT_TYPE_HOSTIF_TABLE_ENTRY = 36; + OBJECT_TYPE_NEIGHBOR_ENTRY = 37; + OBJECT_TYPE_ROUTE_ENTRY = 38; + OBJECT_TYPE_VLAN = 39; + OBJECT_TYPE_VLAN_MEMBER = 40; + OBJECT_TYPE_HOSTIF_PACKET = 41; + OBJECT_TYPE_TUNNEL_MAP = 42; + OBJECT_TYPE_TUNNEL = 43; + OBJECT_TYPE_TUNNEL_TERM_TABLE_ENTRY = 44; + OBJECT_TYPE_FDB_FLUSH = 45; + OBJECT_TYPE_NEXT_HOP_GROUP_MEMBER = 46; + OBJECT_TYPE_STP_PORT = 47; + OBJECT_TYPE_RPF_GROUP = 48; + OBJECT_TYPE_RPF_GROUP_MEMBER = 49; + OBJECT_TYPE_L2MC_GROUP = 50; + OBJECT_TYPE_L2MC_GROUP_MEMBER = 51; + OBJECT_TYPE_IPMC_GROUP = 52; + OBJECT_TYPE_IPMC_GROUP_MEMBER = 53; + OBJECT_TYPE_L2MC_ENTRY = 54; + OBJECT_TYPE_IPMC_ENTRY = 55; + OBJECT_TYPE_MCAST_FDB_ENTRY = 56; + OBJECT_TYPE_HOSTIF_USER_DEFINED_TRAP = 57; + OBJECT_TYPE_BRIDGE = 58; + OBJECT_TYPE_BRIDGE_PORT = 59; + OBJECT_TYPE_TUNNEL_MAP_ENTRY = 60; + OBJECT_TYPE_TAM = 61; + OBJECT_TYPE_SRV6_SIDLIST = 62; + OBJECT_TYPE_PORT_POOL = 63; + OBJECT_TYPE_INSEG_ENTRY = 64; + OBJECT_TYPE_DTEL = 65; + OBJECT_TYPE_DTEL_QUEUE_REPORT = 66; + OBJECT_TYPE_DTEL_INT_SESSION = 67; + OBJECT_TYPE_DTEL_REPORT_SESSION = 68; + OBJECT_TYPE_DTEL_EVENT = 69; + OBJECT_TYPE_BFD_SESSION = 70; + OBJECT_TYPE_ISOLATION_GROUP = 71; + OBJECT_TYPE_ISOLATION_GROUP_MEMBER = 72; + OBJECT_TYPE_TAM_MATH_FUNC = 73; + OBJECT_TYPE_TAM_REPORT = 74; + OBJECT_TYPE_TAM_EVENT_THRESHOLD = 75; + OBJECT_TYPE_TAM_TEL_TYPE = 76; + OBJECT_TYPE_TAM_TRANSPORT = 77; + OBJECT_TYPE_TAM_TELEMETRY = 78; + OBJECT_TYPE_TAM_COLLECTOR = 79; + OBJECT_TYPE_TAM_EVENT_ACTION = 80; + OBJECT_TYPE_TAM_EVENT = 81; + OBJECT_TYPE_NAT_ZONE_COUNTER = 82; + OBJECT_TYPE_NAT_ENTRY = 83; + OBJECT_TYPE_TAM_INT = 84; + OBJECT_TYPE_COUNTER = 85; + OBJECT_TYPE_DEBUG_COUNTER = 86; + OBJECT_TYPE_PORT_CONNECTOR = 87; + OBJECT_TYPE_PORT_SERDES = 88; + OBJECT_TYPE_MACSEC = 89; + OBJECT_TYPE_MACSEC_PORT = 90; + OBJECT_TYPE_MACSEC_FLOW = 91; + OBJECT_TYPE_MACSEC_SC = 92; + OBJECT_TYPE_MACSEC_SA = 93; + OBJECT_TYPE_SYSTEM_PORT = 94; + OBJECT_TYPE_FINE_GRAINED_HASH_FIELD = 95; + OBJECT_TYPE_SWITCH_TUNNEL = 96; + OBJECT_TYPE_MY_SID_ENTRY = 97; + OBJECT_TYPE_MY_MAC = 98; + OBJECT_TYPE_NEXT_HOP_GROUP_MAP = 99; + OBJECT_TYPE_IPSEC = 100; + OBJECT_TYPE_IPSEC_PORT = 101; + OBJECT_TYPE_IPSEC_SA = 102; + OBJECT_TYPE_MAX = 103; +} + +enum OutDropReason { + OUT_DROP_REASON_UNSPECIFIED = 0; + OUT_DROP_REASON_START = 1; + OUT_DROP_REASON_L2_ANY = 2; + OUT_DROP_REASON_EGRESS_VLAN_FILTER = 3; + OUT_DROP_REASON_L3_ANY = 4; + OUT_DROP_REASON_L3_EGRESS_LINK_DOWN = 5; + OUT_DROP_REASON_TUNNEL_LOOPBACK_PACKET_DROP = 6; + OUT_DROP_REASON_END = 7; + OUT_DROP_REASON_CUSTOM_RANGE_BASE = 8; + OUT_DROP_REASON_CUSTOM_RANGE_END = 9; +} + +enum OutsegExpMode { + OUTSEG_EXP_MODE_UNSPECIFIED = 0; + OUTSEG_EXP_MODE_UNIFORM = 1; + OUTSEG_EXP_MODE_PIPE = 2; +} + +enum OutsegTtlMode { + OUTSEG_TTL_MODE_UNSPECIFIED = 0; + OUTSEG_TTL_MODE_UNIFORM = 1; + OUTSEG_TTL_MODE_PIPE = 2; +} + +enum OutsegType { + OUTSEG_TYPE_UNSPECIFIED = 0; + OUTSEG_TYPE_PUSH = 1; + OUTSEG_TYPE_SWAP = 2; +} + +enum PacketAction { + PACKET_ACTION_UNSPECIFIED = 0; + PACKET_ACTION_DROP = 1; + PACKET_ACTION_FORWARD = 2; + PACKET_ACTION_COPY = 3; + PACKET_ACTION_COPY_CANCEL = 4; + PACKET_ACTION_TRAP = 5; + PACKET_ACTION_LOG = 6; + PACKET_ACTION_DENY = 7; + PACKET_ACTION_TRANSIT = 8; +} + +enum PacketColor { + PACKET_COLOR_UNSPECIFIED = 0; + PACKET_COLOR_GREEN = 1; + PACKET_COLOR_YELLOW = 2; + PACKET_COLOR_RED = 3; +} + +enum PacketVlan { + PACKET_VLAN_UNSPECIFIED = 0; + PACKET_VLAN_UNTAG = 1; + PACKET_VLAN_SINGLE_OUTER_TAG = 2; + PACKET_VLAN_DOUBLE_TAG = 3; +} + +enum PolicerColorSource { + POLICER_COLOR_SOURCE_UNSPECIFIED = 0; + POLICER_COLOR_SOURCE_BLIND = 1; + POLICER_COLOR_SOURCE_AWARE = 2; + POLICER_COLOR_SOURCE_CUSTOM_RANGE_BASE = 3; +} + +enum PolicerMode { + POLICER_MODE_UNSPECIFIED = 0; + POLICER_MODE_SR_TCM = 1; + POLICER_MODE_TR_TCM = 2; + POLICER_MODE_STORM_CONTROL = 3; + POLICER_MODE_CUSTOM_RANGE_BASE = 4; +} + +enum PolicerStat { + POLICER_STAT_UNSPECIFIED = 0; + POLICER_STAT_PACKETS = 1; + POLICER_STAT_ATTR_BYTES = 2; + POLICER_STAT_GREEN_PACKETS = 3; + POLICER_STAT_GREEN_BYTES = 4; + POLICER_STAT_YELLOW_PACKETS = 5; + POLICER_STAT_YELLOW_BYTES = 6; + POLICER_STAT_RED_PACKETS = 7; + POLICER_STAT_RED_BYTES = 8; + POLICER_STAT_CUSTOM_RANGE_BASE = 9; +} + +enum PortAutoNegConfigMode { + PORT_AUTO_NEG_CONFIG_MODE_UNSPECIFIED = 0; + PORT_AUTO_NEG_CONFIG_MODE_DISABLED = 1; + PORT_AUTO_NEG_CONFIG_MODE_AUTO = 2; + PORT_AUTO_NEG_CONFIG_MODE_SLAVE = 3; + PORT_AUTO_NEG_CONFIG_MODE_MASTER = 4; +} + +enum PortBreakoutModeType { + PORT_BREAKOUT_MODE_TYPE_UNSPECIFIED = 0; + PORT_BREAKOUT_MODE_TYPE_1_LANE = 1; + PORT_BREAKOUT_MODE_TYPE_2_LANE = 2; + PORT_BREAKOUT_MODE_TYPE_4_LANE = 3; + PORT_BREAKOUT_MODE_TYPE_MAX = 4; +} + +enum PortConnectorFailoverMode { + PORT_CONNECTOR_FAILOVER_MODE_UNSPECIFIED = 0; + PORT_CONNECTOR_FAILOVER_MODE_DISABLE = 1; + PORT_CONNECTOR_FAILOVER_MODE_PRIMARY = 2; + PORT_CONNECTOR_FAILOVER_MODE_SECONDARY = 3; +} + +enum PortDualMedia { + PORT_DUAL_MEDIA_UNSPECIFIED = 0; + PORT_DUAL_MEDIA_NONE = 1; + PORT_DUAL_MEDIA_COPPER_ONLY = 2; + PORT_DUAL_MEDIA_FIBER_ONLY = 3; + PORT_DUAL_MEDIA_COPPER_PREFERRED = 4; + PORT_DUAL_MEDIA_FIBER_PREFERRED = 5; +} + +enum PortErrStatus { + PORT_ERR_STATUS_UNSPECIFIED = 0; + PORT_ERR_STATUS_DATA_UNIT_CRC_ERROR = 1; + PORT_ERR_STATUS_DATA_UNIT_SIZE = 2; + PORT_ERR_STATUS_DATA_UNIT_MISALIGNMENT_ERROR = 3; + PORT_ERR_STATUS_CODE_GROUP_ERROR = 4; + PORT_ERR_STATUS_SIGNAL_LOCAL_ERROR = 5; + PORT_ERR_STATUS_NO_RX_REACHABILITY = 6; + PORT_ERR_STATUS_CRC_RATE = 7; + PORT_ERR_STATUS_REMOTE_FAULT_STATUS = 8; + PORT_ERR_STATUS_MAX = 9; +} + +enum PortFecMode { + PORT_FEC_MODE_UNSPECIFIED = 0; + PORT_FEC_MODE_NONE = 1; + PORT_FEC_MODE_RS = 2; + PORT_FEC_MODE_FC = 3; +} + +enum PortFecModeExtended { + PORT_FEC_MODE_EXTENDED_UNSPECIFIED = 0; + PORT_FEC_MODE_EXTENDED_NONE = 1; + PORT_FEC_MODE_EXTENDED_RS528 = 2; + PORT_FEC_MODE_EXTENDED_RS544 = 3; + PORT_FEC_MODE_EXTENDED_RS544_INTERLEAVED = 4; + PORT_FEC_MODE_EXTENDED_FC = 5; +} + +enum PortFlowControlMode { + PORT_FLOW_CONTROL_MODE_UNSPECIFIED = 0; + PORT_FLOW_CONTROL_MODE_DISABLE = 1; + PORT_FLOW_CONTROL_MODE_TX_ONLY = 2; + PORT_FLOW_CONTROL_MODE_RX_ONLY = 3; + PORT_FLOW_CONTROL_MODE_BOTH_ENABLE = 4; +} + +enum PortInterfaceType { + PORT_INTERFACE_TYPE_UNSPECIFIED = 0; + PORT_INTERFACE_TYPE_NONE = 1; + PORT_INTERFACE_TYPE_CR = 2; + PORT_INTERFACE_TYPE_CR2 = 3; + PORT_INTERFACE_TYPE_CR4 = 4; + PORT_INTERFACE_TYPE_SR = 5; + PORT_INTERFACE_TYPE_SR2 = 6; + PORT_INTERFACE_TYPE_SR4 = 7; + PORT_INTERFACE_TYPE_LR = 8; + PORT_INTERFACE_TYPE_LR4 = 9; + PORT_INTERFACE_TYPE_KR = 10; + PORT_INTERFACE_TYPE_KR4 = 11; + PORT_INTERFACE_TYPE_CAUI = 12; + PORT_INTERFACE_TYPE_GMII = 13; + PORT_INTERFACE_TYPE_SFI = 14; + PORT_INTERFACE_TYPE_XLAUI = 15; + PORT_INTERFACE_TYPE_KR2 = 16; + PORT_INTERFACE_TYPE_CAUI4 = 17; + PORT_INTERFACE_TYPE_XAUI = 18; + PORT_INTERFACE_TYPE_XFI = 19; + PORT_INTERFACE_TYPE_XGMII = 20; + PORT_INTERFACE_TYPE_MAX = 21; +} + +enum PortInternalLoopbackMode { + PORT_INTERNAL_LOOPBACK_MODE_UNSPECIFIED = 0; + PORT_INTERNAL_LOOPBACK_MODE_NONE = 1; + PORT_INTERNAL_LOOPBACK_MODE_PHY = 2; + PORT_INTERNAL_LOOPBACK_MODE_MAC = 3; +} + +enum PortLinkTrainingFailureStatus { + PORT_LINK_TRAINING_FAILURE_STATUS_UNSPECIFIED = 0; + PORT_LINK_TRAINING_FAILURE_STATUS_NO_ERROR = 1; + PORT_LINK_TRAINING_FAILURE_STATUS_FRAME_LOCK_ERROR = 2; + PORT_LINK_TRAINING_FAILURE_STATUS_SNR_LOWER_THRESHOLD = 3; + PORT_LINK_TRAINING_FAILURE_STATUS_TIME_OUT = 4; +} + +enum PortLinkTrainingRxStatus { + PORT_LINK_TRAINING_RX_STATUS_UNSPECIFIED = 0; + PORT_LINK_TRAINING_RX_STATUS_NOT_TRAINED = 1; + PORT_LINK_TRAINING_RX_STATUS_TRAINED = 2; +} + +enum PortLoopbackMode { + PORT_LOOPBACK_MODE_UNSPECIFIED = 0; + PORT_LOOPBACK_MODE_NONE = 1; + PORT_LOOPBACK_MODE_PHY = 2; + PORT_LOOPBACK_MODE_MAC = 3; + PORT_LOOPBACK_MODE_PHY_REMOTE = 4; +} + +enum PortMdixModeConfig { + PORT_MDIX_MODE_CONFIG_UNSPECIFIED = 0; + PORT_MDIX_MODE_CONFIG_AUTO = 1; + PORT_MDIX_MODE_CONFIG_STRAIGHT = 2; + PORT_MDIX_MODE_CONFIG_CROSSOVER = 3; +} + +enum PortMdixModeStatus { + PORT_MDIX_MODE_STATUS_UNSPECIFIED = 0; + PORT_MDIX_MODE_STATUS_STRAIGHT = 1; + PORT_MDIX_MODE_STATUS_CROSSOVER = 2; +} + +enum PortMediaType { + PORT_MEDIA_TYPE_UNSPECIFIED = 0; + PORT_MEDIA_TYPE_NOT_PRESENT = 1; + PORT_MEDIA_TYPE_UNKNOWN = 2; + PORT_MEDIA_TYPE_FIBER = 3; + PORT_MEDIA_TYPE_COPPER = 4; + PORT_MEDIA_TYPE_BACKPLANE = 5; +} + +enum PortModuleType { + PORT_MODULE_TYPE_UNSPECIFIED = 0; + PORT_MODULE_TYPE_1000BASE_X = 1; + PORT_MODULE_TYPE_100FX = 2; + PORT_MODULE_TYPE_SGMII_SLAVE = 3; +} + +enum PortOperStatus { + PORT_OPER_STATUS_UNSPECIFIED = 0; + PORT_OPER_STATUS_UNKNOWN = 1; + PORT_OPER_STATUS_UP = 2; + PORT_OPER_STATUS_DOWN = 3; + PORT_OPER_STATUS_TESTING = 4; + PORT_OPER_STATUS_NOT_PRESENT = 5; +} + +enum PortPoolStat { + PORT_POOL_STAT_UNSPECIFIED = 0; + PORT_POOL_STAT_IF_OCTETS = 1; + PORT_POOL_STAT_GREEN_WRED_DROPPED_PACKETS = 2; + PORT_POOL_STAT_GREEN_WRED_DROPPED_BYTES = 3; + PORT_POOL_STAT_YELLOW_WRED_DROPPED_PACKETS = 4; + PORT_POOL_STAT_YELLOW_WRED_DROPPED_BYTES = 5; + PORT_POOL_STAT_RED_WRED_DROPPED_PACKETS = 6; + PORT_POOL_STAT_RED_WRED_DROPPED_BYTES = 7; + PORT_POOL_STAT_WRED_DROPPED_PACKETS = 8; + PORT_POOL_STAT_WRED_DROPPED_BYTES = 9; + PORT_POOL_STAT_GREEN_WRED_ECN_MARKED_PACKETS = 10; + PORT_POOL_STAT_GREEN_WRED_ECN_MARKED_BYTES = 11; + PORT_POOL_STAT_YELLOW_WRED_ECN_MARKED_PACKETS = 12; + PORT_POOL_STAT_YELLOW_WRED_ECN_MARKED_BYTES = 13; + PORT_POOL_STAT_RED_WRED_ECN_MARKED_PACKETS = 14; + PORT_POOL_STAT_RED_WRED_ECN_MARKED_BYTES = 15; + PORT_POOL_STAT_WRED_ECN_MARKED_PACKETS = 16; + PORT_POOL_STAT_WRED_ECN_MARKED_BYTES = 17; + PORT_POOL_STAT_CURR_OCCUPANCY_BYTES = 18; + PORT_POOL_STAT_WATERMARK_BYTES = 19; + PORT_POOL_STAT_SHARED_CURR_OCCUPANCY_BYTES = 20; + PORT_POOL_STAT_SHARED_WATERMARK_BYTES = 21; + PORT_POOL_STAT_DROPPED_PKTS = 22; +} + +enum PortPrbsConfig { + PORT_PRBS_CONFIG_UNSPECIFIED = 0; + PORT_PRBS_CONFIG_DISABLE = 1; + PORT_PRBS_CONFIG_ENABLE_TX_RX = 2; + PORT_PRBS_CONFIG_ENABLE_RX = 3; + PORT_PRBS_CONFIG_ENABLE_TX = 4; +} + +enum PortPrbsRxStatus { + PORT_PRBS_RX_STATUS_UNSPECIFIED = 0; + PORT_PRBS_RX_STATUS_OK = 1; + PORT_PRBS_RX_STATUS_LOCK_WITH_ERRORS = 2; + PORT_PRBS_RX_STATUS_NOT_LOCKED = 3; + PORT_PRBS_RX_STATUS_LOST_LOCK = 4; +} + +enum PortPriorityFlowControlMode { + PORT_PRIORITY_FLOW_CONTROL_MODE_UNSPECIFIED = 0; + PORT_PRIORITY_FLOW_CONTROL_MODE_COMBINED = 1; + PORT_PRIORITY_FLOW_CONTROL_MODE_SEPARATE = 2; +} + +enum PortPtpMode { + PORT_PTP_MODE_UNSPECIFIED = 0; + PORT_PTP_MODE_NONE = 1; + PORT_PTP_MODE_SINGLE_STEP_TIMESTAMP = 2; + PORT_PTP_MODE_TWO_STEP_TIMESTAMP = 3; +} + +enum PortStat { + PORT_STAT_UNSPECIFIED = 0; + PORT_STAT_IF_IN_OCTETS = 1; + PORT_STAT_IF_IN_UCAST_PKTS = 2; + PORT_STAT_IF_IN_NON_UCAST_PKTS = 3; + PORT_STAT_IF_IN_DISCARDS = 4; + PORT_STAT_IF_IN_ERRORS = 5; + PORT_STAT_IF_IN_UNKNOWN_PROTOS = 6; + PORT_STAT_IF_IN_BROADCAST_PKTS = 7; + PORT_STAT_IF_IN_MULTICAST_PKTS = 8; + PORT_STAT_IF_IN_VLAN_DISCARDS = 9; + PORT_STAT_IF_OUT_OCTETS = 10; + PORT_STAT_IF_OUT_UCAST_PKTS = 11; + PORT_STAT_IF_OUT_NON_UCAST_PKTS = 12; + PORT_STAT_IF_OUT_DISCARDS = 13; + PORT_STAT_IF_OUT_ERRORS = 14; + PORT_STAT_IF_OUT_QLEN = 15; + PORT_STAT_IF_OUT_BROADCAST_PKTS = 16; + PORT_STAT_IF_OUT_MULTICAST_PKTS = 17; + PORT_STAT_ETHER_STATS_DROP_EVENTS = 18; + PORT_STAT_ETHER_STATS_MULTICAST_PKTS = 19; + PORT_STAT_ETHER_STATS_BROADCAST_PKTS = 20; + PORT_STAT_ETHER_STATS_UNDERSIZE_PKTS = 21; + PORT_STAT_ETHER_STATS_FRAGMENTS = 22; + PORT_STAT_ETHER_STATS_PKTS_64_OCTETS = 23; + PORT_STAT_ETHER_STATS_PKTS_65_TO_127_OCTETS = 24; + PORT_STAT_ETHER_STATS_PKTS_128_TO_255_OCTETS = 25; + PORT_STAT_ETHER_STATS_PKTS_256_TO_511_OCTETS = 26; + PORT_STAT_ETHER_STATS_PKTS_512_TO_1023_OCTETS = 27; + PORT_STAT_ETHER_STATS_PKTS_1024_TO_1518_OCTETS = 28; + PORT_STAT_ETHER_STATS_PKTS_1519_TO_2047_OCTETS = 29; + PORT_STAT_ETHER_STATS_PKTS_2048_TO_4095_OCTETS = 30; + PORT_STAT_ETHER_STATS_PKTS_4096_TO_9216_OCTETS = 31; + PORT_STAT_ETHER_STATS_PKTS_9217_TO_16383_OCTETS = 32; + PORT_STAT_ETHER_STATS_OVERSIZE_PKTS = 33; + PORT_STAT_ETHER_RX_OVERSIZE_PKTS = 34; + PORT_STAT_ETHER_TX_OVERSIZE_PKTS = 35; + PORT_STAT_ETHER_STATS_JABBERS = 36; + PORT_STAT_ETHER_STATS_OCTETS = 37; + PORT_STAT_ETHER_STATS_PKTS = 38; + PORT_STAT_ETHER_STATS_COLLISIONS = 39; + PORT_STAT_ETHER_STATS_CRC_ALIGN_ERRORS = 40; + PORT_STAT_ETHER_STATS_TX_NO_ERRORS = 41; + PORT_STAT_ETHER_STATS_RX_NO_ERRORS = 42; + PORT_STAT_IP_IN_RECEIVES = 43; + PORT_STAT_IP_IN_OCTETS = 44; + PORT_STAT_IP_IN_UCAST_PKTS = 45; + PORT_STAT_IP_IN_NON_UCAST_PKTS = 46; + PORT_STAT_IP_IN_DISCARDS = 47; + PORT_STAT_IP_OUT_OCTETS = 48; + PORT_STAT_IP_OUT_UCAST_PKTS = 49; + PORT_STAT_IP_OUT_NON_UCAST_PKTS = 50; + PORT_STAT_IP_OUT_DISCARDS = 51; + PORT_STAT_IPV6_IN_RECEIVES = 52; + PORT_STAT_IPV6_IN_OCTETS = 53; + PORT_STAT_IPV6_IN_UCAST_PKTS = 54; + PORT_STAT_IPV6_IN_NON_UCAST_PKTS = 55; + PORT_STAT_IPV6_IN_MCAST_PKTS = 56; + PORT_STAT_IPV6_IN_DISCARDS = 57; + PORT_STAT_IPV6_OUT_OCTETS = 58; + PORT_STAT_IPV6_OUT_UCAST_PKTS = 59; + PORT_STAT_IPV6_OUT_NON_UCAST_PKTS = 60; + PORT_STAT_IPV6_OUT_MCAST_PKTS = 61; + PORT_STAT_IPV6_OUT_DISCARDS = 62; + PORT_STAT_GREEN_WRED_DROPPED_PACKETS = 63; + PORT_STAT_GREEN_WRED_DROPPED_BYTES = 64; + PORT_STAT_YELLOW_WRED_DROPPED_PACKETS = 65; + PORT_STAT_YELLOW_WRED_DROPPED_BYTES = 66; + PORT_STAT_RED_WRED_DROPPED_PACKETS = 67; + PORT_STAT_RED_WRED_DROPPED_BYTES = 68; + PORT_STAT_WRED_DROPPED_PACKETS = 69; + PORT_STAT_WRED_DROPPED_BYTES = 70; + PORT_STAT_ECN_MARKED_PACKETS = 71; + PORT_STAT_ETHER_IN_PKTS_64_OCTETS = 72; + PORT_STAT_ETHER_IN_PKTS_65_TO_127_OCTETS = 73; + PORT_STAT_ETHER_IN_PKTS_128_TO_255_OCTETS = 74; + PORT_STAT_ETHER_IN_PKTS_256_TO_511_OCTETS = 75; + PORT_STAT_ETHER_IN_PKTS_512_TO_1023_OCTETS = 76; + PORT_STAT_ETHER_IN_PKTS_1024_TO_1518_OCTETS = 77; + PORT_STAT_ETHER_IN_PKTS_1519_TO_2047_OCTETS = 78; + PORT_STAT_ETHER_IN_PKTS_2048_TO_4095_OCTETS = 79; + PORT_STAT_ETHER_IN_PKTS_4096_TO_9216_OCTETS = 80; + PORT_STAT_ETHER_IN_PKTS_9217_TO_16383_OCTETS = 81; + PORT_STAT_ETHER_OUT_PKTS_64_OCTETS = 82; + PORT_STAT_ETHER_OUT_PKTS_65_TO_127_OCTETS = 83; + PORT_STAT_ETHER_OUT_PKTS_128_TO_255_OCTETS = 84; + PORT_STAT_ETHER_OUT_PKTS_256_TO_511_OCTETS = 85; + PORT_STAT_ETHER_OUT_PKTS_512_TO_1023_OCTETS = 86; + PORT_STAT_ETHER_OUT_PKTS_1024_TO_1518_OCTETS = 87; + PORT_STAT_ETHER_OUT_PKTS_1519_TO_2047_OCTETS = 88; + PORT_STAT_ETHER_OUT_PKTS_2048_TO_4095_OCTETS = 89; + PORT_STAT_ETHER_OUT_PKTS_4096_TO_9216_OCTETS = 90; + PORT_STAT_ETHER_OUT_PKTS_9217_TO_16383_OCTETS = 91; + PORT_STAT_IN_CURR_OCCUPANCY_BYTES = 92; + PORT_STAT_IN_WATERMARK_BYTES = 93; + PORT_STAT_IN_SHARED_CURR_OCCUPANCY_BYTES = 94; + PORT_STAT_IN_SHARED_WATERMARK_BYTES = 95; + PORT_STAT_OUT_CURR_OCCUPANCY_BYTES = 96; + PORT_STAT_OUT_WATERMARK_BYTES = 97; + PORT_STAT_OUT_SHARED_CURR_OCCUPANCY_BYTES = 98; + PORT_STAT_OUT_SHARED_WATERMARK_BYTES = 99; + PORT_STAT_IN_DROPPED_PKTS = 100; + PORT_STAT_OUT_DROPPED_PKTS = 101; + PORT_STAT_PAUSE_RX_PKTS = 102; + PORT_STAT_PAUSE_TX_PKTS = 103; + PORT_STAT_PFC_0_RX_PKTS = 104; + PORT_STAT_PFC_0_TX_PKTS = 105; + PORT_STAT_PFC_1_RX_PKTS = 106; + PORT_STAT_PFC_1_TX_PKTS = 107; + PORT_STAT_PFC_2_RX_PKTS = 108; + PORT_STAT_PFC_2_TX_PKTS = 109; + PORT_STAT_PFC_3_RX_PKTS = 110; + PORT_STAT_PFC_3_TX_PKTS = 111; + PORT_STAT_PFC_4_RX_PKTS = 112; + PORT_STAT_PFC_4_TX_PKTS = 113; + PORT_STAT_PFC_5_RX_PKTS = 114; + PORT_STAT_PFC_5_TX_PKTS = 115; + PORT_STAT_PFC_6_RX_PKTS = 116; + PORT_STAT_PFC_6_TX_PKTS = 117; + PORT_STAT_PFC_7_RX_PKTS = 118; + PORT_STAT_PFC_7_TX_PKTS = 119; + PORT_STAT_PFC_0_RX_PAUSE_DURATION = 120; + PORT_STAT_PFC_0_TX_PAUSE_DURATION = 121; + PORT_STAT_PFC_1_RX_PAUSE_DURATION = 122; + PORT_STAT_PFC_1_TX_PAUSE_DURATION = 123; + PORT_STAT_PFC_2_RX_PAUSE_DURATION = 124; + PORT_STAT_PFC_2_TX_PAUSE_DURATION = 125; + PORT_STAT_PFC_3_RX_PAUSE_DURATION = 126; + PORT_STAT_PFC_3_TX_PAUSE_DURATION = 127; + PORT_STAT_PFC_4_RX_PAUSE_DURATION = 128; + PORT_STAT_PFC_4_TX_PAUSE_DURATION = 129; + PORT_STAT_PFC_5_RX_PAUSE_DURATION = 130; + PORT_STAT_PFC_5_TX_PAUSE_DURATION = 131; + PORT_STAT_PFC_6_RX_PAUSE_DURATION = 132; + PORT_STAT_PFC_6_TX_PAUSE_DURATION = 133; + PORT_STAT_PFC_7_RX_PAUSE_DURATION = 134; + PORT_STAT_PFC_7_TX_PAUSE_DURATION = 135; + PORT_STAT_PFC_0_RX_PAUSE_DURATION_US = 136; + PORT_STAT_PFC_0_TX_PAUSE_DURATION_US = 137; + PORT_STAT_PFC_1_RX_PAUSE_DURATION_US = 138; + PORT_STAT_PFC_1_TX_PAUSE_DURATION_US = 139; + PORT_STAT_PFC_2_RX_PAUSE_DURATION_US = 140; + PORT_STAT_PFC_2_TX_PAUSE_DURATION_US = 141; + PORT_STAT_PFC_3_RX_PAUSE_DURATION_US = 142; + PORT_STAT_PFC_3_TX_PAUSE_DURATION_US = 143; + PORT_STAT_PFC_4_RX_PAUSE_DURATION_US = 144; + PORT_STAT_PFC_4_TX_PAUSE_DURATION_US = 145; + PORT_STAT_PFC_5_RX_PAUSE_DURATION_US = 146; + PORT_STAT_PFC_5_TX_PAUSE_DURATION_US = 147; + PORT_STAT_PFC_6_RX_PAUSE_DURATION_US = 148; + PORT_STAT_PFC_6_TX_PAUSE_DURATION_US = 149; + PORT_STAT_PFC_7_RX_PAUSE_DURATION_US = 150; + PORT_STAT_PFC_7_TX_PAUSE_DURATION_US = 151; + PORT_STAT_PFC_0_ON2OFF_RX_PKTS = 152; + PORT_STAT_PFC_1_ON2OFF_RX_PKTS = 153; + PORT_STAT_PFC_2_ON2OFF_RX_PKTS = 154; + PORT_STAT_PFC_3_ON2OFF_RX_PKTS = 155; + PORT_STAT_PFC_4_ON2OFF_RX_PKTS = 156; + PORT_STAT_PFC_5_ON2OFF_RX_PKTS = 157; + PORT_STAT_PFC_6_ON2OFF_RX_PKTS = 158; + PORT_STAT_PFC_7_ON2OFF_RX_PKTS = 159; + PORT_STAT_DOT3_STATS_ALIGNMENT_ERRORS = 160; + PORT_STAT_DOT3_STATS_FCS_ERRORS = 161; + PORT_STAT_DOT3_STATS_SINGLE_COLLISION_FRAMES = 162; + PORT_STAT_DOT3_STATS_MULTIPLE_COLLISION_FRAMES = 163; + PORT_STAT_DOT3_STATS_SQE_TEST_ERRORS = 164; + PORT_STAT_DOT3_STATS_DEFERRED_TRANSMISSIONS = 165; + PORT_STAT_DOT3_STATS_LATE_COLLISIONS = 166; + PORT_STAT_DOT3_STATS_EXCESSIVE_COLLISIONS = 167; + PORT_STAT_DOT3_STATS_INTERNAL_MAC_TRANSMIT_ERRORS = 168; + PORT_STAT_DOT3_STATS_CARRIER_SENSE_ERRORS = 169; + PORT_STAT_DOT3_STATS_FRAME_TOO_LONGS = 170; + PORT_STAT_DOT3_STATS_INTERNAL_MAC_RECEIVE_ERRORS = 171; + PORT_STAT_DOT3_STATS_SYMBOL_ERRORS = 172; + PORT_STAT_DOT3_CONTROL_IN_UNKNOWN_OPCODES = 173; + PORT_STAT_EEE_TX_EVENT_COUNT = 174; + PORT_STAT_EEE_RX_EVENT_COUNT = 175; + PORT_STAT_EEE_TX_DURATION = 176; + PORT_STAT_EEE_RX_DURATION = 177; + PORT_STAT_PRBS_ERROR_COUNT = 178; + PORT_STAT_IF_IN_FEC_CORRECTABLE_FRAMES = 179; + PORT_STAT_IF_IN_FEC_NOT_CORRECTABLE_FRAMES = 180; + PORT_STAT_IF_IN_FEC_SYMBOL_ERRORS = 181; + PORT_STAT_IF_IN_FABRIC_DATA_UNITS = 182; + PORT_STAT_IF_OUT_FABRIC_DATA_UNITS = 183; + PORT_STAT_IN_DROP_REASON_RANGE_BASE = 184; + PORT_STAT_IN_CONFIGURED_DROP_REASONS_0_DROPPED_PKTS = 185; + PORT_STAT_IN_CONFIGURED_DROP_REASONS_1_DROPPED_PKTS = 186; + PORT_STAT_IN_CONFIGURED_DROP_REASONS_2_DROPPED_PKTS = 187; + PORT_STAT_IN_CONFIGURED_DROP_REASONS_3_DROPPED_PKTS = 188; + PORT_STAT_IN_CONFIGURED_DROP_REASONS_4_DROPPED_PKTS = 189; + PORT_STAT_IN_CONFIGURED_DROP_REASONS_5_DROPPED_PKTS = 190; + PORT_STAT_IN_CONFIGURED_DROP_REASONS_6_DROPPED_PKTS = 191; + PORT_STAT_IN_CONFIGURED_DROP_REASONS_7_DROPPED_PKTS = 192; + PORT_STAT_IN_DROP_REASON_RANGE_END = 193; + PORT_STAT_OUT_DROP_REASON_RANGE_BASE = 194; + PORT_STAT_OUT_CONFIGURED_DROP_REASONS_0_DROPPED_PKTS = 195; + PORT_STAT_OUT_CONFIGURED_DROP_REASONS_1_DROPPED_PKTS = 196; + PORT_STAT_OUT_CONFIGURED_DROP_REASONS_2_DROPPED_PKTS = 197; + PORT_STAT_OUT_CONFIGURED_DROP_REASONS_3_DROPPED_PKTS = 198; + PORT_STAT_OUT_CONFIGURED_DROP_REASONS_4_DROPPED_PKTS = 199; + PORT_STAT_OUT_CONFIGURED_DROP_REASONS_5_DROPPED_PKTS = 200; + PORT_STAT_OUT_CONFIGURED_DROP_REASONS_6_DROPPED_PKTS = 201; + PORT_STAT_OUT_CONFIGURED_DROP_REASONS_7_DROPPED_PKTS = 202; + PORT_STAT_OUT_DROP_REASON_RANGE_END = 203; +} + +enum PortType { + PORT_TYPE_UNSPECIFIED = 0; + PORT_TYPE_LOGICAL = 1; + PORT_TYPE_CPU = 2; + PORT_TYPE_FABRIC = 3; + PORT_TYPE_RECYCLE = 4; +} + +enum QosMapType { + QOS_MAP_TYPE_UNSPECIFIED = 0; + QOS_MAP_TYPE_DOT1P_TO_TC = 1; + QOS_MAP_TYPE_DOT1P_TO_COLOR = 2; + QOS_MAP_TYPE_DSCP_TO_TC = 3; + QOS_MAP_TYPE_DSCP_TO_COLOR = 4; + QOS_MAP_TYPE_TC_TO_QUEUE = 5; + QOS_MAP_TYPE_TC_AND_COLOR_TO_DSCP = 6; + QOS_MAP_TYPE_TC_AND_COLOR_TO_DOT1P = 7; + QOS_MAP_TYPE_TC_TO_PRIORITY_GROUP = 8; + QOS_MAP_TYPE_PFC_PRIORITY_TO_PRIORITY_GROUP = 9; + QOS_MAP_TYPE_PFC_PRIORITY_TO_QUEUE = 10; + QOS_MAP_TYPE_MPLS_EXP_TO_TC = 11; + QOS_MAP_TYPE_MPLS_EXP_TO_COLOR = 12; + QOS_MAP_TYPE_TC_AND_COLOR_TO_MPLS_EXP = 13; + QOS_MAP_TYPE_DSCP_TO_FORWARDING_CLASS = 14; + QOS_MAP_TYPE_MPLS_EXP_TO_FORWARDING_CLASS = 15; + QOS_MAP_TYPE_CUSTOM_RANGE_BASE = 16; +} + +enum QueuePfcDeadlockEventType { + QUEUE_PFC_DEADLOCK_EVENT_TYPE_UNSPECIFIED = 0; + QUEUE_PFC_DEADLOCK_EVENT_TYPE_DETECTED = 1; + QUEUE_PFC_DEADLOCK_EVENT_TYPE_RECOVERED = 2; +} + +enum QueueStat { + QUEUE_STAT_UNSPECIFIED = 0; + QUEUE_STAT_PACKETS = 1; + QUEUE_STAT_BYTES = 2; + QUEUE_STAT_DROPPED_PACKETS = 3; + QUEUE_STAT_DROPPED_BYTES = 4; + QUEUE_STAT_GREEN_PACKETS = 5; + QUEUE_STAT_GREEN_BYTES = 6; + QUEUE_STAT_GREEN_DROPPED_PACKETS = 7; + QUEUE_STAT_GREEN_DROPPED_BYTES = 8; + QUEUE_STAT_YELLOW_PACKETS = 9; + QUEUE_STAT_YELLOW_BYTES = 10; + QUEUE_STAT_YELLOW_DROPPED_PACKETS = 11; + QUEUE_STAT_YELLOW_DROPPED_BYTES = 12; + QUEUE_STAT_RED_PACKETS = 13; + QUEUE_STAT_RED_BYTES = 14; + QUEUE_STAT_RED_DROPPED_PACKETS = 15; + QUEUE_STAT_RED_DROPPED_BYTES = 16; + QUEUE_STAT_GREEN_WRED_DROPPED_PACKETS = 17; + QUEUE_STAT_GREEN_WRED_DROPPED_BYTES = 18; + QUEUE_STAT_YELLOW_WRED_DROPPED_PACKETS = 19; + QUEUE_STAT_YELLOW_WRED_DROPPED_BYTES = 20; + QUEUE_STAT_RED_WRED_DROPPED_PACKETS = 21; + QUEUE_STAT_RED_WRED_DROPPED_BYTES = 22; + QUEUE_STAT_WRED_DROPPED_PACKETS = 23; + QUEUE_STAT_WRED_DROPPED_BYTES = 24; + QUEUE_STAT_CURR_OCCUPANCY_BYTES = 25; + QUEUE_STAT_WATERMARK_BYTES = 26; + QUEUE_STAT_SHARED_CURR_OCCUPANCY_BYTES = 27; + QUEUE_STAT_SHARED_WATERMARK_BYTES = 28; + QUEUE_STAT_GREEN_WRED_ECN_MARKED_PACKETS = 29; + QUEUE_STAT_GREEN_WRED_ECN_MARKED_BYTES = 30; + QUEUE_STAT_YELLOW_WRED_ECN_MARKED_PACKETS = 31; + QUEUE_STAT_YELLOW_WRED_ECN_MARKED_BYTES = 32; + QUEUE_STAT_RED_WRED_ECN_MARKED_PACKETS = 33; + QUEUE_STAT_RED_WRED_ECN_MARKED_BYTES = 34; + QUEUE_STAT_WRED_ECN_MARKED_PACKETS = 35; + QUEUE_STAT_WRED_ECN_MARKED_BYTES = 36; + QUEUE_STAT_CURR_OCCUPANCY_LEVEL = 37; + QUEUE_STAT_WATERMARK_LEVEL = 38; + QUEUE_STAT_CUSTOM_RANGE_BASE = 39; +} + +enum QueueType { + QUEUE_TYPE_UNSPECIFIED = 0; + QUEUE_TYPE_ALL = 1; + QUEUE_TYPE_UNICAST = 2; + QUEUE_TYPE_MULTICAST = 3; + QUEUE_TYPE_UNICAST_VOQ = 4; + QUEUE_TYPE_MULTICAST_VOQ = 5; + QUEUE_TYPE_FABRIC_TX = 6; + QUEUE_TYPE_CUSTOM_RANGE_BASE = 7; +} + +enum RouterInterfaceStat { + ROUTER_INTERFACE_STAT_UNSPECIFIED = 0; + ROUTER_INTERFACE_STAT_IN_OCTETS = 1; + ROUTER_INTERFACE_STAT_IN_PACKETS = 2; + ROUTER_INTERFACE_STAT_OUT_OCTETS = 3; + ROUTER_INTERFACE_STAT_OUT_PACKETS = 4; + ROUTER_INTERFACE_STAT_IN_ERROR_OCTETS = 5; + ROUTER_INTERFACE_STAT_IN_ERROR_PACKETS = 6; + ROUTER_INTERFACE_STAT_OUT_ERROR_OCTETS = 7; + ROUTER_INTERFACE_STAT_OUT_ERROR_PACKETS = 8; +} + +enum RouterInterfaceType { + ROUTER_INTERFACE_TYPE_UNSPECIFIED = 0; + ROUTER_INTERFACE_TYPE_PORT = 1; + ROUTER_INTERFACE_TYPE_VLAN = 2; + ROUTER_INTERFACE_TYPE_LOOPBACK = 3; + ROUTER_INTERFACE_TYPE_MPLS_ROUTER = 4; + ROUTER_INTERFACE_TYPE_SUB_PORT = 5; + ROUTER_INTERFACE_TYPE_BRIDGE = 6; + ROUTER_INTERFACE_TYPE_QINQ_PORT = 7; +} + +enum SamplepacketMode { + SAMPLEPACKET_MODE_UNSPECIFIED = 0; + SAMPLEPACKET_MODE_EXCLUSIVE = 1; + SAMPLEPACKET_MODE_SHARED = 2; +} + +enum SamplepacketType { + SAMPLEPACKET_TYPE_UNSPECIFIED = 0; + SAMPLEPACKET_TYPE_SLOW_PATH = 1; + SAMPLEPACKET_TYPE_MIRROR_SESSION = 2; +} + +enum SchedulingType { + SCHEDULING_TYPE_UNSPECIFIED = 0; + SCHEDULING_TYPE_STRICT = 1; + SCHEDULING_TYPE_WRR = 2; + SCHEDULING_TYPE_DWRR = 3; +} + +enum Srv6SidlistType { + SRV6_SIDLIST_TYPE_UNSPECIFIED = 0; + SRV6_SIDLIST_TYPE_INSERT = 1; + SRV6_SIDLIST_TYPE_INSERT_RED = 2; + SRV6_SIDLIST_TYPE_ENCAPS = 3; + SRV6_SIDLIST_TYPE_ENCAPS_RED = 4; + SRV6_SIDLIST_TYPE_CUSTOM_RANGE_BASE = 5; +} + +enum StatsMode { + STATS_MODE_UNSPECIFIED = 0; + STATS_MODE_READ = 1; + STATS_MODE_READ_AND_CLEAR = 2; +} + +enum StpPortState { + STP_PORT_STATE_UNSPECIFIED = 0; + STP_PORT_STATE_LEARNING = 1; + STP_PORT_STATE_FORWARDING = 2; + STP_PORT_STATE_BLOCKING = 3; +} + +enum SwitchFailoverConfigMode { + SWITCH_FAILOVER_CONFIG_MODE_UNSPECIFIED = 0; + SWITCH_FAILOVER_CONFIG_MODE_NO_HITLESS = 1; + SWITCH_FAILOVER_CONFIG_MODE_HITLESS = 2; +} + +enum SwitchFirmwareLoadMethod { + SWITCH_FIRMWARE_LOAD_METHOD_UNSPECIFIED = 0; + SWITCH_FIRMWARE_LOAD_METHOD_NONE = 1; + SWITCH_FIRMWARE_LOAD_METHOD_INTERNAL = 2; + SWITCH_FIRMWARE_LOAD_METHOD_EEPROM = 3; +} + +enum SwitchFirmwareLoadType { + SWITCH_FIRMWARE_LOAD_TYPE_UNSPECIFIED = 0; + SWITCH_FIRMWARE_LOAD_TYPE_SKIP = 1; + SWITCH_FIRMWARE_LOAD_TYPE_FORCE = 2; + SWITCH_FIRMWARE_LOAD_TYPE_AUTO = 3; +} + +enum SwitchHardwareAccessBus { + SWITCH_HARDWARE_ACCESS_BUS_UNSPECIFIED = 0; + SWITCH_HARDWARE_ACCESS_BUS_MDIO = 1; + SWITCH_HARDWARE_ACCESS_BUS_I2C = 2; + SWITCH_HARDWARE_ACCESS_BUS_CPLD = 3; +} + +enum SwitchMcastSnoopingCapability { + SWITCH_MCAST_SNOOPING_CAPABILITY_UNSPECIFIED = 0; + SWITCH_MCAST_SNOOPING_CAPABILITY_NONE = 1; + SWITCH_MCAST_SNOOPING_CAPABILITY_XG = 2; + SWITCH_MCAST_SNOOPING_CAPABILITY_SG = 3; + SWITCH_MCAST_SNOOPING_CAPABILITY_XG_AND_SG = 4; +} + +enum SwitchOperStatus { + SWITCH_OPER_STATUS_UNSPECIFIED = 0; + SWITCH_OPER_STATUS_UNKNOWN = 1; + SWITCH_OPER_STATUS_UP = 2; + SWITCH_OPER_STATUS_DOWN = 3; + SWITCH_OPER_STATUS_FAILED = 4; +} + +enum SwitchRestartType { + SWITCH_RESTART_TYPE_UNSPECIFIED = 0; + SWITCH_RESTART_TYPE_NONE = 1; + SWITCH_RESTART_TYPE_PLANNED = 2; + SWITCH_RESTART_TYPE_ANY = 3; +} + +enum SwitchStat { + SWITCH_STAT_UNSPECIFIED = 0; + SWITCH_STAT_IN_DROP_REASON_RANGE_BASE = 1; + SWITCH_STAT_IN_CONFIGURED_DROP_REASONS_0_DROPPED_PKTS = 2; + SWITCH_STAT_IN_CONFIGURED_DROP_REASONS_1_DROPPED_PKTS = 3; + SWITCH_STAT_IN_CONFIGURED_DROP_REASONS_2_DROPPED_PKTS = 4; + SWITCH_STAT_IN_CONFIGURED_DROP_REASONS_3_DROPPED_PKTS = 5; + SWITCH_STAT_IN_CONFIGURED_DROP_REASONS_4_DROPPED_PKTS = 6; + SWITCH_STAT_IN_CONFIGURED_DROP_REASONS_5_DROPPED_PKTS = 7; + SWITCH_STAT_IN_CONFIGURED_DROP_REASONS_6_DROPPED_PKTS = 8; + SWITCH_STAT_IN_CONFIGURED_DROP_REASONS_7_DROPPED_PKTS = 9; + SWITCH_STAT_IN_DROP_REASON_RANGE_END = 10; + SWITCH_STAT_OUT_DROP_REASON_RANGE_BASE = 11; + SWITCH_STAT_OUT_CONFIGURED_DROP_REASONS_0_DROPPED_PKTS = 12; + SWITCH_STAT_OUT_CONFIGURED_DROP_REASONS_1_DROPPED_PKTS = 13; + SWITCH_STAT_OUT_CONFIGURED_DROP_REASONS_2_DROPPED_PKTS = 14; + SWITCH_STAT_OUT_CONFIGURED_DROP_REASONS_3_DROPPED_PKTS = 15; + SWITCH_STAT_OUT_CONFIGURED_DROP_REASONS_4_DROPPED_PKTS = 16; + SWITCH_STAT_OUT_CONFIGURED_DROP_REASONS_5_DROPPED_PKTS = 17; + SWITCH_STAT_OUT_CONFIGURED_DROP_REASONS_6_DROPPED_PKTS = 18; + SWITCH_STAT_OUT_CONFIGURED_DROP_REASONS_7_DROPPED_PKTS = 19; + SWITCH_STAT_OUT_DROP_REASON_RANGE_END = 20; + SWITCH_STAT_FABRIC_DROP_REASON_RANGE_BASE = 21; + SWITCH_STAT_ECC_DROP = 22; + SWITCH_STAT_REACHABILITY_DROP = 23; + SWITCH_STAT_HIGHEST_QUEUE_CONGESTION_LEVEL = 24; + SWITCH_STAT_GLOBAL_DROP = 25; + SWITCH_STAT_FABRIC_DROP_REASON_RANGE_END = 26; +} + +enum SwitchSwitchingMode { + SWITCH_SWITCHING_MODE_UNSPECIFIED = 0; + SWITCH_SWITCHING_MODE_CUT_THROUGH = 1; + SWITCH_SWITCHING_MODE_STORE_AND_FORWARD = 2; +} + +enum SwitchType { + SWITCH_TYPE_UNSPECIFIED = 0; + SWITCH_TYPE_NPU = 1; + SWITCH_TYPE_PHY = 2; + SWITCH_TYPE_VOQ = 3; + SWITCH_TYPE_FABRIC = 4; +} + +enum SystemPortType { + SYSTEM_PORT_TYPE_UNSPECIFIED = 0; + SYSTEM_PORT_TYPE_LOCAL = 1; + SYSTEM_PORT_TYPE_REMOTE = 2; +} + +enum TamBindPointType { + TAM_BIND_POINT_TYPE_UNSPECIFIED = 0; + TAM_BIND_POINT_TYPE_QUEUE = 1; + TAM_BIND_POINT_TYPE_PORT = 2; + TAM_BIND_POINT_TYPE_LAG = 3; + TAM_BIND_POINT_TYPE_VLAN = 4; + TAM_BIND_POINT_TYPE_SWITCH = 5; + TAM_BIND_POINT_TYPE_IPG = 6; + TAM_BIND_POINT_TYPE_BSP = 7; +} + +enum TamEventThresholdUnit { + TAM_EVENT_THRESHOLD_UNIT_UNSPECIFIED = 0; + TAM_EVENT_THRESHOLD_UNIT_NANOSEC = 1; + TAM_EVENT_THRESHOLD_UNIT_USEC = 2; + TAM_EVENT_THRESHOLD_UNIT_MSEC = 3; + TAM_EVENT_THRESHOLD_UNIT_PERCENT = 4; + TAM_EVENT_THRESHOLD_UNIT_BYTES = 5; + TAM_EVENT_THRESHOLD_UNIT_PACKETS = 6; + TAM_EVENT_THRESHOLD_UNIT_CELLS = 7; +} + +enum TamEventType { + TAM_EVENT_TYPE_UNSPECIFIED = 0; + TAM_EVENT_TYPE_FLOW_STATE = 1; + TAM_EVENT_TYPE_FLOW_WATCHLIST = 2; + TAM_EVENT_TYPE_FLOW_TCPFLAG = 3; + TAM_EVENT_TYPE_QUEUE_THRESHOLD = 4; + TAM_EVENT_TYPE_QUEUE_TAIL_DROP = 5; + TAM_EVENT_TYPE_PACKET_DROP = 6; + TAM_EVENT_TYPE_RESOURCE_UTILIZATION = 7; + TAM_EVENT_TYPE_IPG_SHARED = 8; + TAM_EVENT_TYPE_IPG_XOFF_ROOM = 9; + TAM_EVENT_TYPE_BSP = 10; +} + +enum TamIntPresenceType { + TAM_INT_PRESENCE_TYPE_UNSPECIFIED = 0; + TAM_INT_PRESENCE_TYPE_UNDEFINED = 1; + TAM_INT_PRESENCE_TYPE_PB = 2; + TAM_INT_PRESENCE_TYPE_L3_PROTOCOL = 3; + TAM_INT_PRESENCE_TYPE_DSCP = 4; +} + +enum TamIntType { + TAM_INT_TYPE_UNSPECIFIED = 0; + TAM_INT_TYPE_IOAM = 1; + TAM_INT_TYPE_IFA1 = 2; + TAM_INT_TYPE_IFA2 = 3; + TAM_INT_TYPE_P4_INT_1 = 4; + TAM_INT_TYPE_P4_INT_2 = 5; + TAM_INT_TYPE_DIRECT_EXPORT = 6; + TAM_INT_TYPE_IFA1_TAILSTAMP = 7; +} + +enum TamReportMode { + TAM_REPORT_MODE_UNSPECIFIED = 0; + TAM_REPORT_MODE_ALL = 1; + TAM_REPORT_MODE_BULK = 2; +} + +enum TamReportType { + TAM_REPORT_TYPE_UNSPECIFIED = 0; + TAM_REPORT_TYPE_SFLOW = 1; + TAM_REPORT_TYPE_IPFIX = 2; + TAM_REPORT_TYPE_PROTO = 3; + TAM_REPORT_TYPE_THRIFT = 4; + TAM_REPORT_TYPE_JSON = 5; + TAM_REPORT_TYPE_P4_EXTN = 6; + TAM_REPORT_TYPE_HISTOGRAM = 7; + TAM_REPORT_TYPE_VENDOR_EXTN = 8; +} + +enum TamReportingUnit { + TAM_REPORTING_UNIT_UNSPECIFIED = 0; + TAM_REPORTING_UNIT_SEC = 1; + TAM_REPORTING_UNIT_MINUTE = 2; + TAM_REPORTING_UNIT_HOUR = 3; + TAM_REPORTING_UNIT_DAY = 4; +} + +enum TamTelMathFuncType { + TAM_TEL_MATH_FUNC_TYPE_UNSPECIFIED = 0; + TAM_TEL_MATH_FUNC_TYPE_NONE = 1; + TAM_TEL_MATH_FUNC_TYPE_GEO_MEAN = 2; + TAM_TEL_MATH_FUNC_TYPE_ALGEBRAIC_MEAN = 3; + TAM_TEL_MATH_FUNC_TYPE_AVERAGE = 4; + TAM_TEL_MATH_FUNC_TYPE_MODE = 5; + TAM_TEL_MATH_FUNC_TYPE_RATE = 6; +} + +enum TamTelemetryType { + TAM_TELEMETRY_TYPE_UNSPECIFIED = 0; + TAM_TELEMETRY_TYPE_NE = 1; + TAM_TELEMETRY_TYPE_SWITCH = 2; + TAM_TELEMETRY_TYPE_FABRIC = 3; + TAM_TELEMETRY_TYPE_FLOW = 4; + TAM_TELEMETRY_TYPE_INT = 5; +} + +enum TamTransportAuthType { + TAM_TRANSPORT_AUTH_TYPE_UNSPECIFIED = 0; + TAM_TRANSPORT_AUTH_TYPE_NONE = 1; + TAM_TRANSPORT_AUTH_TYPE_SSL = 2; + TAM_TRANSPORT_AUTH_TYPE_TLS = 3; +} + +enum TamTransportType { + TAM_TRANSPORT_TYPE_UNSPECIFIED = 0; + TAM_TRANSPORT_TYPE_NONE = 1; + TAM_TRANSPORT_TYPE_TCP = 2; + TAM_TRANSPORT_TYPE_UDP = 3; + TAM_TRANSPORT_TYPE_GRPC = 4; + TAM_TRANSPORT_TYPE_MIRROR = 5; +} + +enum TlvType { + TLV_TYPE_UNSPECIFIED = 0; + TLV_TYPE_INGRESS = 1; + TLV_TYPE_EGRESS = 2; + TLV_TYPE_OPAQUE = 3; + TLV_TYPE_HMAC = 4; +} + +enum TunnelDecapEcnMode { + TUNNEL_DECAP_ECN_MODE_UNSPECIFIED = 0; + TUNNEL_DECAP_ECN_MODE_STANDARD = 1; + TUNNEL_DECAP_ECN_MODE_COPY_FROM_OUTER = 2; + TUNNEL_DECAP_ECN_MODE_USER_DEFINED = 3; +} + +enum TunnelDscpMode { + TUNNEL_DSCP_MODE_UNSPECIFIED = 0; + TUNNEL_DSCP_MODE_UNIFORM_MODEL = 1; + TUNNEL_DSCP_MODE_PIPE_MODEL = 2; +} + +enum TunnelEncapEcnMode { + TUNNEL_ENCAP_ECN_MODE_UNSPECIFIED = 0; + TUNNEL_ENCAP_ECN_MODE_STANDARD = 1; + TUNNEL_ENCAP_ECN_MODE_USER_DEFINED = 2; +} + +enum TunnelMapType { + TUNNEL_MAP_TYPE_UNSPECIFIED = 0; + TUNNEL_MAP_TYPE_OECN_TO_UECN = 1; + TUNNEL_MAP_TYPE_UECN_OECN_TO_OECN = 2; + TUNNEL_MAP_TYPE_VNI_TO_VLAN_ID = 3; + TUNNEL_MAP_TYPE_VLAN_ID_TO_VNI = 4; + TUNNEL_MAP_TYPE_VNI_TO_BRIDGE_IF = 5; + TUNNEL_MAP_TYPE_BRIDGE_IF_TO_VNI = 6; + TUNNEL_MAP_TYPE_VNI_TO_VIRTUAL_ROUTER_ID = 7; + TUNNEL_MAP_TYPE_VIRTUAL_ROUTER_ID_TO_VNI = 8; + TUNNEL_MAP_TYPE_VSID_TO_VLAN_ID = 9; + TUNNEL_MAP_TYPE_VLAN_ID_TO_VSID = 10; + TUNNEL_MAP_TYPE_VSID_TO_BRIDGE_IF = 11; + TUNNEL_MAP_TYPE_BRIDGE_IF_TO_VSID = 12; + TUNNEL_MAP_TYPE_CUSTOM_RANGE_BASE = 13; +} + +enum TunnelPeerMode { + TUNNEL_PEER_MODE_UNSPECIFIED = 0; + TUNNEL_PEER_MODE_P2P = 1; + TUNNEL_PEER_MODE_P2MP = 2; +} + +enum TunnelStat { + TUNNEL_STAT_UNSPECIFIED = 0; + TUNNEL_STAT_IN_OCTETS = 1; + TUNNEL_STAT_IN_PACKETS = 2; + TUNNEL_STAT_OUT_OCTETS = 3; + TUNNEL_STAT_OUT_PACKETS = 4; +} + +enum TunnelTermTableEntryType { + TUNNEL_TERM_TABLE_ENTRY_TYPE_UNSPECIFIED = 0; + TUNNEL_TERM_TABLE_ENTRY_TYPE_P2P = 1; + TUNNEL_TERM_TABLE_ENTRY_TYPE_P2MP = 2; + TUNNEL_TERM_TABLE_ENTRY_TYPE_MP2P = 3; + TUNNEL_TERM_TABLE_ENTRY_TYPE_MP2MP = 4; +} + +enum TunnelTtlMode { + TUNNEL_TTL_MODE_UNSPECIFIED = 0; + TUNNEL_TTL_MODE_UNIFORM_MODEL = 1; + TUNNEL_TTL_MODE_PIPE_MODEL = 2; +} + +enum TunnelType { + TUNNEL_TYPE_UNSPECIFIED = 0; + TUNNEL_TYPE_IPINIP = 1; + TUNNEL_TYPE_IPINIP_GRE = 2; + TUNNEL_TYPE_VXLAN = 3; + TUNNEL_TYPE_MPLS = 4; + TUNNEL_TYPE_SRV6 = 5; + TUNNEL_TYPE_NVGRE = 6; + TUNNEL_TYPE_IPINIP_ESP = 7; + TUNNEL_TYPE_IPINIP_UDP_ESP = 8; + TUNNEL_TYPE_VXLAN_UDP_ESP = 9; +} + +enum TunnelVxlanUdpSportMode { + TUNNEL_VXLAN_UDP_SPORT_MODE_UNSPECIFIED = 0; + TUNNEL_VXLAN_UDP_SPORT_MODE_USER_DEFINED = 1; + TUNNEL_VXLAN_UDP_SPORT_MODE_EPHEMERAL = 2; +} + +enum UdfBase { + UDF_BASE_UNSPECIFIED = 0; + UDF_BASE_L2 = 1; + UDF_BASE_L3 = 2; + UDF_BASE_L4 = 3; +} + +enum UdfGroupType { + UDF_GROUP_TYPE_UNSPECIFIED = 0; + UDF_GROUP_TYPE_START = 1; + UDF_GROUP_TYPE_GENERIC = 2; + UDF_GROUP_TYPE_HASH = 3; + UDF_GROUP_TYPE_END = 4; +} + +enum VlanFloodControlType { + VLAN_FLOOD_CONTROL_TYPE_UNSPECIFIED = 0; + VLAN_FLOOD_CONTROL_TYPE_ALL = 1; + VLAN_FLOOD_CONTROL_TYPE_NONE = 2; + VLAN_FLOOD_CONTROL_TYPE_L2MC_GROUP = 3; + VLAN_FLOOD_CONTROL_TYPE_COMBINED = 4; +} + +enum VlanMcastLookupKeyType { + VLAN_MCAST_LOOKUP_KEY_TYPE_UNSPECIFIED = 0; + VLAN_MCAST_LOOKUP_KEY_TYPE_MAC_DA = 1; + VLAN_MCAST_LOOKUP_KEY_TYPE_XG = 2; + VLAN_MCAST_LOOKUP_KEY_TYPE_SG = 3; + VLAN_MCAST_LOOKUP_KEY_TYPE_XG_AND_SG = 4; +} + +enum VlanStat { + VLAN_STAT_UNSPECIFIED = 0; + VLAN_STAT_IN_OCTETS = 1; + VLAN_STAT_IN_PACKETS = 2; + VLAN_STAT_IN_UCAST_PKTS = 3; + VLAN_STAT_IN_NON_UCAST_PKTS = 4; + VLAN_STAT_IN_DISCARDS = 5; + VLAN_STAT_IN_ERRORS = 6; + VLAN_STAT_IN_UNKNOWN_PROTOS = 7; + VLAN_STAT_OUT_OCTETS = 8; + VLAN_STAT_OUT_PACKETS = 9; + VLAN_STAT_OUT_UCAST_PKTS = 10; + VLAN_STAT_OUT_NON_UCAST_PKTS = 11; + VLAN_STAT_OUT_DISCARDS = 12; + VLAN_STAT_OUT_ERRORS = 13; + VLAN_STAT_OUT_QLEN = 14; +} + +enum VlanTaggingMode { + VLAN_TAGGING_MODE_UNSPECIFIED = 0; + VLAN_TAGGING_MODE_UNTAGGED = 1; + VLAN_TAGGING_MODE_TAGGED = 2; + VLAN_TAGGING_MODE_PRIORITY_TAGGED = 3; +} + +message IpmcEntry { + uint64 switch_id = 1; + uint64 vr_id = 2; + IpmcEntryType type = 3; + bytes destination = 4; + bytes source = 5; +} + +message IpsecSaStatusNotificationData { + uint64 ipsec_sa_id = 1; + IpsecSaOctetCountStatus ipsec_sa_octet_count_status = 2; + bool ipsec_egress_sn_at_max_limit = 3; +} + +message QueueDeadlockNotificationData { + uint64 queue_id = 1; + QueuePfcDeadlockEventType event = 2; + bool app_managed_recovery = 3; +} + +message McastFdbEntry { + uint64 switch_id = 1; + bytes mac_address = 2; + uint64 bv_id = 3; +} + +message Uint32Range { + uint64 min = 1; + uint64 max = 2; +} + +message PRBS_RXState { + PortPrbsRxStatus rx_status = 1; + uint32 error_count = 2; +} + +message ACLCapability { + bool is_action_list_mandatory = 1; + repeated int32 action_list = 2; +} + +message RouteEntry { + uint64 switch_id = 1; + uint64 vr_id = 2; + IpPrefix destination = 3; +} + +message PortOperStatusNotification { + uint64 port_id = 1; + PortOperStatus port_state = 2; +} + +message AclFieldData { + bool enable = 1; + oneof mask { + uint64 mask_uint = 2; + uint64 mask_int = 3; + bytes mask_mac = 4; + bytes mask_ip = 5; + Uint64List mask_list = 6; + }; + oneof data { + bool data_bool = 7; + uint64 data_uint = 8; + int64 data_int = 9; + bytes data_mac = 10; + bytes data_ip = 11; + Uint64List data_list = 12; + }; +} + +message FdbEntry { + uint64 switch_id = 1; + bytes mac_address = 2; + uint64 bv_id = 3; +} + +message NatEntry { + uint64 switch_id = 1; + uint64 vr_id = 2; + NatType nat_type = 3; + NatEntryData data = 4; +} + +message NeighborEntry { + uint64 switch_id = 1; + uint64 rif_id = 2; + bytes ip_address = 3; +} + +message ACLResource { + AclStage stage = 1; + AclBindPointType bind_point = 2; + uint32 avail_num = 3; +} + +message PortEyeValues { + uint32 lane = 1; + int32 left = 2; + int32 right = 3; + int32 up = 4; + int32 down = 5; +} + +message MySidEntry { + uint64 switch_id = 1; + uint64 vr_id = 2; + uint32 locator_block_len = 3; + uint32 locator_node_len = 4; + uint32 function_len = 5; + uint32 args_len = 6; + bytes sid = 7; +} + +message UintMap { + map uintmap = 1; +} + +message SystemPortConfig { + uint32 port_id = 1; + uint32 attached_switch_id = 2; + uint32 attached_core_index = 3; + uint32 attached_core_port_index = 4; + uint32 speed = 5; + uint32 num_voq = 6; +} + +message BfdSessionStateChangeNotificationData { + uint64 bfd_session_id = 1; + BfdSessionState session_state = 2; +} + +message HMAC { + uint32 key_id = 1; + repeated uint32 hmac = 2; +} + +message TLVEntry { + oneof entry { + bytes ingress_node = 1; + bytes egress_node = 2; + bytes opaque_container = 3; + HMAC hmac = 4; + } +} + +message InsegEntry { + uint64 switch_id = 1; + uint32 label = 2; +} + +message FdbEventNotificationData { + FdbEvent event_type = 1; + FdbEntry fdb_entry = 2; + repeated FdbEntryAttribute attrs = 3; +} + +message IpPrefix { + bytes addr = 1; + bytes mask = 2; +} + +message FabricPortReachability { + uint32 switch_id = 1; + bool reachable = 2; +} + +message L2mcEntry { + uint64 switch_id = 1; + uint64 bv_id = 2; + L2mcEntryType type = 3; + bytes destination = 4; + bytes source = 5; +} + +message NatEntryData { + oneof key { + bytes key_src_ip = 2; + bytes key_dst_ip = 3; + uint32 key_proto = 4; + uint32 key_l4_src_port = 5; + uint32 key_l4_dst_port = 6; + }; + oneof mask { + bytes mask_src_ip = 7; + bytes mask_dst_ip = 8; + uint32 mask_proto = 9; + uint32 mask_l4_src_port = 10; + uint32 mask_l4_dst_port = 11; + }; +} + +message QOSMapParams { + uint32 tc = 1; + uint32 dscp = 2; + uint32 dot1p = 3; + uint32 prio = 4; + uint32 pg = 5; + uint32 queue_index = 6; + PacketColor color = 7; + uint32 mpls_exp = 8; + uint32 fc = 9; +} + +message QOSMap { + QOSMapParams key = 1; + QOSMapParams value = 2; +} + +message AclActionData { + bool enable = 1; + oneof parameter { + uint64 uint = 2; + uint64 int = 3; + bytes mac = 4; + bytes ip = 5; + uint64 oid = 6; + Uint64List objlist = 7; + bytes ipaddr = 8; + }; +} + +message AclCounterAttribute { + uint64 table_id = 2; + bool enable_packet_count = 3; + bool enable_byte_count = 4; + uint64 packets = 5; + uint64 bytes = 6; +} + +message AclEntryAttribute { + uint64 table_id = 2; + uint32 priority = 3; + bool admin_state = 4; + AclFieldData field_src_ipv6 = 5; + AclFieldData field_src_ipv6_word3 = 6; + AclFieldData field_src_ipv6_word2 = 7; + AclFieldData field_src_ipv6_word1 = 8; + AclFieldData field_src_ipv6_word0 = 9; + AclFieldData field_dst_ipv6 = 10; + AclFieldData field_dst_ipv6_word3 = 11; + AclFieldData field_dst_ipv6_word2 = 12; + AclFieldData field_dst_ipv6_word1 = 13; + AclFieldData field_dst_ipv6_word0 = 14; + AclFieldData field_inner_src_ipv6 = 15; + AclFieldData field_inner_dst_ipv6 = 16; + AclFieldData field_src_mac = 17; + AclFieldData field_dst_mac = 18; + AclFieldData field_src_ip = 19; + AclFieldData field_dst_ip = 20; + AclFieldData field_inner_src_ip = 21; + AclFieldData field_inner_dst_ip = 22; + AclFieldData field_in_ports = 23; + AclFieldData field_out_ports = 24; + AclFieldData field_in_port = 25; + AclFieldData field_out_port = 26; + AclFieldData field_src_port = 27; + AclFieldData field_outer_vlan_id = 28; + AclFieldData field_outer_vlan_pri = 29; + AclFieldData field_outer_vlan_cfi = 30; + AclFieldData field_inner_vlan_id = 31; + AclFieldData field_inner_vlan_pri = 32; + AclFieldData field_inner_vlan_cfi = 33; + AclFieldData field_l4_src_port = 34; + AclFieldData field_l4_dst_port = 35; + AclFieldData field_inner_l4_src_port = 36; + AclFieldData field_inner_l4_dst_port = 37; + AclFieldData field_ether_type = 38; + AclFieldData field_inner_ether_type = 39; + AclFieldData field_ip_protocol = 40; + AclFieldData field_inner_ip_protocol = 41; + AclFieldData field_ip_identification = 42; + AclFieldData field_dscp = 43; + AclFieldData field_ecn = 44; + AclFieldData field_ttl = 45; + AclFieldData field_tos = 46; + AclFieldData field_ip_flags = 47; + AclFieldData field_tcp_flags = 48; + AclFieldData field_acl_ip_type = 49; + AclFieldData field_acl_ip_frag = 50; + AclFieldData field_ipv6_flow_label = 51; + AclFieldData field_tc = 52; + AclFieldData field_icmp_type = 53; + AclFieldData field_icmp_code = 54; + AclFieldData field_icmpv6_type = 55; + AclFieldData field_icmpv6_code = 56; + AclFieldData field_packet_vlan = 57; + AclFieldData field_tunnel_vni = 58; + AclFieldData field_has_vlan_tag = 59; + AclFieldData field_macsec_sci = 60; + AclFieldData field_mpls_label0_label = 61; + AclFieldData field_mpls_label0_ttl = 62; + AclFieldData field_mpls_label0_exp = 63; + AclFieldData field_mpls_label0_bos = 64; + AclFieldData field_mpls_label1_label = 65; + AclFieldData field_mpls_label1_ttl = 66; + AclFieldData field_mpls_label1_exp = 67; + AclFieldData field_mpls_label1_bos = 68; + AclFieldData field_mpls_label2_label = 69; + AclFieldData field_mpls_label2_ttl = 70; + AclFieldData field_mpls_label2_exp = 71; + AclFieldData field_mpls_label2_bos = 72; + AclFieldData field_mpls_label3_label = 73; + AclFieldData field_mpls_label3_ttl = 74; + AclFieldData field_mpls_label3_exp = 75; + AclFieldData field_mpls_label3_bos = 76; + AclFieldData field_mpls_label4_label = 77; + AclFieldData field_mpls_label4_ttl = 78; + AclFieldData field_mpls_label4_exp = 79; + AclFieldData field_mpls_label4_bos = 80; + AclFieldData field_fdb_dst_user_meta = 81; + AclFieldData field_route_dst_user_meta = 82; + AclFieldData field_neighbor_dst_user_meta = 83; + AclFieldData field_port_user_meta = 84; + AclFieldData field_vlan_user_meta = 85; + AclFieldData field_acl_user_meta = 86; + AclFieldData field_fdb_npu_meta_dst_hit = 87; + AclFieldData field_neighbor_npu_meta_dst_hit = 88; + AclFieldData field_route_npu_meta_dst_hit = 89; + AclFieldData field_bth_opcode = 90; + AclFieldData field_aeth_syndrome = 91; + AclFieldData user_defined_field_group_min = 92; + AclFieldData user_defined_field_group_max = 93; + AclFieldData field_acl_range_type = 94; + AclFieldData field_ipv6_next_header = 95; + AclFieldData field_gre_key = 96; + AclFieldData field_tam_int_type = 97; + AclActionData action_redirect = 98; + AclActionData action_endpoint_ip = 99; + AclActionData action_redirect_list = 100; + AclActionData action_packet_action = 101; + AclActionData action_flood = 102; + AclActionData action_counter = 103; + AclActionData action_mirror_ingress = 104; + AclActionData action_mirror_egress = 105; + AclActionData action_set_policer = 106; + AclActionData action_decrement_ttl = 107; + AclActionData action_set_tc = 108; + AclActionData action_set_packet_color = 109; + AclActionData action_set_inner_vlan_id = 110; + AclActionData action_set_inner_vlan_pri = 111; + AclActionData action_set_outer_vlan_id = 112; + AclActionData action_set_outer_vlan_pri = 113; + AclActionData action_add_vlan_id = 114; + AclActionData action_add_vlan_pri = 115; + AclActionData action_set_src_mac = 116; + AclActionData action_set_dst_mac = 117; + AclActionData action_set_src_ip = 118; + AclActionData action_set_dst_ip = 119; + AclActionData action_set_src_ipv6 = 120; + AclActionData action_set_dst_ipv6 = 121; + AclActionData action_set_dscp = 122; + AclActionData action_set_ecn = 123; + AclActionData action_set_l4_src_port = 124; + AclActionData action_set_l4_dst_port = 125; + AclActionData action_ingress_samplepacket_enable = 126; + AclActionData action_egress_samplepacket_enable = 127; + AclActionData action_set_acl_meta_data = 128; + AclActionData action_egress_block_port_list = 129; + AclActionData action_set_user_trap_id = 130; + AclActionData action_set_do_not_learn = 131; + AclActionData action_acl_dtel_flow_op = 132; + AclActionData action_dtel_int_session = 133; + AclActionData action_dtel_drop_report_enable = 134; + AclActionData action_dtel_tail_drop_report_enable = 135; + AclActionData action_dtel_flow_sample_percent = 136; + AclActionData action_dtel_report_all_packets = 137; + AclActionData action_no_nat = 138; + AclActionData action_int_insert = 139; + AclActionData action_int_delete = 140; + AclActionData action_int_report_flow = 141; + AclActionData action_int_report_drops = 142; + AclActionData action_int_report_tail_drops = 143; + AclActionData action_tam_int_object = 144; + AclActionData action_set_isolation_group = 145; + AclActionData action_macsec_flow = 146; + AclActionData action_set_lag_hash_id = 147; + AclActionData action_set_ecmp_hash_id = 148; + AclActionData action_set_vrf = 149; + AclActionData action_set_forwarding_class = 150; +} + +message AclRangeAttribute { + AclRangeType type = 2; + Uint32Range limit = 3; +} + +message AclTableAttribute { + AclStage acl_stage = 2; + AclBindPointTypeList acl_bind_point_type_list = 3; + uint32 size = 4; + AclActionTypeList acl_action_type_list = 5; + bool field_src_ipv6 = 6; + bool field_src_ipv6_word3 = 7; + bool field_src_ipv6_word2 = 8; + bool field_src_ipv6_word1 = 9; + bool field_src_ipv6_word0 = 10; + bool field_dst_ipv6 = 11; + bool field_dst_ipv6_word3 = 12; + bool field_dst_ipv6_word2 = 13; + bool field_dst_ipv6_word1 = 14; + bool field_dst_ipv6_word0 = 15; + bool field_inner_src_ipv6 = 16; + bool field_inner_dst_ipv6 = 17; + bool field_src_mac = 18; + bool field_dst_mac = 19; + bool field_src_ip = 20; + bool field_dst_ip = 21; + bool field_inner_src_ip = 22; + bool field_inner_dst_ip = 23; + bool field_in_ports = 24; + bool field_out_ports = 25; + bool field_in_port = 26; + bool field_out_port = 27; + bool field_src_port = 28; + bool field_outer_vlan_id = 29; + bool field_outer_vlan_pri = 30; + bool field_outer_vlan_cfi = 31; + bool field_inner_vlan_id = 32; + bool field_inner_vlan_pri = 33; + bool field_inner_vlan_cfi = 34; + bool field_l4_src_port = 35; + bool field_l4_dst_port = 36; + bool field_inner_l4_src_port = 37; + bool field_inner_l4_dst_port = 38; + bool field_ether_type = 39; + bool field_inner_ether_type = 40; + bool field_ip_protocol = 41; + bool field_inner_ip_protocol = 42; + bool field_ip_identification = 43; + bool field_dscp = 44; + bool field_ecn = 45; + bool field_ttl = 46; + bool field_tos = 47; + bool field_ip_flags = 48; + bool field_tcp_flags = 49; + bool field_acl_ip_type = 50; + bool field_acl_ip_frag = 51; + bool field_ipv6_flow_label = 52; + bool field_tc = 53; + bool field_icmp_type = 54; + bool field_icmp_code = 55; + bool field_icmpv6_type = 56; + bool field_icmpv6_code = 57; + bool field_packet_vlan = 58; + bool field_tunnel_vni = 59; + bool field_has_vlan_tag = 60; + bool field_macsec_sci = 61; + bool field_mpls_label0_label = 62; + bool field_mpls_label0_ttl = 63; + bool field_mpls_label0_exp = 64; + bool field_mpls_label0_bos = 65; + bool field_mpls_label1_label = 66; + bool field_mpls_label1_ttl = 67; + bool field_mpls_label1_exp = 68; + bool field_mpls_label1_bos = 69; + bool field_mpls_label2_label = 70; + bool field_mpls_label2_ttl = 71; + bool field_mpls_label2_exp = 72; + bool field_mpls_label2_bos = 73; + bool field_mpls_label3_label = 74; + bool field_mpls_label3_ttl = 75; + bool field_mpls_label3_exp = 76; + bool field_mpls_label3_bos = 77; + bool field_mpls_label4_label = 78; + bool field_mpls_label4_ttl = 79; + bool field_mpls_label4_exp = 80; + bool field_mpls_label4_bos = 81; + bool field_fdb_dst_user_meta = 82; + bool field_route_dst_user_meta = 83; + bool field_neighbor_dst_user_meta = 84; + bool field_port_user_meta = 85; + bool field_vlan_user_meta = 86; + bool field_acl_user_meta = 87; + bool field_fdb_npu_meta_dst_hit = 88; + bool field_neighbor_npu_meta_dst_hit = 89; + bool field_route_npu_meta_dst_hit = 90; + bool field_bth_opcode = 91; + bool field_aeth_syndrome = 92; + uint64 user_defined_field_group_min = 93; + uint64 user_defined_field_group_max = 94; + AclRangeTypeList field_acl_range_type = 95; + bool field_ipv6_next_header = 96; + bool field_gre_key = 97; + bool field_tam_int_type = 98; + Uint64List entry_list = 99; + uint32 available_acl_entry = 100; + uint32 available_acl_counter = 101; +} + +message AclTableGroupAttribute { + AclStage acl_stage = 2; + AclBindPointTypeList acl_bind_point_type_list = 3; + AclTableGroupType type = 4; + Uint64List member_list = 5; +} + +message AclTableGroupMemberAttribute { + uint64 acl_table_group_id = 2; + uint64 acl_table_id = 3; + uint32 priority = 4; +} + +message AclActionTypeList { + repeated AclActionType list = 1; +} + +message AclBindPointTypeList { + repeated AclBindPointType list = 1; +} + +message AclRangeTypeList { + repeated AclRangeType list = 1; +} + +message AclResourceList { + repeated ACLResource list = 1; +} + +message BfdSessionAttribute { + BfdSessionType type = 2; + bool hw_lookup_valid = 3; + uint64 virtual_router = 4; + uint64 port = 5; + uint32 local_discriminator = 6; + uint32 remote_discriminator = 7; + uint32 udp_src_port = 8; + uint32 tc = 9; + uint32 vlan_tpid = 10; + uint32 vlan_id = 11; + uint32 vlan_pri = 12; + uint32 vlan_cfi = 13; + bool vlan_header_valid = 14; + BfdEncapsulationType bfd_encapsulation_type = 15; + uint32 iphdr_version = 16; + uint32 tos = 17; + uint32 ttl = 18; + bytes src_ip_address = 19; + bytes dst_ip_address = 20; + uint32 tunnel_tos = 21; + uint32 tunnel_ttl = 22; + bytes tunnel_src_ip_address = 23; + bytes tunnel_dst_ip_address = 24; + bytes src_mac_address = 25; + bytes dst_mac_address = 26; + bool echo_enable = 27; + bool multihop = 28; + bool cbit = 29; + uint32 min_tx = 30; + uint32 min_rx = 31; + uint32 multiplier = 32; + uint32 remote_min_tx = 33; + uint32 remote_min_rx = 34; + BfdSessionState state = 35; + BfdSessionOffloadType offload_type = 36; + uint32 negotiated_tx = 37; + uint32 negotiated_rx = 38; + uint32 local_diag = 39; + uint32 remote_diag = 40; + uint32 remote_multiplier = 41; +} + +message BridgeAttribute { + BridgeType type = 2; + Uint64List port_list = 3; + uint32 max_learned_addresses = 4; + bool learn_disable = 5; + BridgeFloodControlType unknown_unicast_flood_control_type = 6; + uint64 unknown_unicast_flood_group = 7; + BridgeFloodControlType unknown_multicast_flood_control_type = 8; + uint64 unknown_multicast_flood_group = 9; + BridgeFloodControlType broadcast_flood_control_type = 10; + uint64 broadcast_flood_group = 11; +} + +message BridgePortAttribute { + BridgePortType type = 2; + uint64 port_id = 3; + BridgePortTaggingMode tagging_mode = 4; + uint32 vlan_id = 5; + uint64 rif_id = 6; + uint64 tunnel_id = 7; + uint64 bridge_id = 8; + BridgePortFdbLearningMode fdb_learning_mode = 9; + uint32 max_learned_addresses = 10; + PacketAction fdb_learning_limit_violation_packet_action = 11; + bool admin_state = 12; + bool ingress_filtering = 13; + bool egress_filtering = 14; + uint64 isolation_group = 15; +} + +message BufferPoolAttribute { + uint64 shared_size = 2; + BufferPoolType type = 3; + uint64 size = 4; + BufferPoolThresholdMode threshold_mode = 5; + Uint64List tam = 6; + uint64 xoff_size = 7; + uint64 wred_profile_id = 8; +} + +message BufferProfileAttribute { + uint64 pool_id = 2; + uint64 reserved_buffer_size = 3; + BufferProfileThresholdMode threshold_mode = 4; + int32 shared_dynamic_th = 5; + uint64 shared_static_th = 6; + uint64 xoff_th = 7; + uint64 xon_th = 8; + uint64 xon_offset_th = 9; +} + +message BfdSessionOffloadTypeList { + repeated BfdSessionOffloadType list = 1; +} + +message BytesList { + repeated bytes list = 1; +} + +message CounterAttribute { + CounterType type = 2; +} + +message DebugCounterAttribute { + uint32 index = 2; + DebugCounterType type = 3; + DebugCounterBindMethod bind_method = 4; + InDropReasonList in_drop_reason_list = 5; + OutDropReasonList out_drop_reason_list = 6; +} + +message DtelAttribute { + bool int_endpoint_enable = 2; + bool int_transit_enable = 3; + bool postcard_enable = 4; + bool drop_report_enable = 5; + bool queue_report_enable = 6; + uint32 switch_id = 7; + uint32 flow_state_clear_cycle = 8; + uint32 latency_sensitivity = 9; + Uint64List sink_port_list = 10; + AclFieldData int_l4_dscp = 11; +} + +message DtelEventAttribute { + DtelEventType type = 2; + uint64 report_session = 3; + uint32 dscp_value = 4; +} + +message DtelIntSessionAttribute { + uint32 max_hop_count = 2; + bool collect_switch_id = 3; + bool collect_switch_ports = 4; + bool collect_ingress_timestamp = 5; + bool collect_egress_timestamp = 6; + bool collect_queue_info = 7; +} + +message DtelQueueReportAttribute { + uint64 queue_id = 2; + uint32 depth_threshold = 3; + uint32 latency_threshold = 4; + uint32 breach_quota = 5; + bool tail_drop = 6; +} + +message DtelReportSessionAttribute { + bytes src_ip = 2; + BytesList dst_ip_list = 3; + uint64 virtual_router_id = 4; + uint32 truncate_size = 5; + uint32 udp_dst_port = 6; +} + +message FdbEntryAttribute { + FdbEntryType type = 2; + PacketAction packet_action = 3; + uint64 user_trap_id = 4; + uint64 bridge_port_id = 5; + uint32 meta_data = 6; + bytes endpoint_ip = 7; + uint64 counter_id = 8; + bool allow_mac_move = 9; +} + +message FdbFlushAttribute { + uint64 bridge_port_id = 2; + uint64 bv_id = 3; + FdbFlushEntryType entry_type = 4; +} + +message FineGrainedHashFieldAttribute { + NativeHashField native_hash_field = 2; + bytes ipv4_mask = 3; + bytes ipv6_mask = 4; + uint32 sequence_id = 5; +} + +message HashAttribute { + NativeHashFieldList native_hash_field_list = 2; + Uint64List udf_group_list = 3; + Uint64List fine_grained_hash_field_list = 4; +} + +message HostifAttribute { + HostifType type = 2; + uint64 obj_id = 3; + bytes name = 4; + bool oper_status = 5; + uint32 queue = 6; + HostifVlanTag vlan_tag = 7; + bytes genetlink_mcgrp_name = 8; +} + +message HostifPacketAttribute { + uint64 hostif_trap_id = 2; + uint64 ingress_port = 3; + uint64 ingress_lag = 4; + HostifTxType hostif_tx_type = 5; + uint64 egress_port_or_lag = 6; + uint64 bridge_id = 7; + google.protobuf.Timestamp timestamp = 8; + uint32 egress_queue_index = 9; + bool zero_copy_tx = 10; +} + +message HostifTableEntryAttribute { + HostifTableEntryType type = 2; + uint64 obj_id = 3; + uint64 trap_id = 4; + HostifTableEntryChannelType channel_type = 5; + uint64 host_if = 6; +} + +message HostifTrapAttribute { + HostifTrapType trap_type = 2; + PacketAction packet_action = 3; + uint32 trap_priority = 4; + Uint64List exclude_port_list = 5; + uint64 trap_group = 6; + Uint64List mirror_session = 7; + uint64 counter_id = 8; +} + +message HostifTrapGroupAttribute { + bool admin_state = 2; + uint32 queue = 3; + uint64 policer = 4; +} + +message HostifUserDefinedTrapAttribute { + HostifUserDefinedTrapType type = 2; + uint32 trap_priority = 3; + uint64 trap_group = 4; +} + +message IngressPriorityGroupAttribute { + uint64 buffer_profile = 2; + uint64 port = 3; + Uint64List tam = 4; + uint32 index = 5; +} + +message InsegEntryAttribute { + uint32 num_of_pop = 2; + PacketAction packet_action = 3; + uint32 trap_priority = 4; + uint64 next_hop_id = 5; + InsegEntryPscType psc_type = 6; + uint32 qos_tc = 7; + uint64 mpls_exp_to_tc_map = 8; + uint64 mpls_exp_to_color_map = 9; + InsegEntryPopTtlMode pop_ttl_mode = 10; + InsegEntryPopQosMode pop_qos_mode = 11; + uint64 counter_id = 12; +} + +message IpmcEntryAttribute { + PacketAction packet_action = 2; + uint64 output_group_id = 3; + uint64 rpf_group_id = 4; +} + +message IpmcGroupAttribute { + uint32 ipmc_output_count = 2; + Uint64List ipmc_member_list = 3; +} + +message IpmcGroupMemberAttribute { + uint64 ipmc_group_id = 2; + uint64 ipmc_output_id = 3; +} + +message IpsecAttribute { + bool term_remote_ip_match_supported = 2; + bool switching_mode_cut_through_supported = 3; + bool switching_mode_store_and_forward_supported = 4; + bool stats_mode_read_supported = 5; + bool stats_mode_read_clear_supported = 6; + bool sn_32bit_supported = 7; + bool esn_64bit_supported = 8; + IpsecCipherList supported_cipher_list = 9; + uint32 system_side_mtu = 10; + bool warm_boot_supported = 11; + bool warm_boot_enable = 12; + bool external_sa_index_enable = 13; + uint32 ctag_tpid = 14; + uint32 stag_tpid = 15; + uint32 max_vlan_tags_parsed = 16; + uint64 octet_count_high_watermark = 17; + uint64 octet_count_low_watermark = 18; + StatsMode stats_mode = 19; + uint32 available_ipsec_sa = 20; + Uint64List sa_list = 21; +} + +message IpsecPortAttribute { + uint64 port_id = 2; + bool ctag_enable = 3; + bool stag_enable = 4; + uint32 native_vlan_id = 5; + bool vrf_from_packet_vlan_enable = 6; + SwitchSwitchingMode switch_switching_mode = 7; +} + +message IpsecSaAttribute { + IpsecDirection ipsec_direction = 2; + uint64 ipsec_id = 3; + IpsecSaOctetCountStatus octet_count_status = 4; + uint32 external_sa_index = 5; + uint32 sa_index = 6; + Uint64List ipsec_port_list = 7; + uint32 ipsec_spi = 8; + bool ipsec_esn_enable = 9; + IpsecCipher ipsec_cipher = 10; + bytes encrypt_key = 11; + uint32 salt = 12; + bytes auth_key = 13; + bool ipsec_replay_protection_enable = 14; + uint32 ipsec_replay_protection_window = 15; + bytes term_dst_ip = 16; + bool term_vlan_id_enable = 17; + uint32 term_vlan_id = 18; + bool term_src_ip_enable = 19; + bytes term_src_ip = 20; + uint64 egress_esn = 21; + uint64 minimum_ingress_esn = 22; +} + +message IsolationGroupAttribute { + IsolationGroupType type = 2; + Uint64List isolation_member_list = 3; +} + +message IsolationGroupMemberAttribute { + uint64 isolation_group_id = 2; + uint64 isolation_object = 3; +} + +message InDropReasonList { + repeated InDropReason list = 1; +} + +message Int32List { + repeated int32 list = 1; +} + +message IpsecCipherList { + repeated IpsecCipher list = 1; +} + +message L2mcEntryAttribute { + PacketAction packet_action = 2; + uint64 output_group_id = 3; +} + +message L2mcGroupAttribute { + uint32 l2mc_output_count = 2; + Uint64List l2mc_member_list = 3; +} + +message L2mcGroupMemberAttribute { + uint64 l2mc_group_id = 2; + uint64 l2mc_output_id = 3; + bytes l2mc_endpoint_ip = 4; +} + +message LagAttribute { + Uint64List port_list = 2; + uint64 ingress_acl = 3; + uint64 egress_acl = 4; + uint32 port_vlan_id = 5; + uint32 default_vlan_priority = 6; + bool drop_untagged = 7; + bool drop_tagged = 8; + uint32 tpid = 9; + uint32 system_port_aggregate_id = 10; + bytes label = 11; +} + +message LagMemberAttribute { + uint64 lag_id = 2; + uint64 port_id = 3; + bool egress_disable = 4; + bool ingress_disable = 5; +} + +message MacsecAttribute { + MacsecDirection direction = 2; + bool switching_mode_cut_through_supported = 3; + bool switching_mode_store_and_forward_supported = 4; + bool stats_mode_read_supported = 5; + bool stats_mode_read_clear_supported = 6; + bool sci_in_ingress_macsec_acl = 7; + MacsecCipherSuiteList supported_cipher_suite_list = 8; + bool pn_32bit_supported = 9; + bool xpn_64bit_supported = 10; + bool gcm_aes128_supported = 11; + bool gcm_aes256_supported = 12; + Uint32List sectag_offsets_supported = 13; + uint32 system_side_mtu = 14; + bool warm_boot_supported = 15; + bool warm_boot_enable = 16; + uint32 ctag_tpid = 17; + uint32 stag_tpid = 18; + uint32 max_vlan_tags_parsed = 19; + StatsMode stats_mode = 20; + bool physical_bypass_enable = 21; + Uint64List supported_port_list = 22; + uint32 available_macsec_flow = 23; + Uint64List flow_list = 24; + uint32 available_macsec_sc = 25; + uint32 available_macsec_sa = 26; +} + +message MacsecFlowAttribute { + MacsecDirection macsec_direction = 2; + Uint64List acl_entry_list = 3; + Uint64List sc_list = 4; +} + +message MacsecPortAttribute { + MacsecDirection macsec_direction = 2; + uint64 port_id = 3; + bool ctag_enable = 4; + bool stag_enable = 5; + SwitchSwitchingMode switch_switching_mode = 6; +} + +message MacsecSaAttribute { + MacsecDirection macsec_direction = 2; + uint64 sc_id = 3; + uint32 an = 4; + bytes sak = 5; + bytes salt = 6; + bytes auth_key = 7; + uint64 configured_egress_xpn = 8; + uint64 current_xpn = 9; + uint64 minimum_ingress_xpn = 10; + uint32 macsec_ssci = 11; +} + +message MacsecScAttribute { + MacsecDirection macsec_direction = 2; + uint64 flow_id = 3; + uint64 macsec_sci = 4; + bool macsec_explicit_sci_enable = 5; + uint32 macsec_sectag_offset = 6; + uint64 active_egress_sa_id = 7; + bool macsec_replay_protection_enable = 8; + uint32 macsec_replay_protection_window = 9; + Uint64List sa_list = 10; + MacsecCipherSuite macsec_cipher_suite = 11; + bool encryption_enable = 12; +} + +message McastFdbEntryAttribute { + uint64 group_id = 2; + PacketAction packet_action = 3; + uint32 meta_data = 4; +} + +message MirrorSessionAttribute { + MirrorSessionType type = 2; + uint64 monitor_port = 3; + uint32 truncate_size = 4; + uint32 sample_rate = 5; + MirrorSessionCongestionMode congestion_mode = 6; + uint32 tc = 7; + uint32 vlan_tpid = 8; + uint32 vlan_id = 9; + uint32 vlan_pri = 10; + uint32 vlan_cfi = 11; + bool vlan_header_valid = 12; + ErspanEncapsulationType erspan_encapsulation_type = 13; + uint32 iphdr_version = 14; + uint32 tos = 15; + uint32 ttl = 16; + bytes src_ip_address = 17; + bytes dst_ip_address = 18; + bytes src_mac_address = 19; + bytes dst_mac_address = 20; + uint32 gre_protocol_type = 21; + bool monitor_portlist_valid = 22; + Uint64List monitor_portlist = 23; + uint64 policer = 24; + uint32 udp_src_port = 25; + uint32 udp_dst_port = 26; +} + +message MyMacAttribute { + uint32 priority = 2; + uint64 port_id = 3; + uint32 vlan_id = 4; + bytes mac_address = 5; + bytes mac_address_mask = 6; +} + +message MySidEntryAttribute { + MySidEntryEndpointBehavior endpoint_behavior = 2; + MySidEntryEndpointBehaviorFlavor endpoint_behavior_flavor = 3; + PacketAction packet_action = 4; + uint32 trap_priority = 5; + uint64 next_hop_id = 6; + uint64 tunnel_id = 7; + uint64 vrf = 8; + uint64 counter_id = 9; +} + +message MacsecCipherSuiteList { + repeated MacsecCipherSuite list = 1; +} + +message NatEntryAttribute { + NatType nat_type = 2; + bytes src_ip = 3; + bytes src_ip_mask = 4; + uint64 vr_id = 5; + bytes dst_ip = 6; + bytes dst_ip_mask = 7; + uint32 l4_src_port = 8; + uint32 l4_dst_port = 9; + bool enable_packet_count = 10; + uint64 packet_count = 11; + bool enable_byte_count = 12; + uint64 byte_count = 13; + bool hit_bit_cor = 14; + bool hit_bit = 15; +} + +message NatZoneCounterAttribute { + NatType nat_type = 2; + uint32 zone_id = 3; + bool enable_discard = 4; + uint64 discard_packet_count = 5; + bool enable_translation_needed = 6; + uint64 translation_needed_packet_count = 7; + bool enable_translations = 8; + uint64 translations_packet_count = 9; +} + +message NeighborEntryAttribute { + bytes dst_mac_address = 2; + PacketAction packet_action = 3; + uint64 user_trap_id = 4; + bool no_host_route = 5; + uint32 meta_data = 6; + uint64 counter_id = 7; + uint32 encap_index = 8; + bool encap_impose_index = 9; + bool is_local = 10; + IpAddrFamily ip_addr_family = 11; +} + +message NextHopAttribute { + NextHopType type = 2; + bytes ip = 3; + uint64 router_interface_id = 4; + uint64 tunnel_id = 5; + uint32 tunnel_vni = 6; + bytes tunnel_mac = 7; + uint64 srv6_sidlist_id = 8; + Uint32List labelstack = 9; + uint64 counter_id = 10; + bool disable_decrement_ttl = 11; + OutsegType outseg_type = 12; + OutsegTtlMode outseg_ttl_mode = 13; + uint32 outseg_ttl_value = 14; + OutsegExpMode outseg_exp_mode = 15; + uint32 outseg_exp_value = 16; + uint64 qos_tc_and_color_to_mpls_exp_map = 17; +} + +message NextHopGroupAttribute { + uint32 next_hop_count = 2; + Uint64List next_hop_member_list = 3; + NextHopGroupType type = 4; + bool set_switchover = 5; + uint64 counter_id = 6; + uint32 configured_size = 7; + uint32 real_size = 8; + uint64 selection_map = 9; +} + +message NextHopGroupMapAttribute { + NextHopGroupMapType type = 2; + UintMapList map_to_value_list = 3; +} + +message NextHopGroupMemberAttribute { + uint64 next_hop_group_id = 2; + uint64 next_hop_id = 3; + uint32 weight = 4; + NextHopGroupMemberConfiguredRole configured_role = 5; + NextHopGroupMemberObservedRole observed_role = 6; + uint64 monitored_object = 7; + uint32 index = 8; + uint32 sequence_id = 9; + uint64 counter_id = 10; +} + +message NativeHashFieldList { + repeated NativeHashField list = 1; +} + +message ObjectTypeList { + repeated ObjectType list = 1; +} + +message OutDropReasonList { + repeated OutDropReason list = 1; +} + +message PolicerAttribute { + MeterType meter_type = 2; + PolicerMode mode = 3; + PolicerColorSource color_source = 4; + uint64 cbs = 5; + uint64 cir = 6; + uint64 pbs = 7; + uint64 pir = 8; + PacketAction green_packet_action = 9; + PacketAction yellow_packet_action = 10; + PacketAction red_packet_action = 11; + PacketActionList enable_counter_packet_action_list = 12; +} + +message PortAttribute { + PortType type = 2; + PortOperStatus oper_status = 3; + PortBreakoutModeTypeList supported_breakout_mode_type = 4; + PortBreakoutModeType current_breakout_mode_type = 5; + uint32 qos_number_of_queues = 6; + Uint64List qos_queue_list = 7; + uint32 qos_number_of_scheduler_groups = 8; + Uint64List qos_scheduler_group_list = 9; + uint32 qos_maximum_headroom_size = 10; + Uint32List supported_speed = 11; + PortFecModeList supported_fec_mode = 12; + PortFecModeExtendedList supported_fec_mode_extended = 13; + Uint32List supported_half_duplex_speed = 14; + bool supported_auto_neg_mode = 15; + PortFlowControlMode supported_flow_control_mode = 16; + bool supported_asymmetric_pause_mode = 17; + PortMediaType supported_media_type = 18; + Uint32List remote_advertised_speed = 19; + PortFecModeList remote_advertised_fec_mode = 20; + PortFecModeExtendedList remote_advertised_fec_mode_extended = 21; + Uint32List remote_advertised_half_duplex_speed = 22; + bool remote_advertised_auto_neg_mode = 23; + PortFlowControlMode remote_advertised_flow_control_mode = 24; + bool remote_advertised_asymmetric_pause_mode = 25; + PortMediaType remote_advertised_media_type = 26; + uint32 remote_advertised_oui_code = 27; + uint32 number_of_ingress_priority_groups = 28; + Uint64List ingress_priority_group_list = 29; + PortEyeValuesList eye_values = 30; + uint32 oper_speed = 31; + Uint32List hw_lane_list = 32; + uint32 speed = 33; + bool full_duplex_mode = 34; + bool auto_neg_mode = 35; + bool admin_state = 36; + PortMediaType media_type = 37; + Uint32List advertised_speed = 38; + PortFecModeList advertised_fec_mode = 39; + PortFecModeExtendedList advertised_fec_mode_extended = 40; + Uint32List advertised_half_duplex_speed = 41; + bool advertised_auto_neg_mode = 42; + PortFlowControlMode advertised_flow_control_mode = 43; + bool advertised_asymmetric_pause_mode = 44; + PortMediaType advertised_media_type = 45; + uint32 advertised_oui_code = 46; + uint32 port_vlan_id = 47; + uint32 default_vlan_priority = 48; + bool drop_untagged = 49; + bool drop_tagged = 50; + PortInternalLoopbackMode internal_loopback_mode = 51; + bool use_extended_fec = 52; + PortFecMode fec_mode = 53; + PortFecModeExtended fec_mode_extended = 54; + bool update_dscp = 55; + uint32 mtu = 56; + uint64 flood_storm_control_policer_id = 57; + uint64 broadcast_storm_control_policer_id = 58; + uint64 multicast_storm_control_policer_id = 59; + PortFlowControlMode global_flow_control_mode = 60; + uint64 ingress_acl = 61; + uint64 egress_acl = 62; + uint64 ingress_macsec_acl = 63; + uint64 egress_macsec_acl = 64; + Uint64List macsec_port_list = 65; + Uint64List ingress_mirror_session = 66; + Uint64List egress_mirror_session = 67; + uint64 ingress_samplepacket_enable = 68; + uint64 egress_samplepacket_enable = 69; + Uint64List ingress_sample_mirror_session = 70; + Uint64List egress_sample_mirror_session = 71; + uint64 policer_id = 72; + uint32 qos_default_tc = 73; + uint64 qos_dot1p_to_tc_map = 74; + uint64 qos_dot1p_to_color_map = 75; + uint64 qos_dscp_to_tc_map = 76; + uint64 qos_dscp_to_color_map = 77; + uint64 qos_tc_to_queue_map = 78; + uint64 qos_tc_and_color_to_dot1p_map = 79; + uint64 qos_tc_and_color_to_dscp_map = 80; + uint64 qos_tc_to_priority_group_map = 81; + uint64 qos_pfc_priority_to_priority_group_map = 82; + uint64 qos_pfc_priority_to_queue_map = 83; + uint64 qos_scheduler_profile_id = 84; + Uint64List qos_ingress_buffer_profile_list = 85; + Uint64List qos_egress_buffer_profile_list = 86; + PortPriorityFlowControlMode priority_flow_control_mode = 87; + uint32 priority_flow_control = 88; + uint32 priority_flow_control_rx = 89; + uint32 priority_flow_control_tx = 90; + uint32 meta_data = 91; + Uint64List egress_block_port_list = 92; + uint64 hw_profile_id = 93; + bool eee_enable = 94; + uint32 eee_idle_time = 95; + uint32 eee_wake_time = 96; + Uint64List port_pool_list = 97; + uint64 isolation_group = 98; + bool pkt_tx_enable = 99; + Uint64List tam_object = 100; + Uint32List serdes_preemphasis = 101; + Uint32List serdes_idriver = 102; + Uint32List serdes_ipredriver = 103; + bool link_training_enable = 104; + PortPtpMode ptp_mode = 105; + PortInterfaceType interface_type = 106; + PortInterfaceTypeList advertised_interface_type = 107; + uint64 reference_clock = 108; + uint32 prbs_polynomial = 109; + uint64 port_serdes_id = 110; + PortLinkTrainingFailureStatus link_training_failure_status = 111; + PortLinkTrainingRxStatus link_training_rx_status = 112; + PortPrbsConfig prbs_config = 113; + bool prbs_lock_status = 114; + bool prbs_lock_loss_status = 115; + PortPrbsRxStatus prbs_rx_status = 116; + PRBS_RXState prbs_rx_state = 117; + bool auto_neg_status = 118; + bool disable_decrement_ttl = 119; + uint64 qos_mpls_exp_to_tc_map = 120; + uint64 qos_mpls_exp_to_color_map = 121; + uint64 qos_tc_and_color_to_mpls_exp_map = 122; + uint32 tpid = 123; + PortErrStatusList err_status_list = 124; + bool fabric_attached = 125; + SwitchType fabric_attached_switch_type = 126; + uint32 fabric_attached_switch_id = 127; + uint32 fabric_attached_port_index = 128; + FabricPortReachability fabric_reachability = 129; + uint64 system_port = 130; + bool auto_neg_fec_mode_override = 131; + PortLoopbackMode loopback_mode = 132; + PortMdixModeStatus mdix_mode_status = 133; + PortMdixModeConfig mdix_mode_config = 134; + PortAutoNegConfigMode auto_neg_config_mode = 135; + bool _1000x_sgmii_slave_autodetect = 136; + PortModuleType module_type = 137; + PortDualMedia dual_media = 138; + PortFecModeExtended auto_neg_fec_mode_extended = 139; + uint32 ipg = 140; + bool global_flow_control_forward = 141; + bool priority_flow_control_forward = 142; + uint64 qos_dscp_to_forwarding_class_map = 143; + uint64 qos_mpls_exp_to_forwarding_class_map = 144; + uint64 ipsec_port = 145; +} + +message PortConnectorAttribute { + uint64 system_side_port_id = 2; + uint64 line_side_port_id = 3; + uint64 system_side_failover_port_id = 4; + uint64 line_side_failover_port_id = 5; + PortConnectorFailoverMode failover_mode = 6; +} + +message PortPoolAttribute { + uint64 port_id = 2; + uint64 buffer_pool_id = 3; + uint64 qos_wred_profile_id = 4; +} + +message PortSerdesAttribute { + uint64 port_id = 2; + Int32List preemphasis = 3; + Int32List idriver = 4; + Int32List ipredriver = 5; + Int32List tx_fir_pre1 = 6; + Int32List tx_fir_pre2 = 7; + Int32List tx_fir_pre3 = 8; + Int32List tx_fir_main = 9; + Int32List tx_fir_post1 = 10; + Int32List tx_fir_post2 = 11; + Int32List tx_fir_post3 = 12; + Int32List tx_fir_attn = 13; +} + +message PacketActionList { + repeated PacketAction list = 1; +} + +message PortBreakoutModeTypeList { + repeated PortBreakoutModeType list = 1; +} + +message PortErrStatusList { + repeated PortErrStatus list = 1; +} + +message PortEyeValuesList { + repeated PortEyeValues list = 1; +} + +message PortFecModeExtendedList { + repeated PortFecModeExtended list = 1; +} + +message PortFecModeList { + repeated PortFecMode list = 1; +} + +message PortInterfaceTypeList { + repeated PortInterfaceType list = 1; +} + +message QosMapAttribute { + QosMapType type = 2; + QosMapList map_to_value_list = 3; +} + +message QueueAttribute { + QueueType type = 2; + uint64 port = 3; + uint32 index = 4; + uint64 parent_scheduler_node = 5; + uint64 wred_profile_id = 6; + uint64 buffer_profile_id = 7; + uint64 scheduler_profile_id = 8; + bool pause_status = 9; + bool enable_pfc_dldr = 10; + bool pfc_dlr_init = 11; + Uint64List tam_object = 12; +} + +message QosMapList { + repeated QOSMap list = 1; +} + +message RouterInterfaceAttribute { + uint64 virtual_router_id = 2; + RouterInterfaceType type = 3; + uint64 port_id = 4; + uint64 vlan_id = 5; + uint32 outer_vlan_id = 6; + uint32 inner_vlan_id = 7; + uint64 bridge_id = 8; + bytes src_mac_address = 9; + bool admin_v4_state = 10; + bool admin_v6_state = 11; + uint32 mtu = 12; + uint64 ingress_acl = 13; + uint64 egress_acl = 14; + PacketAction neighbor_miss_packet_action = 15; + bool v4_mcast_enable = 16; + bool v6_mcast_enable = 17; + PacketAction loopback_packet_action = 18; + bool is_virtual = 19; + uint32 nat_zone_id = 20; + bool disable_decrement_ttl = 21; + bool admin_mpls_state = 22; +} + +message RouteEntryAttribute { + PacketAction packet_action = 2; + uint64 user_trap_id = 3; + uint64 next_hop_id = 4; + uint32 meta_data = 5; + IpAddrFamily ip_addr_family = 6; + uint64 counter_id = 7; +} + +message RpfGroupAttribute { + uint32 rpf_interface_count = 2; + Uint64List rpf_member_list = 3; +} + +message RpfGroupMemberAttribute { + uint64 rpf_group_id = 2; + uint64 rpf_interface_id = 3; +} + +message SamplepacketAttribute { + uint32 sample_rate = 2; + SamplepacketType type = 3; + SamplepacketMode mode = 4; +} + +message SchedulerAttribute { + SchedulingType scheduling_type = 2; + uint32 scheduling_weight = 3; + MeterType meter_type = 4; + uint64 min_bandwidth_rate = 5; + uint64 min_bandwidth_burst_rate = 6; + uint64 max_bandwidth_rate = 7; + uint64 max_bandwidth_burst_rate = 8; +} + +message SchedulerGroupAttribute { + uint32 child_count = 2; + Uint64List child_list = 3; + uint64 port_id = 4; + uint32 level = 5; + uint32 max_childs = 6; + uint64 scheduler_profile_id = 7; + uint64 parent_node = 8; +} + +message Srv6SidlistAttribute { + Srv6SidlistType type = 2; + TlvEntryList tlv_list = 3; + BytesList segment_list = 4; +} + +message StpAttribute { + Uint32List vlan_list = 2; + uint64 bridge_id = 3; + Uint64List port_list = 4; +} + +message StpPortAttribute { + uint64 stp = 2; + uint64 bridge_port = 3; + StpPortState state = 4; +} + +message SwitchAttribute { + uint32 number_of_active_ports = 2; + uint32 max_number_of_supported_ports = 3; + Uint64List port_list = 4; + uint32 port_max_mtu = 5; + uint64 cpu_port = 6; + uint32 max_virtual_routers = 7; + uint32 fdb_table_size = 8; + uint32 l3_neighbor_table_size = 9; + uint32 l3_route_table_size = 10; + uint32 lag_members = 11; + uint32 number_of_lags = 12; + uint32 ecmp_members = 13; + uint32 number_of_ecmp_groups = 14; + uint32 number_of_unicast_queues = 15; + uint32 number_of_multicast_queues = 16; + uint32 number_of_queues = 17; + uint32 number_of_cpu_queues = 18; + bool on_link_route_supported = 19; + SwitchOperStatus oper_status = 20; + uint32 max_number_of_temp_sensors = 21; + Int32List temp_list = 22; + uint32 max_temp = 23; + uint32 average_temp = 24; + uint32 acl_table_minimum_priority = 25; + uint32 acl_table_maximum_priority = 26; + uint32 acl_entry_minimum_priority = 27; + uint32 acl_entry_maximum_priority = 28; + uint32 acl_table_group_minimum_priority = 29; + uint32 acl_table_group_maximum_priority = 30; + Uint32Range fdb_dst_user_meta_data_range = 31; + Uint32Range route_dst_user_meta_data_range = 32; + Uint32Range neighbor_dst_user_meta_data_range = 33; + Uint32Range port_user_meta_data_range = 34; + Uint32Range vlan_user_meta_data_range = 35; + Uint32Range acl_user_meta_data_range = 36; + Uint32Range acl_user_trap_id_range = 37; + uint64 default_vlan_id = 38; + uint64 default_stp_inst_id = 39; + uint32 max_stp_instance = 40; + uint64 default_virtual_router_id = 41; + uint64 default_override_virtual_router_id = 42; + uint64 default_1q_bridge_id = 43; + uint64 ingress_acl = 44; + uint64 egress_acl = 45; + uint32 qos_max_number_of_traffic_classes = 46; + uint32 qos_max_number_of_scheduler_group_hierarchy_levels = 47; + Uint32List qos_max_number_of_scheduler_groups_per_hierarchy_level = 48; + uint32 qos_max_number_of_childs_per_scheduler_group = 49; + uint64 total_buffer_size = 50; + uint32 ingress_buffer_pool_num = 51; + uint32 egress_buffer_pool_num = 52; + uint32 available_ipv4_route_entry = 53; + uint32 available_ipv6_route_entry = 54; + uint32 available_ipv4_nexthop_entry = 55; + uint32 available_ipv6_nexthop_entry = 56; + uint32 available_ipv4_neighbor_entry = 57; + uint32 available_ipv6_neighbor_entry = 58; + uint32 available_next_hop_group_entry = 59; + uint32 available_next_hop_group_member_entry = 60; + uint32 available_fdb_entry = 61; + uint32 available_l2mc_entry = 62; + uint32 available_ipmc_entry = 63; + uint32 available_snat_entry = 64; + uint32 available_dnat_entry = 65; + uint32 available_double_nat_entry = 66; + AclResourceList available_acl_table = 67; + AclResourceList available_acl_table_group = 68; + uint32 available_my_sid_entry = 69; + uint64 default_trap_group = 70; + uint64 ecmp_hash = 71; + uint64 lag_hash = 72; + bool restart_warm = 73; + bool warm_recover = 74; + SwitchRestartType restart_type = 75; + uint32 min_planned_restart_interval = 76; + uint64 nv_storage_size = 77; + uint32 max_acl_action_count = 78; + uint32 max_acl_range_count = 79; + ACLCapability acl_capability = 80; + SwitchMcastSnoopingCapability mcast_snooping_capability = 81; + SwitchSwitchingMode switching_mode = 82; + bool bcast_cpu_flood_enable = 83; + bool mcast_cpu_flood_enable = 84; + bytes src_mac_address = 85; + uint32 max_learned_addresses = 86; + uint32 fdb_aging_time = 87; + PacketAction fdb_unicast_miss_packet_action = 88; + PacketAction fdb_broadcast_miss_packet_action = 89; + PacketAction fdb_multicast_miss_packet_action = 90; + HashAlgorithm ecmp_default_hash_algorithm = 91; + uint32 ecmp_default_hash_seed = 92; + uint32 ecmp_default_hash_offset = 93; + bool ecmp_default_symmetric_hash = 94; + uint64 ecmp_hash_ipv4 = 95; + uint64 ecmp_hash_ipv4_in_ipv4 = 96; + uint64 ecmp_hash_ipv6 = 97; + HashAlgorithm lag_default_hash_algorithm = 98; + uint32 lag_default_hash_seed = 99; + uint32 lag_default_hash_offset = 100; + bool lag_default_symmetric_hash = 101; + uint64 lag_hash_ipv4 = 102; + uint64 lag_hash_ipv4_in_ipv4 = 103; + uint64 lag_hash_ipv6 = 104; + uint32 counter_refresh_interval = 105; + uint32 qos_default_tc = 106; + uint64 qos_dot1p_to_tc_map = 107; + uint64 qos_dot1p_to_color_map = 108; + uint64 qos_dscp_to_tc_map = 109; + uint64 qos_dscp_to_color_map = 110; + uint64 qos_tc_to_queue_map = 111; + uint64 qos_tc_and_color_to_dot1p_map = 112; + uint64 qos_tc_and_color_to_dscp_map = 113; + bool switch_shell_enable = 114; + uint32 switch_profile_id = 115; + Int32List switch_hardware_info = 116; + Int32List firmware_path_name = 117; + bool init_switch = 118; + bool fast_api_enable = 119; + uint32 mirror_tc = 120; + ACLCapability acl_stage_ingress = 121; + ACLCapability acl_stage_egress = 122; + uint32 srv6_max_sid_depth = 123; + TlvTypeList srv6_tlv_type = 124; + uint32 qos_num_lossless_queues = 125; + PacketAction pfc_dlr_packet_action = 126; + Uint32Range pfc_tc_dld_interval_range = 127; + UintMapList pfc_tc_dld_interval = 128; + Uint32Range pfc_tc_dlr_interval_range = 129; + UintMapList pfc_tc_dlr_interval = 130; + ObjectTypeList supported_protected_object_type = 131; + uint32 tpid_outer_vlan = 132; + uint32 tpid_inner_vlan = 133; + bool crc_check_enable = 134; + bool crc_recalculation_enable = 135; + uint32 number_of_bfd_session = 136; + uint32 max_bfd_session = 137; + BfdSessionOffloadTypeList supported_ipv4_bfd_session_offload_type = 138; + BfdSessionOffloadTypeList supported_ipv6_bfd_session_offload_type = 139; + uint32 min_bfd_rx = 140; + uint32 min_bfd_tx = 141; + bool ecn_ect_threshold_enable = 142; + bytes vxlan_default_router_mac = 143; + uint32 vxlan_default_port = 144; + uint32 max_mirror_session = 145; + uint32 max_sampled_mirror_session = 146; + StatsModeList supported_extended_stats_mode = 147; + bool uninit_data_plane_on_removal = 148; + Uint64List tam_object_id = 149; + ObjectTypeList supported_object_type_list = 150; + bool pre_shutdown = 151; + uint64 nat_zone_counter_object_id = 152; + bool nat_enable = 153; + SwitchHardwareAccessBus hardware_access_bus = 154; + uint64 platfrom_context = 155; + bool firmware_download_broadcast = 156; + SwitchFirmwareLoadMethod firmware_load_method = 157; + SwitchFirmwareLoadType firmware_load_type = 158; + bool firmware_download_execute = 159; + bool firmware_broadcast_stop = 160; + bool firmware_verify_and_init_switch = 161; + bool firmware_status = 162; + uint32 firmware_major_version = 163; + uint32 firmware_minor_version = 164; + Uint64List port_connector_list = 165; + bool propogate_port_state_from_line_to_system_port_support = 166; + SwitchType type = 167; + Uint64List macsec_object_list = 168; + uint64 qos_mpls_exp_to_tc_map = 169; + uint64 qos_mpls_exp_to_color_map = 170; + uint64 qos_tc_and_color_to_mpls_exp_map = 171; + uint32 switch_id = 172; + uint32 max_system_cores = 173; + SystemPortConfigList system_port_config_list = 174; + uint32 number_of_system_ports = 175; + Uint64List system_port_list = 176; + uint32 number_of_fabric_ports = 177; + Uint64List fabric_port_list = 178; + uint32 packet_dma_memory_pool_size = 179; + SwitchFailoverConfigMode failover_config_mode = 180; + bool supported_failover_mode = 181; + Uint64List tunnel_objects_list = 182; + uint32 packet_available_dma_memory_pool_size = 183; + uint64 pre_ingress_acl = 184; + uint32 available_snapt_entry = 185; + uint32 available_dnapt_entry = 186; + uint32 available_double_napt_entry = 187; + Uint32List slave_mdio_addr_list = 188; + uint32 my_mac_table_minimum_priority = 189; + uint32 my_mac_table_maximum_priority = 190; + Uint64List my_mac_list = 191; + uint32 installed_my_mac_entries = 192; + uint32 available_my_mac_entries = 193; + uint32 max_number_of_forwarding_classes = 194; + uint64 qos_dscp_to_forwarding_class_map = 195; + uint64 qos_mpls_exp_to_forwarding_class_map = 196; + uint64 ipsec_object_id = 197; + uint32 ipsec_sa_tag_tpid = 198; +} + +message SwitchTunnelAttribute { + TunnelType tunnel_type = 2; + PacketAction loopback_packet_action = 3; + TunnelEncapEcnMode tunnel_encap_ecn_mode = 4; + Uint64List encap_mappers = 5; + TunnelDecapEcnMode tunnel_decap_ecn_mode = 6; + Uint64List decap_mappers = 7; + TunnelVxlanUdpSportMode tunnel_vxlan_udp_sport_mode = 8; + uint32 vxlan_udp_sport = 9; + uint32 vxlan_udp_sport_mask = 10; +} + +message SystemPortAttribute { + SystemPortType type = 2; + uint32 qos_number_of_voqs = 3; + Uint64List qos_voq_list = 4; + uint64 port = 5; + bool admin_state = 6; + SystemPortConfig config_info = 7; + uint64 qos_tc_to_queue_map = 8; +} + +message StatsModeList { + repeated StatsMode list = 1; +} + +message SystemPortConfigList { + repeated SystemPortConfig list = 1; +} + +message TamAttribute { + Uint64List telemetry_objects_list = 2; + Uint64List event_objects_list = 3; + Uint64List int_objects_list = 4; + TamBindPointTypeList tam_bind_point_type_list = 5; +} + +message TamCollectorAttribute { + bytes src_ip = 2; + bytes dst_ip = 3; + bool localhost = 4; + uint64 virtual_router_id = 5; + uint32 truncate_size = 6; + uint64 transport = 7; + uint32 dscp_value = 8; +} + +message TamEventAttribute { + TamEventType type = 2; + Uint64List action_list = 3; + Uint64List collector_list = 4; + uint64 threshold = 5; + uint32 dscp_value = 6; +} + +message TamEventActionAttribute { + uint64 report_type = 2; + uint32 qos_action_type = 3; +} + +message TamEventThresholdAttribute { + uint32 high_watermark = 2; + uint32 low_watermark = 3; + uint32 latency = 4; + uint32 rate = 5; + uint32 abs_value = 6; + TamEventThresholdUnit unit = 7; +} + +message TamIntAttribute { + TamIntType type = 2; + uint32 device_id = 3; + uint32 ioam_trace_type = 4; + TamIntPresenceType int_presence_type = 5; + uint32 int_presence_pb1 = 6; + uint32 int_presence_pb2 = 7; + uint32 int_presence_dscp_value = 8; + bool inline = 9; + uint32 int_presence_l3_protocol = 10; + uint32 trace_vector = 11; + uint32 action_vector = 12; + uint32 p4_int_instruction_bitmap = 13; + bool metadata_fragment_enable = 14; + bool metadata_checksum_enable = 15; + bool report_all_packets = 16; + uint32 flow_liveness_period = 17; + uint32 latency_sensitivity = 18; + uint64 acl_group = 19; + uint32 max_hop_count = 20; + uint32 max_length = 21; + uint32 name_space_id = 22; + bool name_space_id_global = 23; + uint64 ingress_samplepacket_enable = 24; + Uint64List collector_list = 25; + uint64 math_func = 26; + uint64 report_id = 27; +} + +message TamMathFuncAttribute { + TamTelMathFuncType tam_tel_math_func_type = 2; +} + +message TamReportAttribute { + TamReportType type = 2; + uint32 histogram_number_of_bins = 3; + Uint32List histogram_bin_boundary = 4; + uint32 quota = 5; + TamReportMode report_mode = 6; + uint32 report_interval = 7; + uint32 enterprise_number = 8; +} + +message TamTelemetryAttribute { + Uint64List tam_type_list = 2; + Uint64List collector_list = 3; + TamReportingUnit tam_reporting_unit = 4; + uint32 reporting_interval = 5; +} + +message TamTelTypeAttribute { + TamTelemetryType tam_telemetry_type = 2; + uint32 int_switch_identifier = 3; + bool switch_enable_port_stats = 4; + bool switch_enable_port_stats_ingress = 5; + bool switch_enable_port_stats_egress = 6; + bool switch_enable_virtual_queue_stats = 7; + bool switch_enable_output_queue_stats = 8; + bool switch_enable_mmu_stats = 9; + bool switch_enable_fabric_stats = 10; + bool switch_enable_filter_stats = 11; + bool switch_enable_resource_utilization_stats = 12; + bool fabric_q = 13; + bool ne_enable = 14; + uint32 dscp_value = 15; + uint64 math_func = 16; + uint64 report_id = 17; +} + +message TamTransportAttribute { + TamTransportType transport_type = 2; + uint32 src_port = 3; + uint32 dst_port = 4; + TamTransportAuthType transport_auth_type = 5; + uint32 mtu = 6; +} + +message TunnelAttribute { + TunnelType type = 2; + uint64 underlay_interface = 3; + uint64 overlay_interface = 4; + TunnelPeerMode peer_mode = 5; + bytes encap_src_ip = 6; + bytes encap_dst_ip = 7; + TunnelTtlMode encap_ttl_mode = 8; + uint32 encap_ttl_val = 9; + TunnelDscpMode encap_dscp_mode = 10; + uint32 encap_dscp_val = 11; + bool encap_gre_key_valid = 12; + uint32 encap_gre_key = 13; + TunnelEncapEcnMode encap_ecn_mode = 14; + Uint64List encap_mappers = 15; + TunnelDecapEcnMode decap_ecn_mode = 16; + Uint64List decap_mappers = 17; + TunnelTtlMode decap_ttl_mode = 18; + TunnelDscpMode decap_dscp_mode = 19; + Uint64List term_table_entry_list = 20; + PacketAction loopback_packet_action = 21; + TunnelVxlanUdpSportMode vxlan_udp_sport_mode = 22; + uint32 vxlan_udp_sport = 23; + uint32 vxlan_udp_sport_mask = 24; + uint32 sa_index = 25; + Uint64List ipsec_sa_port_list = 26; +} + +message TunnelMapAttribute { + TunnelMapType type = 2; + Uint64List entry_list = 3; +} + +message TunnelMapEntryAttribute { + TunnelMapType tunnel_map_type = 2; + uint64 tunnel_map = 3; + uint32 oecn_key = 4; + uint32 oecn_value = 5; + uint32 uecn_key = 6; + uint32 uecn_value = 7; + uint32 vlan_id_key = 8; + uint32 vlan_id_value = 9; + uint32 vni_id_key = 10; + uint32 vni_id_value = 11; + uint64 bridge_id_key = 12; + uint64 bridge_id_value = 13; + uint64 virtual_router_id_key = 14; + uint64 virtual_router_id_value = 15; + uint32 vsid_id_key = 16; + uint32 vsid_id_value = 17; +} + +message TunnelTermTableEntryAttribute { + uint64 vr_id = 2; + TunnelTermTableEntryType type = 3; + bytes dst_ip = 4; + bytes dst_ip_mask = 5; + bytes src_ip = 6; + bytes src_ip_mask = 7; + TunnelType tunnel_type = 8; + uint64 action_tunnel_id = 9; + IpAddrFamily ip_addr_family = 10; + bool ipsec_verified = 11; +} + +message TamBindPointTypeList { + repeated TamBindPointType list = 1; +} + +message TlvEntryList { + repeated TLVEntry list = 1; +} + +message TlvTypeList { + repeated TlvType list = 1; +} + +message UdfAttribute { + uint64 match_id = 2; + uint64 group_id = 3; + UdfBase base = 4; + uint32 offset = 5; + Uint32List hash_mask = 6; +} + +message UdfGroupAttribute { + Uint64List udf_list = 2; + UdfGroupType type = 3; + uint32 length = 4; +} + +message UdfMatchAttribute { + AclFieldData l2_type = 2; + AclFieldData l3_type = 3; + AclFieldData gre_type = 4; + uint32 priority = 5; +} + +message Uint32List { + repeated uint32 list = 1; +} + +message Uint64List { + repeated uint64 list = 1; +} + +message UintMapList { + repeated UintMap list = 1; +} + +message VirtualRouterAttribute { + bool admin_v4_state = 2; + bool admin_v6_state = 3; + bytes src_mac_address = 4; + PacketAction violation_ttl1_packet_action = 5; + PacketAction violation_ip_options_packet_action = 6; + PacketAction unknown_l3_multicast_packet_action = 7; + bytes label = 8; +} + +message VlanAttribute { + uint32 vlan_id = 2; + Uint64List member_list = 3; + uint32 max_learned_addresses = 4; + uint64 stp_instance = 5; + bool learn_disable = 6; + VlanMcastLookupKeyType ipv4_mcast_lookup_key_type = 7; + VlanMcastLookupKeyType ipv6_mcast_lookup_key_type = 8; + uint64 unknown_non_ip_mcast_output_group_id = 9; + uint64 unknown_ipv4_mcast_output_group_id = 10; + uint64 unknown_ipv6_mcast_output_group_id = 11; + uint64 unknown_linklocal_mcast_output_group_id = 12; + uint64 ingress_acl = 13; + uint64 egress_acl = 14; + uint32 meta_data = 15; + VlanFloodControlType unknown_unicast_flood_control_type = 16; + uint64 unknown_unicast_flood_group = 17; + VlanFloodControlType unknown_multicast_flood_control_type = 18; + uint64 unknown_multicast_flood_group = 19; + VlanFloodControlType broadcast_flood_control_type = 20; + uint64 broadcast_flood_group = 21; + bool custom_igmp_snooping_enable = 22; + Uint64List tam_object = 23; +} + +message VlanMemberAttribute { + uint64 vlan_id = 2; + uint64 bridge_port_id = 3; + VlanTaggingMode vlan_tagging_mode = 4; +} + +message WredAttribute { + bool green_enable = 2; + uint32 green_min_threshold = 3; + uint32 green_max_threshold = 4; + uint32 green_drop_probability = 5; + bool yellow_enable = 6; + uint32 yellow_min_threshold = 7; + uint32 yellow_max_threshold = 8; + uint32 yellow_drop_probability = 9; + bool red_enable = 10; + uint32 red_min_threshold = 11; + uint32 red_max_threshold = 12; + uint32 red_drop_probability = 13; + uint32 weight = 14; + EcnMarkMode ecn_mark_mode = 15; + uint32 ecn_green_min_threshold = 16; + uint32 ecn_green_max_threshold = 17; + uint32 ecn_green_mark_probability = 18; + uint32 ecn_yellow_min_threshold = 19; + uint32 ecn_yellow_max_threshold = 20; + uint32 ecn_yellow_mark_probability = 21; + uint32 ecn_red_min_threshold = 22; + uint32 ecn_red_max_threshold = 23; + uint32 ecn_red_mark_probability = 24; + uint32 ecn_color_unaware_min_threshold = 25; + uint32 ecn_color_unaware_max_threshold = 26; + uint32 ecn_color_unaware_mark_probability = 27; +} diff --git a/dataplane/standalone/proto/counter.proto b/dataplane/standalone/proto/counter.proto new file mode 100644 index 00000000..a21daf23 --- /dev/null +++ b/dataplane/standalone/proto/counter.proto @@ -0,0 +1,45 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum CounterAttr { + COUNTER_ATTR_UNSPECIFIED = 0; + COUNTER_ATTR_TYPE = 1; +} + +message CreateCounterRequest { + uint64 switch = 1; + + CounterType type = 2; +} + +message CreateCounterResponse { + uint64 oid = 1; +} + +message RemoveCounterRequest { + uint64 oid = 1; +} + +message RemoveCounterResponse {} + +message GetCounterAttributeRequest { + uint64 oid = 1; + CounterAttr attr_type = 2; +} + +message GetCounterAttributeResponse { + CounterAttribute attr = 1; +} + +service Counter { + rpc CreateCounter(CreateCounterRequest) returns (CreateCounterResponse) {} + rpc RemoveCounter(RemoveCounterRequest) returns (RemoveCounterResponse) {} + rpc GetCounterAttribute(GetCounterAttributeRequest) + returns (GetCounterAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/debug_counter.proto b/dataplane/standalone/proto/debug_counter.proto new file mode 100644 index 00000000..3f544f82 --- /dev/null +++ b/dataplane/standalone/proto/debug_counter.proto @@ -0,0 +1,66 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum DebugCounterAttr { + DEBUG_COUNTER_ATTR_UNSPECIFIED = 0; + DEBUG_COUNTER_ATTR_INDEX = 1; + DEBUG_COUNTER_ATTR_TYPE = 2; + DEBUG_COUNTER_ATTR_BIND_METHOD = 3; + DEBUG_COUNTER_ATTR_IN_DROP_REASON_LIST = 4; + DEBUG_COUNTER_ATTR_OUT_DROP_REASON_LIST = 5; +} + +message CreateDebugCounterRequest { + uint64 switch = 1; + + DebugCounterType type = 2; + DebugCounterBindMethod bind_method = 3; + repeated InDropReason in_drop_reason_list = 4; + repeated OutDropReason out_drop_reason_list = 5; +} + +message CreateDebugCounterResponse { + uint64 oid = 1; +} + +message RemoveDebugCounterRequest { + uint64 oid = 1; +} + +message RemoveDebugCounterResponse {} + +message SetDebugCounterAttributeRequest { + uint64 oid = 1; + oneof attr { + InDropReasonList in_drop_reason_list = 2; + OutDropReasonList out_drop_reason_list = 3; + } +} + +message SetDebugCounterAttributeResponse {} + +message GetDebugCounterAttributeRequest { + uint64 oid = 1; + DebugCounterAttr attr_type = 2; +} + +message GetDebugCounterAttributeResponse { + DebugCounterAttribute attr = 1; +} + +service DebugCounter { + rpc CreateDebugCounter(CreateDebugCounterRequest) + returns (CreateDebugCounterResponse) {} + rpc RemoveDebugCounter(RemoveDebugCounterRequest) + returns (RemoveDebugCounterResponse) {} + rpc SetDebugCounterAttribute(SetDebugCounterAttributeRequest) + returns (SetDebugCounterAttributeResponse) {} + rpc GetDebugCounterAttribute(GetDebugCounterAttributeRequest) + returns (GetDebugCounterAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/dtel.proto b/dataplane/standalone/proto/dtel.proto new file mode 100644 index 00000000..ff2bc93e --- /dev/null +++ b/dataplane/standalone/proto/dtel.proto @@ -0,0 +1,314 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum DtelAttr { + DTEL_ATTR_UNSPECIFIED = 0; + DTEL_ATTR_INT_ENDPOINT_ENABLE = 1; + DTEL_ATTR_INT_TRANSIT_ENABLE = 2; + DTEL_ATTR_POSTCARD_ENABLE = 3; + DTEL_ATTR_DROP_REPORT_ENABLE = 4; + DTEL_ATTR_QUEUE_REPORT_ENABLE = 5; + DTEL_ATTR_SWITCH_ID = 6; + DTEL_ATTR_FLOW_STATE_CLEAR_CYCLE = 7; + DTEL_ATTR_LATENCY_SENSITIVITY = 8; + DTEL_ATTR_SINK_PORT_LIST = 9; + DTEL_ATTR_INT_L4_DSCP = 10; +} + +enum DtelEventAttr { + DTEL_EVENT_ATTR_UNSPECIFIED = 0; + DTEL_EVENT_ATTR_TYPE = 1; + DTEL_EVENT_ATTR_REPORT_SESSION = 2; + DTEL_EVENT_ATTR_DSCP_VALUE = 3; +} + +enum DtelIntSessionAttr { + DTEL_INT_SESSION_ATTR_UNSPECIFIED = 0; + DTEL_INT_SESSION_ATTR_MAX_HOP_COUNT = 1; + DTEL_INT_SESSION_ATTR_COLLECT_SWITCH_ID = 2; + DTEL_INT_SESSION_ATTR_COLLECT_SWITCH_PORTS = 3; + DTEL_INT_SESSION_ATTR_COLLECT_INGRESS_TIMESTAMP = 4; + DTEL_INT_SESSION_ATTR_COLLECT_EGRESS_TIMESTAMP = 5; + DTEL_INT_SESSION_ATTR_COLLECT_QUEUE_INFO = 6; +} + +enum DtelQueueReportAttr { + DTEL_QUEUE_REPORT_ATTR_UNSPECIFIED = 0; + DTEL_QUEUE_REPORT_ATTR_QUEUE_ID = 1; + DTEL_QUEUE_REPORT_ATTR_DEPTH_THRESHOLD = 2; + DTEL_QUEUE_REPORT_ATTR_LATENCY_THRESHOLD = 3; + DTEL_QUEUE_REPORT_ATTR_BREACH_QUOTA = 4; + DTEL_QUEUE_REPORT_ATTR_TAIL_DROP = 5; +} + +enum DtelReportSessionAttr { + DTEL_REPORT_SESSION_ATTR_UNSPECIFIED = 0; + DTEL_REPORT_SESSION_ATTR_SRC_IP = 1; + DTEL_REPORT_SESSION_ATTR_DST_IP_LIST = 2; + DTEL_REPORT_SESSION_ATTR_VIRTUAL_ROUTER_ID = 3; + DTEL_REPORT_SESSION_ATTR_TRUNCATE_SIZE = 4; + DTEL_REPORT_SESSION_ATTR_UDP_DST_PORT = 5; +} + +message CreateDtelRequest { + uint64 switch = 1; + + bool int_endpoint_enable = 2; + bool int_transit_enable = 3; + bool postcard_enable = 4; + bool drop_report_enable = 5; + bool queue_report_enable = 6; + uint32 switch_id = 7; + uint32 flow_state_clear_cycle = 8; + uint32 latency_sensitivity = 9; + repeated uint64 sink_port_list = 10; + AclFieldData int_l4_dscp = 11; +} + +message CreateDtelResponse { + uint64 oid = 1; +} + +message RemoveDtelRequest { + uint64 oid = 1; +} + +message RemoveDtelResponse {} + +message SetDtelAttributeRequest { + uint64 oid = 1; + oneof attr { + bool int_endpoint_enable = 2; + bool int_transit_enable = 3; + bool postcard_enable = 4; + bool drop_report_enable = 5; + bool queue_report_enable = 6; + uint32 switch_id = 7; + uint32 flow_state_clear_cycle = 8; + uint32 latency_sensitivity = 9; + Uint64List sink_port_list = 10; + AclFieldData int_l4_dscp = 11; + } +} + +message SetDtelAttributeResponse {} + +message GetDtelAttributeRequest { + uint64 oid = 1; + DtelAttr attr_type = 2; +} + +message GetDtelAttributeResponse { + DtelAttribute attr = 1; +} + +message CreateDtelQueueReportRequest { + uint64 switch = 1; + + uint64 queue_id = 2; + uint32 depth_threshold = 3; + uint32 latency_threshold = 4; + uint32 breach_quota = 5; + bool tail_drop = 6; +} + +message CreateDtelQueueReportResponse { + uint64 oid = 1; +} + +message RemoveDtelQueueReportRequest { + uint64 oid = 1; +} + +message RemoveDtelQueueReportResponse {} + +message SetDtelQueueReportAttributeRequest { + uint64 oid = 1; + oneof attr { + uint32 depth_threshold = 2; + uint32 latency_threshold = 3; + uint32 breach_quota = 4; + bool tail_drop = 5; + } +} + +message SetDtelQueueReportAttributeResponse {} + +message GetDtelQueueReportAttributeRequest { + uint64 oid = 1; + DtelQueueReportAttr attr_type = 2; +} + +message GetDtelQueueReportAttributeResponse { + DtelQueueReportAttribute attr = 1; +} + +message CreateDtelIntSessionRequest { + uint64 switch = 1; + + uint32 max_hop_count = 2; + bool collect_switch_id = 3; + bool collect_switch_ports = 4; + bool collect_ingress_timestamp = 5; + bool collect_egress_timestamp = 6; + bool collect_queue_info = 7; +} + +message CreateDtelIntSessionResponse { + uint64 oid = 1; +} + +message RemoveDtelIntSessionRequest { + uint64 oid = 1; +} + +message RemoveDtelIntSessionResponse {} + +message SetDtelIntSessionAttributeRequest { + uint64 oid = 1; + oneof attr { + uint32 max_hop_count = 2; + bool collect_switch_id = 3; + bool collect_switch_ports = 4; + bool collect_ingress_timestamp = 5; + bool collect_egress_timestamp = 6; + bool collect_queue_info = 7; + } +} + +message SetDtelIntSessionAttributeResponse {} + +message GetDtelIntSessionAttributeRequest { + uint64 oid = 1; + DtelIntSessionAttr attr_type = 2; +} + +message GetDtelIntSessionAttributeResponse { + DtelIntSessionAttribute attr = 1; +} + +message CreateDtelReportSessionRequest { + uint64 switch = 1; + + bytes src_ip = 2; + repeated bytes dst_ip_list = 3; + uint64 virtual_router_id = 4; + uint32 truncate_size = 5; + uint32 udp_dst_port = 6; +} + +message CreateDtelReportSessionResponse { + uint64 oid = 1; +} + +message RemoveDtelReportSessionRequest { + uint64 oid = 1; +} + +message RemoveDtelReportSessionResponse {} + +message SetDtelReportSessionAttributeRequest { + uint64 oid = 1; + oneof attr { + bytes src_ip = 2; + BytesList dst_ip_list = 3; + uint64 virtual_router_id = 4; + uint32 truncate_size = 5; + uint32 udp_dst_port = 6; + } +} + +message SetDtelReportSessionAttributeResponse {} + +message GetDtelReportSessionAttributeRequest { + uint64 oid = 1; + DtelReportSessionAttr attr_type = 2; +} + +message GetDtelReportSessionAttributeResponse { + DtelReportSessionAttribute attr = 1; +} + +message CreateDtelEventRequest { + uint64 switch = 1; + + DtelEventType type = 2; + uint64 report_session = 3; + uint32 dscp_value = 4; +} + +message CreateDtelEventResponse { + uint64 oid = 1; +} + +message RemoveDtelEventRequest { + uint64 oid = 1; +} + +message RemoveDtelEventResponse {} + +message SetDtelEventAttributeRequest { + uint64 oid = 1; + oneof attr { + uint64 report_session = 2; + uint32 dscp_value = 3; + } +} + +message SetDtelEventAttributeResponse {} + +message GetDtelEventAttributeRequest { + uint64 oid = 1; + DtelEventAttr attr_type = 2; +} + +message GetDtelEventAttributeResponse { + DtelEventAttribute attr = 1; +} + +service Dtel { + rpc CreateDtel(CreateDtelRequest) returns (CreateDtelResponse) {} + rpc RemoveDtel(RemoveDtelRequest) returns (RemoveDtelResponse) {} + rpc SetDtelAttribute(SetDtelAttributeRequest) + returns (SetDtelAttributeResponse) {} + rpc GetDtelAttribute(GetDtelAttributeRequest) + returns (GetDtelAttributeResponse) {} + rpc CreateDtelQueueReport(CreateDtelQueueReportRequest) + returns (CreateDtelQueueReportResponse) {} + rpc RemoveDtelQueueReport(RemoveDtelQueueReportRequest) + returns (RemoveDtelQueueReportResponse) {} + rpc SetDtelQueueReportAttribute(SetDtelQueueReportAttributeRequest) + returns (SetDtelQueueReportAttributeResponse) {} + rpc GetDtelQueueReportAttribute(GetDtelQueueReportAttributeRequest) + returns (GetDtelQueueReportAttributeResponse) {} + rpc CreateDtelIntSession(CreateDtelIntSessionRequest) + returns (CreateDtelIntSessionResponse) {} + rpc RemoveDtelIntSession(RemoveDtelIntSessionRequest) + returns (RemoveDtelIntSessionResponse) {} + rpc SetDtelIntSessionAttribute(SetDtelIntSessionAttributeRequest) + returns (SetDtelIntSessionAttributeResponse) {} + rpc GetDtelIntSessionAttribute(GetDtelIntSessionAttributeRequest) + returns (GetDtelIntSessionAttributeResponse) {} + rpc CreateDtelReportSession(CreateDtelReportSessionRequest) + returns (CreateDtelReportSessionResponse) {} + rpc RemoveDtelReportSession(RemoveDtelReportSessionRequest) + returns (RemoveDtelReportSessionResponse) {} + rpc SetDtelReportSessionAttribute(SetDtelReportSessionAttributeRequest) + returns (SetDtelReportSessionAttributeResponse) {} + rpc GetDtelReportSessionAttribute(GetDtelReportSessionAttributeRequest) + returns (GetDtelReportSessionAttributeResponse) {} + rpc CreateDtelEvent(CreateDtelEventRequest) + returns (CreateDtelEventResponse) {} + rpc RemoveDtelEvent(RemoveDtelEventRequest) + returns (RemoveDtelEventResponse) {} + rpc SetDtelEventAttribute(SetDtelEventAttributeRequest) + returns (SetDtelEventAttributeResponse) {} + rpc GetDtelEventAttribute(GetDtelEventAttributeRequest) + returns (GetDtelEventAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/fdb.proto b/dataplane/standalone/proto/fdb.proto new file mode 100644 index 00000000..8f55b3ff --- /dev/null +++ b/dataplane/standalone/proto/fdb.proto @@ -0,0 +1,77 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum FdbEntryAttr { + FDB_ENTRY_ATTR_UNSPECIFIED = 0; + FDB_ENTRY_ATTR_TYPE = 1; + FDB_ENTRY_ATTR_PACKET_ACTION = 2; + FDB_ENTRY_ATTR_USER_TRAP_ID = 3; + FDB_ENTRY_ATTR_BRIDGE_PORT_ID = 4; + FDB_ENTRY_ATTR_META_DATA = 5; + FDB_ENTRY_ATTR_ENDPOINT_IP = 6; + FDB_ENTRY_ATTR_COUNTER_ID = 7; + FDB_ENTRY_ATTR_ALLOW_MAC_MOVE = 8; +} + +message CreateFdbEntryRequest { + FdbEntry entry = 1; + + FdbEntryType type = 2; + PacketAction packet_action = 3; + uint64 user_trap_id = 4; + uint64 bridge_port_id = 5; + uint32 meta_data = 6; + bytes endpoint_ip = 7; + uint64 counter_id = 8; + bool allow_mac_move = 9; +} + +message CreateFdbEntryResponse { + uint64 oid = 1; +} + +message RemoveFdbEntryRequest { + FdbEntry entry = 1; +} + +message RemoveFdbEntryResponse {} + +message SetFdbEntryAttributeRequest { + FdbEntry entry = 1; + oneof attr { + FdbEntryType type = 2; + PacketAction packet_action = 3; + uint64 user_trap_id = 4; + uint64 bridge_port_id = 5; + uint32 meta_data = 6; + bytes endpoint_ip = 7; + uint64 counter_id = 8; + bool allow_mac_move = 9; + } +} + +message SetFdbEntryAttributeResponse {} + +message GetFdbEntryAttributeRequest { + FdbEntry entry = 1; + FdbEntryAttr attr_type = 2; +} + +message GetFdbEntryAttributeResponse { + FdbEntryAttribute attr = 1; +} + +service Fdb { + rpc CreateFdbEntry(CreateFdbEntryRequest) returns (CreateFdbEntryResponse) {} + rpc RemoveFdbEntry(RemoveFdbEntryRequest) returns (RemoveFdbEntryResponse) {} + rpc SetFdbEntryAttribute(SetFdbEntryAttributeRequest) + returns (SetFdbEntryAttributeResponse) {} + rpc GetFdbEntryAttribute(GetFdbEntryAttributeRequest) + returns (GetFdbEntryAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/hash.proto b/dataplane/standalone/proto/hash.proto new file mode 100644 index 00000000..45b1a17d --- /dev/null +++ b/dataplane/standalone/proto/hash.proto @@ -0,0 +1,104 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum FineGrainedHashFieldAttr { + FINE_GRAINED_HASH_FIELD_ATTR_UNSPECIFIED = 0; + FINE_GRAINED_HASH_FIELD_ATTR_NATIVE_HASH_FIELD = 1; + FINE_GRAINED_HASH_FIELD_ATTR_IPV4_MASK = 2; + FINE_GRAINED_HASH_FIELD_ATTR_IPV6_MASK = 3; + FINE_GRAINED_HASH_FIELD_ATTR_SEQUENCE_ID = 4; +} + +enum HashAttr { + HASH_ATTR_UNSPECIFIED = 0; + HASH_ATTR_NATIVE_HASH_FIELD_LIST = 1; + HASH_ATTR_UDF_GROUP_LIST = 2; + HASH_ATTR_FINE_GRAINED_HASH_FIELD_LIST = 3; +} + +message CreateHashRequest { + uint64 switch = 1; + + repeated NativeHashField native_hash_field_list = 2; + repeated uint64 udf_group_list = 3; + repeated uint64 fine_grained_hash_field_list = 4; +} + +message CreateHashResponse { + uint64 oid = 1; +} + +message RemoveHashRequest { + uint64 oid = 1; +} + +message RemoveHashResponse {} + +message SetHashAttributeRequest { + uint64 oid = 1; + oneof attr { + NativeHashFieldList native_hash_field_list = 2; + Uint64List udf_group_list = 3; + Uint64List fine_grained_hash_field_list = 4; + } +} + +message SetHashAttributeResponse {} + +message GetHashAttributeRequest { + uint64 oid = 1; + HashAttr attr_type = 2; +} + +message GetHashAttributeResponse { + HashAttribute attr = 1; +} + +message CreateFineGrainedHashFieldRequest { + uint64 switch = 1; + + NativeHashField native_hash_field = 2; + bytes ipv4_mask = 3; + bytes ipv6_mask = 4; + uint32 sequence_id = 5; +} + +message CreateFineGrainedHashFieldResponse { + uint64 oid = 1; +} + +message RemoveFineGrainedHashFieldRequest { + uint64 oid = 1; +} + +message RemoveFineGrainedHashFieldResponse {} + +message GetFineGrainedHashFieldAttributeRequest { + uint64 oid = 1; + FineGrainedHashFieldAttr attr_type = 2; +} + +message GetFineGrainedHashFieldAttributeResponse { + FineGrainedHashFieldAttribute attr = 1; +} + +service Hash { + rpc CreateHash(CreateHashRequest) returns (CreateHashResponse) {} + rpc RemoveHash(RemoveHashRequest) returns (RemoveHashResponse) {} + rpc SetHashAttribute(SetHashAttributeRequest) + returns (SetHashAttributeResponse) {} + rpc GetHashAttribute(GetHashAttributeRequest) + returns (GetHashAttributeResponse) {} + rpc CreateFineGrainedHashField(CreateFineGrainedHashFieldRequest) + returns (CreateFineGrainedHashFieldResponse) {} + rpc RemoveFineGrainedHashField(RemoveFineGrainedHashFieldRequest) + returns (RemoveFineGrainedHashFieldResponse) {} + rpc GetFineGrainedHashFieldAttribute(GetFineGrainedHashFieldAttributeRequest) + returns (GetFineGrainedHashFieldAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/hostif.proto b/dataplane/standalone/proto/hostif.proto new file mode 100644 index 00000000..ae1a29c6 --- /dev/null +++ b/dataplane/standalone/proto/hostif.proto @@ -0,0 +1,285 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum HostifAttr { + HOSTIF_ATTR_UNSPECIFIED = 0; + HOSTIF_ATTR_TYPE = 1; + HOSTIF_ATTR_OBJ_ID = 2; + HOSTIF_ATTR_NAME = 3; + HOSTIF_ATTR_OPER_STATUS = 4; + HOSTIF_ATTR_QUEUE = 5; + HOSTIF_ATTR_VLAN_TAG = 6; + HOSTIF_ATTR_GENETLINK_MCGRP_NAME = 7; +} + +enum HostifTableEntryAttr { + HOSTIF_TABLE_ENTRY_ATTR_UNSPECIFIED = 0; + HOSTIF_TABLE_ENTRY_ATTR_TYPE = 1; + HOSTIF_TABLE_ENTRY_ATTR_OBJ_ID = 2; + HOSTIF_TABLE_ENTRY_ATTR_TRAP_ID = 3; + HOSTIF_TABLE_ENTRY_ATTR_CHANNEL_TYPE = 4; + HOSTIF_TABLE_ENTRY_ATTR_HOST_IF = 5; +} + +enum HostifTrapAttr { + HOSTIF_TRAP_ATTR_UNSPECIFIED = 0; + HOSTIF_TRAP_ATTR_TRAP_TYPE = 1; + HOSTIF_TRAP_ATTR_PACKET_ACTION = 2; + HOSTIF_TRAP_ATTR_TRAP_PRIORITY = 3; + HOSTIF_TRAP_ATTR_EXCLUDE_PORT_LIST = 4; + HOSTIF_TRAP_ATTR_TRAP_GROUP = 5; + HOSTIF_TRAP_ATTR_MIRROR_SESSION = 6; + HOSTIF_TRAP_ATTR_COUNTER_ID = 7; +} + +enum HostifTrapGroupAttr { + HOSTIF_TRAP_GROUP_ATTR_UNSPECIFIED = 0; + HOSTIF_TRAP_GROUP_ATTR_ADMIN_STATE = 1; + HOSTIF_TRAP_GROUP_ATTR_QUEUE = 2; + HOSTIF_TRAP_GROUP_ATTR_POLICER = 3; +} + +enum HostifUserDefinedTrapAttr { + HOSTIF_USER_DEFINED_TRAP_ATTR_UNSPECIFIED = 0; + HOSTIF_USER_DEFINED_TRAP_ATTR_TYPE = 1; + HOSTIF_USER_DEFINED_TRAP_ATTR_TRAP_PRIORITY = 2; + HOSTIF_USER_DEFINED_TRAP_ATTR_TRAP_GROUP = 3; +} + +message CreateHostifRequest { + uint64 switch = 1; + + HostifType type = 2; + uint64 obj_id = 3; + bytes name = 4; + bool oper_status = 5; + uint32 queue = 6; + HostifVlanTag vlan_tag = 7; + bytes genetlink_mcgrp_name = 8; +} + +message CreateHostifResponse { + uint64 oid = 1; +} + +message RemoveHostifRequest { + uint64 oid = 1; +} + +message RemoveHostifResponse {} + +message SetHostifAttributeRequest { + uint64 oid = 1; + oneof attr { + bool oper_status = 2; + uint32 queue = 3; + HostifVlanTag vlan_tag = 4; + } +} + +message SetHostifAttributeResponse {} + +message GetHostifAttributeRequest { + uint64 oid = 1; + HostifAttr attr_type = 2; +} + +message GetHostifAttributeResponse { + HostifAttribute attr = 1; +} + +message CreateHostifTableEntryRequest { + uint64 switch = 1; + + HostifTableEntryType type = 2; + uint64 obj_id = 3; + uint64 trap_id = 4; + HostifTableEntryChannelType channel_type = 5; + uint64 host_if = 6; +} + +message CreateHostifTableEntryResponse { + uint64 oid = 1; +} + +message RemoveHostifTableEntryRequest { + uint64 oid = 1; +} + +message RemoveHostifTableEntryResponse {} + +message GetHostifTableEntryAttributeRequest { + uint64 oid = 1; + HostifTableEntryAttr attr_type = 2; +} + +message GetHostifTableEntryAttributeResponse { + HostifTableEntryAttribute attr = 1; +} + +message CreateHostifTrapGroupRequest { + uint64 switch = 1; + + bool admin_state = 2; + uint32 queue = 3; + uint64 policer = 4; +} + +message CreateHostifTrapGroupResponse { + uint64 oid = 1; +} + +message RemoveHostifTrapGroupRequest { + uint64 oid = 1; +} + +message RemoveHostifTrapGroupResponse {} + +message SetHostifTrapGroupAttributeRequest { + uint64 oid = 1; + oneof attr { + bool admin_state = 2; + uint32 queue = 3; + uint64 policer = 4; + } +} + +message SetHostifTrapGroupAttributeResponse {} + +message GetHostifTrapGroupAttributeRequest { + uint64 oid = 1; + HostifTrapGroupAttr attr_type = 2; +} + +message GetHostifTrapGroupAttributeResponse { + HostifTrapGroupAttribute attr = 1; +} + +message CreateHostifTrapRequest { + uint64 switch = 1; + + HostifTrapType trap_type = 2; + PacketAction packet_action = 3; + uint32 trap_priority = 4; + repeated uint64 exclude_port_list = 5; + uint64 trap_group = 6; + repeated uint64 mirror_session = 7; + uint64 counter_id = 8; +} + +message CreateHostifTrapResponse { + uint64 oid = 1; +} + +message RemoveHostifTrapRequest { + uint64 oid = 1; +} + +message RemoveHostifTrapResponse {} + +message SetHostifTrapAttributeRequest { + uint64 oid = 1; + oneof attr { + PacketAction packet_action = 2; + uint32 trap_priority = 3; + Uint64List exclude_port_list = 4; + uint64 trap_group = 5; + Uint64List mirror_session = 6; + uint64 counter_id = 7; + } +} + +message SetHostifTrapAttributeResponse {} + +message GetHostifTrapAttributeRequest { + uint64 oid = 1; + HostifTrapAttr attr_type = 2; +} + +message GetHostifTrapAttributeResponse { + HostifTrapAttribute attr = 1; +} + +message CreateHostifUserDefinedTrapRequest { + uint64 switch = 1; + + HostifUserDefinedTrapType type = 2; + uint32 trap_priority = 3; + uint64 trap_group = 4; +} + +message CreateHostifUserDefinedTrapResponse { + uint64 oid = 1; +} + +message RemoveHostifUserDefinedTrapRequest { + uint64 oid = 1; +} + +message RemoveHostifUserDefinedTrapResponse {} + +message SetHostifUserDefinedTrapAttributeRequest { + uint64 oid = 1; + oneof attr { + uint32 trap_priority = 2; + uint64 trap_group = 3; + } +} + +message SetHostifUserDefinedTrapAttributeResponse {} + +message GetHostifUserDefinedTrapAttributeRequest { + uint64 oid = 1; + HostifUserDefinedTrapAttr attr_type = 2; +} + +message GetHostifUserDefinedTrapAttributeResponse { + HostifUserDefinedTrapAttribute attr = 1; +} + +service Hostif { + rpc CreateHostif(CreateHostifRequest) returns (CreateHostifResponse) {} + rpc RemoveHostif(RemoveHostifRequest) returns (RemoveHostifResponse) {} + rpc SetHostifAttribute(SetHostifAttributeRequest) + returns (SetHostifAttributeResponse) {} + rpc GetHostifAttribute(GetHostifAttributeRequest) + returns (GetHostifAttributeResponse) {} + rpc CreateHostifTableEntry(CreateHostifTableEntryRequest) + returns (CreateHostifTableEntryResponse) {} + rpc RemoveHostifTableEntry(RemoveHostifTableEntryRequest) + returns (RemoveHostifTableEntryResponse) {} + rpc GetHostifTableEntryAttribute(GetHostifTableEntryAttributeRequest) + returns (GetHostifTableEntryAttributeResponse) {} + rpc CreateHostifTrapGroup(CreateHostifTrapGroupRequest) + returns (CreateHostifTrapGroupResponse) {} + rpc RemoveHostifTrapGroup(RemoveHostifTrapGroupRequest) + returns (RemoveHostifTrapGroupResponse) {} + rpc SetHostifTrapGroupAttribute(SetHostifTrapGroupAttributeRequest) + returns (SetHostifTrapGroupAttributeResponse) {} + rpc GetHostifTrapGroupAttribute(GetHostifTrapGroupAttributeRequest) + returns (GetHostifTrapGroupAttributeResponse) {} + rpc CreateHostifTrap(CreateHostifTrapRequest) + returns (CreateHostifTrapResponse) {} + rpc RemoveHostifTrap(RemoveHostifTrapRequest) + returns (RemoveHostifTrapResponse) {} + rpc SetHostifTrapAttribute(SetHostifTrapAttributeRequest) + returns (SetHostifTrapAttributeResponse) {} + rpc GetHostifTrapAttribute(GetHostifTrapAttributeRequest) + returns (GetHostifTrapAttributeResponse) {} + rpc CreateHostifUserDefinedTrap(CreateHostifUserDefinedTrapRequest) + returns (CreateHostifUserDefinedTrapResponse) {} + rpc RemoveHostifUserDefinedTrap(RemoveHostifUserDefinedTrapRequest) + returns (RemoveHostifUserDefinedTrapResponse) {} + rpc SetHostifUserDefinedTrapAttribute( + SetHostifUserDefinedTrapAttributeRequest) + returns (SetHostifUserDefinedTrapAttributeResponse) {} + rpc GetHostifUserDefinedTrapAttribute( + GetHostifUserDefinedTrapAttributeRequest) + returns (GetHostifUserDefinedTrapAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/ipmc.proto b/dataplane/standalone/proto/ipmc.proto new file mode 100644 index 00000000..750460c5 --- /dev/null +++ b/dataplane/standalone/proto/ipmc.proto @@ -0,0 +1,64 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum IpmcEntryAttr { + IPMC_ENTRY_ATTR_UNSPECIFIED = 0; + IPMC_ENTRY_ATTR_PACKET_ACTION = 1; + IPMC_ENTRY_ATTR_OUTPUT_GROUP_ID = 2; + IPMC_ENTRY_ATTR_RPF_GROUP_ID = 3; +} + +message CreateIpmcEntryRequest { + IpmcEntry entry = 1; + + PacketAction packet_action = 2; + uint64 output_group_id = 3; + uint64 rpf_group_id = 4; +} + +message CreateIpmcEntryResponse { + uint64 oid = 1; +} + +message RemoveIpmcEntryRequest { + IpmcEntry entry = 1; +} + +message RemoveIpmcEntryResponse {} + +message SetIpmcEntryAttributeRequest { + IpmcEntry entry = 1; + oneof attr { + PacketAction packet_action = 2; + uint64 output_group_id = 3; + uint64 rpf_group_id = 4; + } +} + +message SetIpmcEntryAttributeResponse {} + +message GetIpmcEntryAttributeRequest { + IpmcEntry entry = 1; + IpmcEntryAttr attr_type = 2; +} + +message GetIpmcEntryAttributeResponse { + IpmcEntryAttribute attr = 1; +} + +service Ipmc { + rpc CreateIpmcEntry(CreateIpmcEntryRequest) + returns (CreateIpmcEntryResponse) {} + rpc RemoveIpmcEntry(RemoveIpmcEntryRequest) + returns (RemoveIpmcEntryResponse) {} + rpc SetIpmcEntryAttribute(SetIpmcEntryAttributeRequest) + returns (SetIpmcEntryAttributeResponse) {} + rpc GetIpmcEntryAttribute(GetIpmcEntryAttributeRequest) + returns (GetIpmcEntryAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/ipmc_group.proto b/dataplane/standalone/proto/ipmc_group.proto new file mode 100644 index 00000000..f4e8fb11 --- /dev/null +++ b/dataplane/standalone/proto/ipmc_group.proto @@ -0,0 +1,84 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum IpmcGroupAttr { + IPMC_GROUP_ATTR_UNSPECIFIED = 0; + IPMC_GROUP_ATTR_IPMC_OUTPUT_COUNT = 1; + IPMC_GROUP_ATTR_IPMC_MEMBER_LIST = 2; +} + +enum IpmcGroupMemberAttr { + IPMC_GROUP_MEMBER_ATTR_UNSPECIFIED = 0; + IPMC_GROUP_MEMBER_ATTR_IPMC_GROUP_ID = 1; + IPMC_GROUP_MEMBER_ATTR_IPMC_OUTPUT_ID = 2; +} + +message CreateIpmcGroupRequest { + uint64 switch = 1; +} + +message CreateIpmcGroupResponse { + uint64 oid = 1; +} + +message RemoveIpmcGroupRequest { + uint64 oid = 1; +} + +message RemoveIpmcGroupResponse {} + +message GetIpmcGroupAttributeRequest { + uint64 oid = 1; + IpmcGroupAttr attr_type = 2; +} + +message GetIpmcGroupAttributeResponse { + IpmcGroupAttribute attr = 1; +} + +message CreateIpmcGroupMemberRequest { + uint64 switch = 1; + + uint64 ipmc_group_id = 2; + uint64 ipmc_output_id = 3; +} + +message CreateIpmcGroupMemberResponse { + uint64 oid = 1; +} + +message RemoveIpmcGroupMemberRequest { + uint64 oid = 1; +} + +message RemoveIpmcGroupMemberResponse {} + +message GetIpmcGroupMemberAttributeRequest { + uint64 oid = 1; + IpmcGroupMemberAttr attr_type = 2; +} + +message GetIpmcGroupMemberAttributeResponse { + IpmcGroupMemberAttribute attr = 1; +} + +service IpmcGroup { + rpc CreateIpmcGroup(CreateIpmcGroupRequest) + returns (CreateIpmcGroupResponse) {} + rpc RemoveIpmcGroup(RemoveIpmcGroupRequest) + returns (RemoveIpmcGroupResponse) {} + rpc GetIpmcGroupAttribute(GetIpmcGroupAttributeRequest) + returns (GetIpmcGroupAttributeResponse) {} + rpc CreateIpmcGroupMember(CreateIpmcGroupMemberRequest) + returns (CreateIpmcGroupMemberResponse) {} + rpc RemoveIpmcGroupMember(RemoveIpmcGroupMemberRequest) + returns (RemoveIpmcGroupMemberResponse) {} + rpc GetIpmcGroupMemberAttribute(GetIpmcGroupMemberAttributeRequest) + returns (GetIpmcGroupMemberAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/ipsec.proto b/dataplane/standalone/proto/ipsec.proto new file mode 100644 index 00000000..2424dc34 --- /dev/null +++ b/dataplane/standalone/proto/ipsec.proto @@ -0,0 +1,236 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum IpsecAttr { + IPSEC_ATTR_UNSPECIFIED = 0; + IPSEC_ATTR_TERM_REMOTE_IP_MATCH_SUPPORTED = 1; + IPSEC_ATTR_SWITCHING_MODE_CUT_THROUGH_SUPPORTED = 2; + IPSEC_ATTR_SWITCHING_MODE_STORE_AND_FORWARD_SUPPORTED = 3; + IPSEC_ATTR_STATS_MODE_READ_SUPPORTED = 4; + IPSEC_ATTR_STATS_MODE_READ_CLEAR_SUPPORTED = 5; + IPSEC_ATTR_SN_32BIT_SUPPORTED = 6; + IPSEC_ATTR_ESN_64BIT_SUPPORTED = 7; + IPSEC_ATTR_SUPPORTED_CIPHER_LIST = 8; + IPSEC_ATTR_SYSTEM_SIDE_MTU = 9; + IPSEC_ATTR_WARM_BOOT_SUPPORTED = 10; + IPSEC_ATTR_WARM_BOOT_ENABLE = 11; + IPSEC_ATTR_EXTERNAL_SA_INDEX_ENABLE = 12; + IPSEC_ATTR_CTAG_TPID = 13; + IPSEC_ATTR_STAG_TPID = 14; + IPSEC_ATTR_MAX_VLAN_TAGS_PARSED = 15; + IPSEC_ATTR_OCTET_COUNT_HIGH_WATERMARK = 16; + IPSEC_ATTR_OCTET_COUNT_LOW_WATERMARK = 17; + IPSEC_ATTR_STATS_MODE = 18; + IPSEC_ATTR_AVAILABLE_IPSEC_SA = 19; + IPSEC_ATTR_SA_LIST = 20; +} + +enum IpsecPortAttr { + IPSEC_PORT_ATTR_UNSPECIFIED = 0; + IPSEC_PORT_ATTR_PORT_ID = 1; + IPSEC_PORT_ATTR_CTAG_ENABLE = 2; + IPSEC_PORT_ATTR_STAG_ENABLE = 3; + IPSEC_PORT_ATTR_NATIVE_VLAN_ID = 4; + IPSEC_PORT_ATTR_VRF_FROM_PACKET_VLAN_ENABLE = 5; + IPSEC_PORT_ATTR_SWITCH_SWITCHING_MODE = 6; +} + +enum IpsecSaAttr { + IPSEC_SA_ATTR_UNSPECIFIED = 0; + IPSEC_SA_ATTR_IPSEC_DIRECTION = 1; + IPSEC_SA_ATTR_IPSEC_ID = 2; + IPSEC_SA_ATTR_OCTET_COUNT_STATUS = 3; + IPSEC_SA_ATTR_EXTERNAL_SA_INDEX = 4; + IPSEC_SA_ATTR_SA_INDEX = 5; + IPSEC_SA_ATTR_IPSEC_PORT_LIST = 6; + IPSEC_SA_ATTR_IPSEC_SPI = 7; + IPSEC_SA_ATTR_IPSEC_ESN_ENABLE = 8; + IPSEC_SA_ATTR_IPSEC_CIPHER = 9; + IPSEC_SA_ATTR_ENCRYPT_KEY = 10; + IPSEC_SA_ATTR_SALT = 11; + IPSEC_SA_ATTR_AUTH_KEY = 12; + IPSEC_SA_ATTR_IPSEC_REPLAY_PROTECTION_ENABLE = 13; + IPSEC_SA_ATTR_IPSEC_REPLAY_PROTECTION_WINDOW = 14; + IPSEC_SA_ATTR_TERM_DST_IP = 15; + IPSEC_SA_ATTR_TERM_VLAN_ID_ENABLE = 16; + IPSEC_SA_ATTR_TERM_VLAN_ID = 17; + IPSEC_SA_ATTR_TERM_SRC_IP_ENABLE = 18; + IPSEC_SA_ATTR_TERM_SRC_IP = 19; + IPSEC_SA_ATTR_EGRESS_ESN = 20; + IPSEC_SA_ATTR_MINIMUM_INGRESS_ESN = 21; +} + +message CreateIpsecRequest { + uint64 switch = 1; + + bool warm_boot_enable = 2; + bool external_sa_index_enable = 3; + uint32 ctag_tpid = 4; + uint32 stag_tpid = 5; + uint32 max_vlan_tags_parsed = 6; + uint64 octet_count_high_watermark = 7; + uint64 octet_count_low_watermark = 8; + StatsMode stats_mode = 9; +} + +message CreateIpsecResponse { + uint64 oid = 1; +} + +message RemoveIpsecRequest { + uint64 oid = 1; +} + +message RemoveIpsecResponse {} + +message SetIpsecAttributeRequest { + uint64 oid = 1; + oneof attr { + bool warm_boot_enable = 2; + uint32 ctag_tpid = 3; + uint32 stag_tpid = 4; + uint32 max_vlan_tags_parsed = 5; + uint64 octet_count_high_watermark = 6; + uint64 octet_count_low_watermark = 7; + StatsMode stats_mode = 8; + } +} + +message SetIpsecAttributeResponse {} + +message GetIpsecAttributeRequest { + uint64 oid = 1; + IpsecAttr attr_type = 2; +} + +message GetIpsecAttributeResponse { + IpsecAttribute attr = 1; +} + +message CreateIpsecPortRequest { + uint64 switch = 1; + + uint64 port_id = 2; + bool ctag_enable = 3; + bool stag_enable = 4; + uint32 native_vlan_id = 5; + bool vrf_from_packet_vlan_enable = 6; + SwitchSwitchingMode switch_switching_mode = 7; +} + +message CreateIpsecPortResponse { + uint64 oid = 1; +} + +message RemoveIpsecPortRequest { + uint64 oid = 1; +} + +message RemoveIpsecPortResponse {} + +message SetIpsecPortAttributeRequest { + uint64 oid = 1; + oneof attr { + bool ctag_enable = 2; + bool stag_enable = 3; + bool vrf_from_packet_vlan_enable = 4; + SwitchSwitchingMode switch_switching_mode = 5; + } +} + +message SetIpsecPortAttributeResponse {} + +message GetIpsecPortAttributeRequest { + uint64 oid = 1; + IpsecPortAttr attr_type = 2; +} + +message GetIpsecPortAttributeResponse { + IpsecPortAttribute attr = 1; +} + +message CreateIpsecSaRequest { + uint64 switch = 1; + + IpsecDirection ipsec_direction = 2; + uint64 ipsec_id = 3; + uint32 external_sa_index = 4; + repeated uint64 ipsec_port_list = 5; + uint32 ipsec_spi = 6; + bool ipsec_esn_enable = 7; + IpsecCipher ipsec_cipher = 8; + bytes encrypt_key = 9; + uint32 salt = 10; + bytes auth_key = 11; + bool ipsec_replay_protection_enable = 12; + uint32 ipsec_replay_protection_window = 13; + bytes term_dst_ip = 14; + bool term_vlan_id_enable = 15; + uint32 term_vlan_id = 16; + bool term_src_ip_enable = 17; + bytes term_src_ip = 18; + uint64 egress_esn = 19; + uint64 minimum_ingress_esn = 20; +} + +message CreateIpsecSaResponse { + uint64 oid = 1; +} + +message RemoveIpsecSaRequest { + uint64 oid = 1; +} + +message RemoveIpsecSaResponse {} + +message SetIpsecSaAttributeRequest { + uint64 oid = 1; + oneof attr { + uint32 external_sa_index = 2; + Uint64List ipsec_port_list = 3; + bool ipsec_replay_protection_enable = 4; + uint32 ipsec_replay_protection_window = 5; + uint64 egress_esn = 6; + uint64 minimum_ingress_esn = 7; + } +} + +message SetIpsecSaAttributeResponse {} + +message GetIpsecSaAttributeRequest { + uint64 oid = 1; + IpsecSaAttr attr_type = 2; +} + +message GetIpsecSaAttributeResponse { + IpsecSaAttribute attr = 1; +} + +service Ipsec { + rpc CreateIpsec(CreateIpsecRequest) returns (CreateIpsecResponse) {} + rpc RemoveIpsec(RemoveIpsecRequest) returns (RemoveIpsecResponse) {} + rpc SetIpsecAttribute(SetIpsecAttributeRequest) + returns (SetIpsecAttributeResponse) {} + rpc GetIpsecAttribute(GetIpsecAttributeRequest) + returns (GetIpsecAttributeResponse) {} + rpc CreateIpsecPort(CreateIpsecPortRequest) + returns (CreateIpsecPortResponse) {} + rpc RemoveIpsecPort(RemoveIpsecPortRequest) + returns (RemoveIpsecPortResponse) {} + rpc SetIpsecPortAttribute(SetIpsecPortAttributeRequest) + returns (SetIpsecPortAttributeResponse) {} + rpc GetIpsecPortAttribute(GetIpsecPortAttributeRequest) + returns (GetIpsecPortAttributeResponse) {} + rpc CreateIpsecSa(CreateIpsecSaRequest) returns (CreateIpsecSaResponse) {} + rpc RemoveIpsecSa(RemoveIpsecSaRequest) returns (RemoveIpsecSaResponse) {} + rpc SetIpsecSaAttribute(SetIpsecSaAttributeRequest) + returns (SetIpsecSaAttributeResponse) {} + rpc GetIpsecSaAttribute(GetIpsecSaAttributeRequest) + returns (GetIpsecSaAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/isolation_group.proto b/dataplane/standalone/proto/isolation_group.proto new file mode 100644 index 00000000..3f877d11 --- /dev/null +++ b/dataplane/standalone/proto/isolation_group.proto @@ -0,0 +1,86 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum IsolationGroupAttr { + ISOLATION_GROUP_ATTR_UNSPECIFIED = 0; + ISOLATION_GROUP_ATTR_TYPE = 1; + ISOLATION_GROUP_ATTR_ISOLATION_MEMBER_LIST = 2; +} + +enum IsolationGroupMemberAttr { + ISOLATION_GROUP_MEMBER_ATTR_UNSPECIFIED = 0; + ISOLATION_GROUP_MEMBER_ATTR_ISOLATION_GROUP_ID = 1; + ISOLATION_GROUP_MEMBER_ATTR_ISOLATION_OBJECT = 2; +} + +message CreateIsolationGroupRequest { + uint64 switch = 1; + + IsolationGroupType type = 2; +} + +message CreateIsolationGroupResponse { + uint64 oid = 1; +} + +message RemoveIsolationGroupRequest { + uint64 oid = 1; +} + +message RemoveIsolationGroupResponse {} + +message GetIsolationGroupAttributeRequest { + uint64 oid = 1; + IsolationGroupAttr attr_type = 2; +} + +message GetIsolationGroupAttributeResponse { + IsolationGroupAttribute attr = 1; +} + +message CreateIsolationGroupMemberRequest { + uint64 switch = 1; + + uint64 isolation_group_id = 2; + uint64 isolation_object = 3; +} + +message CreateIsolationGroupMemberResponse { + uint64 oid = 1; +} + +message RemoveIsolationGroupMemberRequest { + uint64 oid = 1; +} + +message RemoveIsolationGroupMemberResponse {} + +message GetIsolationGroupMemberAttributeRequest { + uint64 oid = 1; + IsolationGroupMemberAttr attr_type = 2; +} + +message GetIsolationGroupMemberAttributeResponse { + IsolationGroupMemberAttribute attr = 1; +} + +service IsolationGroup { + rpc CreateIsolationGroup(CreateIsolationGroupRequest) + returns (CreateIsolationGroupResponse) {} + rpc RemoveIsolationGroup(RemoveIsolationGroupRequest) + returns (RemoveIsolationGroupResponse) {} + rpc GetIsolationGroupAttribute(GetIsolationGroupAttributeRequest) + returns (GetIsolationGroupAttributeResponse) {} + rpc CreateIsolationGroupMember(CreateIsolationGroupMemberRequest) + returns (CreateIsolationGroupMemberResponse) {} + rpc RemoveIsolationGroupMember(RemoveIsolationGroupMemberRequest) + returns (RemoveIsolationGroupMemberResponse) {} + rpc GetIsolationGroupMemberAttribute(GetIsolationGroupMemberAttributeRequest) + returns (GetIsolationGroupMemberAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/l2mc.proto b/dataplane/standalone/proto/l2mc.proto new file mode 100644 index 00000000..bc4eed14 --- /dev/null +++ b/dataplane/standalone/proto/l2mc.proto @@ -0,0 +1,61 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum L2mcEntryAttr { + L2MC_ENTRY_ATTR_UNSPECIFIED = 0; + L2MC_ENTRY_ATTR_PACKET_ACTION = 1; + L2MC_ENTRY_ATTR_OUTPUT_GROUP_ID = 2; +} + +message CreateL2mcEntryRequest { + L2mcEntry entry = 1; + + PacketAction packet_action = 2; + uint64 output_group_id = 3; +} + +message CreateL2mcEntryResponse { + uint64 oid = 1; +} + +message RemoveL2mcEntryRequest { + L2mcEntry entry = 1; +} + +message RemoveL2mcEntryResponse {} + +message SetL2mcEntryAttributeRequest { + L2mcEntry entry = 1; + oneof attr { + PacketAction packet_action = 2; + uint64 output_group_id = 3; + } +} + +message SetL2mcEntryAttributeResponse {} + +message GetL2mcEntryAttributeRequest { + L2mcEntry entry = 1; + L2mcEntryAttr attr_type = 2; +} + +message GetL2mcEntryAttributeResponse { + L2mcEntryAttribute attr = 1; +} + +service L2mc { + rpc CreateL2mcEntry(CreateL2mcEntryRequest) + returns (CreateL2mcEntryResponse) {} + rpc RemoveL2mcEntry(RemoveL2mcEntryRequest) + returns (RemoveL2mcEntryResponse) {} + rpc SetL2mcEntryAttribute(SetL2mcEntryAttributeRequest) + returns (SetL2mcEntryAttributeResponse) {} + rpc GetL2mcEntryAttribute(GetL2mcEntryAttributeRequest) + returns (GetL2mcEntryAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/l2mc_group.proto b/dataplane/standalone/proto/l2mc_group.proto new file mode 100644 index 00000000..29fd90e8 --- /dev/null +++ b/dataplane/standalone/proto/l2mc_group.proto @@ -0,0 +1,86 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum L2mcGroupAttr { + L2MC_GROUP_ATTR_UNSPECIFIED = 0; + L2MC_GROUP_ATTR_L2MC_OUTPUT_COUNT = 1; + L2MC_GROUP_ATTR_L2MC_MEMBER_LIST = 2; +} + +enum L2mcGroupMemberAttr { + L2MC_GROUP_MEMBER_ATTR_UNSPECIFIED = 0; + L2MC_GROUP_MEMBER_ATTR_L2MC_GROUP_ID = 1; + L2MC_GROUP_MEMBER_ATTR_L2MC_OUTPUT_ID = 2; + L2MC_GROUP_MEMBER_ATTR_L2MC_ENDPOINT_IP = 3; +} + +message CreateL2mcGroupRequest { + uint64 switch = 1; +} + +message CreateL2mcGroupResponse { + uint64 oid = 1; +} + +message RemoveL2mcGroupRequest { + uint64 oid = 1; +} + +message RemoveL2mcGroupResponse {} + +message GetL2mcGroupAttributeRequest { + uint64 oid = 1; + L2mcGroupAttr attr_type = 2; +} + +message GetL2mcGroupAttributeResponse { + L2mcGroupAttribute attr = 1; +} + +message CreateL2mcGroupMemberRequest { + uint64 switch = 1; + + uint64 l2mc_group_id = 2; + uint64 l2mc_output_id = 3; + bytes l2mc_endpoint_ip = 4; +} + +message CreateL2mcGroupMemberResponse { + uint64 oid = 1; +} + +message RemoveL2mcGroupMemberRequest { + uint64 oid = 1; +} + +message RemoveL2mcGroupMemberResponse {} + +message GetL2mcGroupMemberAttributeRequest { + uint64 oid = 1; + L2mcGroupMemberAttr attr_type = 2; +} + +message GetL2mcGroupMemberAttributeResponse { + L2mcGroupMemberAttribute attr = 1; +} + +service L2mcGroup { + rpc CreateL2mcGroup(CreateL2mcGroupRequest) + returns (CreateL2mcGroupResponse) {} + rpc RemoveL2mcGroup(RemoveL2mcGroupRequest) + returns (RemoveL2mcGroupResponse) {} + rpc GetL2mcGroupAttribute(GetL2mcGroupAttributeRequest) + returns (GetL2mcGroupAttributeResponse) {} + rpc CreateL2mcGroupMember(CreateL2mcGroupMemberRequest) + returns (CreateL2mcGroupMemberResponse) {} + rpc RemoveL2mcGroupMember(RemoveL2mcGroupMemberRequest) + returns (RemoveL2mcGroupMemberResponse) {} + rpc GetL2mcGroupMemberAttribute(GetL2mcGroupMemberAttributeRequest) + returns (GetL2mcGroupMemberAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/lag.proto b/dataplane/standalone/proto/lag.proto new file mode 100644 index 00000000..62de2f53 --- /dev/null +++ b/dataplane/standalone/proto/lag.proto @@ -0,0 +1,134 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum LagAttr { + LAG_ATTR_UNSPECIFIED = 0; + LAG_ATTR_PORT_LIST = 1; + LAG_ATTR_INGRESS_ACL = 2; + LAG_ATTR_EGRESS_ACL = 3; + LAG_ATTR_PORT_VLAN_ID = 4; + LAG_ATTR_DEFAULT_VLAN_PRIORITY = 5; + LAG_ATTR_DROP_UNTAGGED = 6; + LAG_ATTR_DROP_TAGGED = 7; + LAG_ATTR_TPID = 8; + LAG_ATTR_SYSTEM_PORT_AGGREGATE_ID = 9; + LAG_ATTR_LABEL = 10; +} + +enum LagMemberAttr { + LAG_MEMBER_ATTR_UNSPECIFIED = 0; + LAG_MEMBER_ATTR_LAG_ID = 1; + LAG_MEMBER_ATTR_PORT_ID = 2; + LAG_MEMBER_ATTR_EGRESS_DISABLE = 3; + LAG_MEMBER_ATTR_INGRESS_DISABLE = 4; +} + +message CreateLagRequest { + uint64 switch = 1; + + uint64 ingress_acl = 2; + uint64 egress_acl = 3; + uint32 port_vlan_id = 4; + uint32 default_vlan_priority = 5; + bool drop_untagged = 6; + bool drop_tagged = 7; + uint32 tpid = 8; + uint32 system_port_aggregate_id = 9; + bytes label = 10; +} + +message CreateLagResponse { + uint64 oid = 1; +} + +message RemoveLagRequest { + uint64 oid = 1; +} + +message RemoveLagResponse {} + +message SetLagAttributeRequest { + uint64 oid = 1; + oneof attr { + uint64 ingress_acl = 2; + uint64 egress_acl = 3; + uint32 port_vlan_id = 4; + uint32 default_vlan_priority = 5; + bool drop_untagged = 6; + bool drop_tagged = 7; + uint32 tpid = 8; + bytes label = 9; + } +} + +message SetLagAttributeResponse {} + +message GetLagAttributeRequest { + uint64 oid = 1; + LagAttr attr_type = 2; +} + +message GetLagAttributeResponse { + LagAttribute attr = 1; +} + +message CreateLagMemberRequest { + uint64 switch = 1; + + uint64 lag_id = 2; + uint64 port_id = 3; + bool egress_disable = 4; + bool ingress_disable = 5; +} + +message CreateLagMemberResponse { + uint64 oid = 1; +} + +message RemoveLagMemberRequest { + uint64 oid = 1; +} + +message RemoveLagMemberResponse {} + +message SetLagMemberAttributeRequest { + uint64 oid = 1; + oneof attr { + bool egress_disable = 2; + bool ingress_disable = 3; + } +} + +message SetLagMemberAttributeResponse {} + +message GetLagMemberAttributeRequest { + uint64 oid = 1; + LagMemberAttr attr_type = 2; +} + +message GetLagMemberAttributeResponse { + LagMemberAttribute attr = 1; +} + +service Lag { + rpc CreateLag(CreateLagRequest) returns (CreateLagResponse) {} + rpc RemoveLag(RemoveLagRequest) returns (RemoveLagResponse) {} + rpc SetLagAttribute(SetLagAttributeRequest) + returns (SetLagAttributeResponse) {} + rpc GetLagAttribute(GetLagAttributeRequest) + returns (GetLagAttributeResponse) {} + rpc CreateLagMember(CreateLagMemberRequest) + returns (CreateLagMemberResponse) {} + rpc RemoveLagMember(RemoveLagMemberRequest) + returns (RemoveLagMemberResponse) {} + rpc SetLagMemberAttribute(SetLagMemberAttributeRequest) + returns (SetLagMemberAttributeResponse) {} + rpc GetLagMemberAttribute(GetLagMemberAttributeRequest) + returns (GetLagMemberAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/macsec.proto b/dataplane/standalone/proto/macsec.proto new file mode 100644 index 00000000..3c51496f --- /dev/null +++ b/dataplane/standalone/proto/macsec.proto @@ -0,0 +1,317 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum MacsecAttr { + MACSEC_ATTR_UNSPECIFIED = 0; + MACSEC_ATTR_DIRECTION = 1; + MACSEC_ATTR_SWITCHING_MODE_CUT_THROUGH_SUPPORTED = 2; + MACSEC_ATTR_SWITCHING_MODE_STORE_AND_FORWARD_SUPPORTED = 3; + MACSEC_ATTR_STATS_MODE_READ_SUPPORTED = 4; + MACSEC_ATTR_STATS_MODE_READ_CLEAR_SUPPORTED = 5; + MACSEC_ATTR_SCI_IN_INGRESS_MACSEC_ACL = 6; + MACSEC_ATTR_SUPPORTED_CIPHER_SUITE_LIST = 7; + MACSEC_ATTR_PN_32BIT_SUPPORTED = 8; + MACSEC_ATTR_XPN_64BIT_SUPPORTED = 9; + MACSEC_ATTR_GCM_AES128_SUPPORTED = 10; + MACSEC_ATTR_GCM_AES256_SUPPORTED = 11; + MACSEC_ATTR_SECTAG_OFFSETS_SUPPORTED = 12; + MACSEC_ATTR_SYSTEM_SIDE_MTU = 13; + MACSEC_ATTR_WARM_BOOT_SUPPORTED = 14; + MACSEC_ATTR_WARM_BOOT_ENABLE = 15; + MACSEC_ATTR_CTAG_TPID = 16; + MACSEC_ATTR_STAG_TPID = 17; + MACSEC_ATTR_MAX_VLAN_TAGS_PARSED = 18; + MACSEC_ATTR_STATS_MODE = 19; + MACSEC_ATTR_PHYSICAL_BYPASS_ENABLE = 20; + MACSEC_ATTR_SUPPORTED_PORT_LIST = 21; + MACSEC_ATTR_AVAILABLE_MACSEC_FLOW = 22; + MACSEC_ATTR_FLOW_LIST = 23; + MACSEC_ATTR_AVAILABLE_MACSEC_SC = 24; + MACSEC_ATTR_AVAILABLE_MACSEC_SA = 25; +} + +enum MacsecFlowAttr { + MACSEC_FLOW_ATTR_UNSPECIFIED = 0; + MACSEC_FLOW_ATTR_MACSEC_DIRECTION = 1; + MACSEC_FLOW_ATTR_ACL_ENTRY_LIST = 2; + MACSEC_FLOW_ATTR_SC_LIST = 3; +} + +enum MacsecPortAttr { + MACSEC_PORT_ATTR_UNSPECIFIED = 0; + MACSEC_PORT_ATTR_MACSEC_DIRECTION = 1; + MACSEC_PORT_ATTR_PORT_ID = 2; + MACSEC_PORT_ATTR_CTAG_ENABLE = 3; + MACSEC_PORT_ATTR_STAG_ENABLE = 4; + MACSEC_PORT_ATTR_SWITCH_SWITCHING_MODE = 5; +} + +enum MacsecSaAttr { + MACSEC_SA_ATTR_UNSPECIFIED = 0; + MACSEC_SA_ATTR_MACSEC_DIRECTION = 1; + MACSEC_SA_ATTR_SC_ID = 2; + MACSEC_SA_ATTR_AN = 3; + MACSEC_SA_ATTR_SAK = 4; + MACSEC_SA_ATTR_SALT = 5; + MACSEC_SA_ATTR_AUTH_KEY = 6; + MACSEC_SA_ATTR_CONFIGURED_EGRESS_XPN = 7; + MACSEC_SA_ATTR_CURRENT_XPN = 8; + MACSEC_SA_ATTR_MINIMUM_INGRESS_XPN = 9; + MACSEC_SA_ATTR_MACSEC_SSCI = 10; +} + +enum MacsecScAttr { + MACSEC_SC_ATTR_UNSPECIFIED = 0; + MACSEC_SC_ATTR_MACSEC_DIRECTION = 1; + MACSEC_SC_ATTR_FLOW_ID = 2; + MACSEC_SC_ATTR_MACSEC_SCI = 3; + MACSEC_SC_ATTR_MACSEC_EXPLICIT_SCI_ENABLE = 4; + MACSEC_SC_ATTR_MACSEC_SECTAG_OFFSET = 5; + MACSEC_SC_ATTR_ACTIVE_EGRESS_SA_ID = 6; + MACSEC_SC_ATTR_MACSEC_REPLAY_PROTECTION_ENABLE = 7; + MACSEC_SC_ATTR_MACSEC_REPLAY_PROTECTION_WINDOW = 8; + MACSEC_SC_ATTR_SA_LIST = 9; + MACSEC_SC_ATTR_MACSEC_CIPHER_SUITE = 10; + MACSEC_SC_ATTR_ENCRYPTION_ENABLE = 11; +} + +message CreateMacsecRequest { + uint64 switch = 1; + + MacsecDirection direction = 2; + bool warm_boot_enable = 3; + uint32 ctag_tpid = 4; + uint32 stag_tpid = 5; + uint32 max_vlan_tags_parsed = 6; + StatsMode stats_mode = 7; + bool physical_bypass_enable = 8; +} + +message CreateMacsecResponse { + uint64 oid = 1; +} + +message RemoveMacsecRequest { + uint64 oid = 1; +} + +message RemoveMacsecResponse {} + +message SetMacsecAttributeRequest { + uint64 oid = 1; + oneof attr { + bool warm_boot_enable = 2; + uint32 ctag_tpid = 3; + uint32 stag_tpid = 4; + uint32 max_vlan_tags_parsed = 5; + StatsMode stats_mode = 6; + bool physical_bypass_enable = 7; + } +} + +message SetMacsecAttributeResponse {} + +message GetMacsecAttributeRequest { + uint64 oid = 1; + MacsecAttr attr_type = 2; +} + +message GetMacsecAttributeResponse { + MacsecAttribute attr = 1; +} + +message CreateMacsecPortRequest { + uint64 switch = 1; + + MacsecDirection macsec_direction = 2; + uint64 port_id = 3; + bool ctag_enable = 4; + bool stag_enable = 5; + SwitchSwitchingMode switch_switching_mode = 6; +} + +message CreateMacsecPortResponse { + uint64 oid = 1; +} + +message RemoveMacsecPortRequest { + uint64 oid = 1; +} + +message RemoveMacsecPortResponse {} + +message SetMacsecPortAttributeRequest { + uint64 oid = 1; + oneof attr { + bool ctag_enable = 2; + bool stag_enable = 3; + SwitchSwitchingMode switch_switching_mode = 4; + } +} + +message SetMacsecPortAttributeResponse {} + +message GetMacsecPortAttributeRequest { + uint64 oid = 1; + MacsecPortAttr attr_type = 2; +} + +message GetMacsecPortAttributeResponse { + MacsecPortAttribute attr = 1; +} + +message CreateMacsecFlowRequest { + uint64 switch = 1; + + MacsecDirection macsec_direction = 2; +} + +message CreateMacsecFlowResponse { + uint64 oid = 1; +} + +message RemoveMacsecFlowRequest { + uint64 oid = 1; +} + +message RemoveMacsecFlowResponse {} + +message GetMacsecFlowAttributeRequest { + uint64 oid = 1; + MacsecFlowAttr attr_type = 2; +} + +message GetMacsecFlowAttributeResponse { + MacsecFlowAttribute attr = 1; +} + +message CreateMacsecScRequest { + uint64 switch = 1; + + MacsecDirection macsec_direction = 2; + uint64 flow_id = 3; + uint64 macsec_sci = 4; + bool macsec_explicit_sci_enable = 5; + uint32 macsec_sectag_offset = 6; + bool macsec_replay_protection_enable = 7; + uint32 macsec_replay_protection_window = 8; + MacsecCipherSuite macsec_cipher_suite = 9; + bool encryption_enable = 10; +} + +message CreateMacsecScResponse { + uint64 oid = 1; +} + +message RemoveMacsecScRequest { + uint64 oid = 1; +} + +message RemoveMacsecScResponse {} + +message SetMacsecScAttributeRequest { + uint64 oid = 1; + oneof attr { + bool macsec_explicit_sci_enable = 2; + uint32 macsec_sectag_offset = 3; + bool macsec_replay_protection_enable = 4; + uint32 macsec_replay_protection_window = 5; + MacsecCipherSuite macsec_cipher_suite = 6; + bool encryption_enable = 7; + } +} + +message SetMacsecScAttributeResponse {} + +message GetMacsecScAttributeRequest { + uint64 oid = 1; + MacsecScAttr attr_type = 2; +} + +message GetMacsecScAttributeResponse { + MacsecScAttribute attr = 1; +} + +message CreateMacsecSaRequest { + uint64 switch = 1; + + MacsecDirection macsec_direction = 2; + uint64 sc_id = 3; + uint32 an = 4; + bytes sak = 5; + bytes salt = 6; + bytes auth_key = 7; + uint64 configured_egress_xpn = 8; + uint64 minimum_ingress_xpn = 9; + uint32 macsec_ssci = 10; +} + +message CreateMacsecSaResponse { + uint64 oid = 1; +} + +message RemoveMacsecSaRequest { + uint64 oid = 1; +} + +message RemoveMacsecSaResponse {} + +message SetMacsecSaAttributeRequest { + uint64 oid = 1; + oneof attr { + uint64 configured_egress_xpn = 2; + uint64 minimum_ingress_xpn = 3; + } +} + +message SetMacsecSaAttributeResponse {} + +message GetMacsecSaAttributeRequest { + uint64 oid = 1; + MacsecSaAttr attr_type = 2; +} + +message GetMacsecSaAttributeResponse { + MacsecSaAttribute attr = 1; +} + +service Macsec { + rpc CreateMacsec(CreateMacsecRequest) returns (CreateMacsecResponse) {} + rpc RemoveMacsec(RemoveMacsecRequest) returns (RemoveMacsecResponse) {} + rpc SetMacsecAttribute(SetMacsecAttributeRequest) + returns (SetMacsecAttributeResponse) {} + rpc GetMacsecAttribute(GetMacsecAttributeRequest) + returns (GetMacsecAttributeResponse) {} + rpc CreateMacsecPort(CreateMacsecPortRequest) + returns (CreateMacsecPortResponse) {} + rpc RemoveMacsecPort(RemoveMacsecPortRequest) + returns (RemoveMacsecPortResponse) {} + rpc SetMacsecPortAttribute(SetMacsecPortAttributeRequest) + returns (SetMacsecPortAttributeResponse) {} + rpc GetMacsecPortAttribute(GetMacsecPortAttributeRequest) + returns (GetMacsecPortAttributeResponse) {} + rpc CreateMacsecFlow(CreateMacsecFlowRequest) + returns (CreateMacsecFlowResponse) {} + rpc RemoveMacsecFlow(RemoveMacsecFlowRequest) + returns (RemoveMacsecFlowResponse) {} + rpc GetMacsecFlowAttribute(GetMacsecFlowAttributeRequest) + returns (GetMacsecFlowAttributeResponse) {} + rpc CreateMacsecSc(CreateMacsecScRequest) returns (CreateMacsecScResponse) {} + rpc RemoveMacsecSc(RemoveMacsecScRequest) returns (RemoveMacsecScResponse) {} + rpc SetMacsecScAttribute(SetMacsecScAttributeRequest) + returns (SetMacsecScAttributeResponse) {} + rpc GetMacsecScAttribute(GetMacsecScAttributeRequest) + returns (GetMacsecScAttributeResponse) {} + rpc CreateMacsecSa(CreateMacsecSaRequest) returns (CreateMacsecSaResponse) {} + rpc RemoveMacsecSa(RemoveMacsecSaRequest) returns (RemoveMacsecSaResponse) {} + rpc SetMacsecSaAttribute(SetMacsecSaAttributeRequest) + returns (SetMacsecSaAttributeResponse) {} + rpc GetMacsecSaAttribute(GetMacsecSaAttributeRequest) + returns (GetMacsecSaAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/mcast_fdb.proto b/dataplane/standalone/proto/mcast_fdb.proto new file mode 100644 index 00000000..ca2eee3a --- /dev/null +++ b/dataplane/standalone/proto/mcast_fdb.proto @@ -0,0 +1,64 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum McastFdbEntryAttr { + MCAST_FDB_ENTRY_ATTR_UNSPECIFIED = 0; + MCAST_FDB_ENTRY_ATTR_GROUP_ID = 1; + MCAST_FDB_ENTRY_ATTR_PACKET_ACTION = 2; + MCAST_FDB_ENTRY_ATTR_META_DATA = 3; +} + +message CreateMcastFdbEntryRequest { + McastFdbEntry entry = 1; + + uint64 group_id = 2; + PacketAction packet_action = 3; + uint32 meta_data = 4; +} + +message CreateMcastFdbEntryResponse { + uint64 oid = 1; +} + +message RemoveMcastFdbEntryRequest { + McastFdbEntry entry = 1; +} + +message RemoveMcastFdbEntryResponse {} + +message SetMcastFdbEntryAttributeRequest { + McastFdbEntry entry = 1; + oneof attr { + uint64 group_id = 2; + PacketAction packet_action = 3; + uint32 meta_data = 4; + } +} + +message SetMcastFdbEntryAttributeResponse {} + +message GetMcastFdbEntryAttributeRequest { + McastFdbEntry entry = 1; + McastFdbEntryAttr attr_type = 2; +} + +message GetMcastFdbEntryAttributeResponse { + McastFdbEntryAttribute attr = 1; +} + +service McastFdb { + rpc CreateMcastFdbEntry(CreateMcastFdbEntryRequest) + returns (CreateMcastFdbEntryResponse) {} + rpc RemoveMcastFdbEntry(RemoveMcastFdbEntryRequest) + returns (RemoveMcastFdbEntryResponse) {} + rpc SetMcastFdbEntryAttribute(SetMcastFdbEntryAttributeRequest) + returns (SetMcastFdbEntryAttributeResponse) {} + rpc GetMcastFdbEntryAttribute(GetMcastFdbEntryAttributeRequest) + returns (GetMcastFdbEntryAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/mirror.proto b/dataplane/standalone/proto/mirror.proto new file mode 100644 index 00000000..d8201383 --- /dev/null +++ b/dataplane/standalone/proto/mirror.proto @@ -0,0 +1,127 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum MirrorSessionAttr { + MIRROR_SESSION_ATTR_UNSPECIFIED = 0; + MIRROR_SESSION_ATTR_TYPE = 1; + MIRROR_SESSION_ATTR_MONITOR_PORT = 2; + MIRROR_SESSION_ATTR_TRUNCATE_SIZE = 3; + MIRROR_SESSION_ATTR_SAMPLE_RATE = 4; + MIRROR_SESSION_ATTR_CONGESTION_MODE = 5; + MIRROR_SESSION_ATTR_TC = 6; + MIRROR_SESSION_ATTR_VLAN_TPID = 7; + MIRROR_SESSION_ATTR_VLAN_ID = 8; + MIRROR_SESSION_ATTR_VLAN_PRI = 9; + MIRROR_SESSION_ATTR_VLAN_CFI = 10; + MIRROR_SESSION_ATTR_VLAN_HEADER_VALID = 11; + MIRROR_SESSION_ATTR_ERSPAN_ENCAPSULATION_TYPE = 12; + MIRROR_SESSION_ATTR_IPHDR_VERSION = 13; + MIRROR_SESSION_ATTR_TOS = 14; + MIRROR_SESSION_ATTR_TTL = 15; + MIRROR_SESSION_ATTR_SRC_IP_ADDRESS = 16; + MIRROR_SESSION_ATTR_DST_IP_ADDRESS = 17; + MIRROR_SESSION_ATTR_SRC_MAC_ADDRESS = 18; + MIRROR_SESSION_ATTR_DST_MAC_ADDRESS = 19; + MIRROR_SESSION_ATTR_GRE_PROTOCOL_TYPE = 20; + MIRROR_SESSION_ATTR_MONITOR_PORTLIST_VALID = 21; + MIRROR_SESSION_ATTR_MONITOR_PORTLIST = 22; + MIRROR_SESSION_ATTR_POLICER = 23; + MIRROR_SESSION_ATTR_UDP_SRC_PORT = 24; + MIRROR_SESSION_ATTR_UDP_DST_PORT = 25; +} + +message CreateMirrorSessionRequest { + uint64 switch = 1; + + MirrorSessionType type = 2; + uint64 monitor_port = 3; + uint32 truncate_size = 4; + uint32 sample_rate = 5; + MirrorSessionCongestionMode congestion_mode = 6; + uint32 tc = 7; + uint32 vlan_tpid = 8; + uint32 vlan_id = 9; + uint32 vlan_pri = 10; + uint32 vlan_cfi = 11; + bool vlan_header_valid = 12; + ErspanEncapsulationType erspan_encapsulation_type = 13; + uint32 iphdr_version = 14; + uint32 tos = 15; + uint32 ttl = 16; + bytes src_ip_address = 17; + bytes dst_ip_address = 18; + bytes src_mac_address = 19; + bytes dst_mac_address = 20; + uint32 gre_protocol_type = 21; + bool monitor_portlist_valid = 22; + repeated uint64 monitor_portlist = 23; + uint64 policer = 24; + uint32 udp_src_port = 25; + uint32 udp_dst_port = 26; +} + +message CreateMirrorSessionResponse { + uint64 oid = 1; +} + +message RemoveMirrorSessionRequest { + uint64 oid = 1; +} + +message RemoveMirrorSessionResponse {} + +message SetMirrorSessionAttributeRequest { + uint64 oid = 1; + oneof attr { + uint64 monitor_port = 2; + uint32 truncate_size = 3; + uint32 sample_rate = 4; + MirrorSessionCongestionMode congestion_mode = 5; + uint32 tc = 6; + uint32 vlan_tpid = 7; + uint32 vlan_id = 8; + uint32 vlan_pri = 9; + uint32 vlan_cfi = 10; + bool vlan_header_valid = 11; + uint32 iphdr_version = 12; + uint32 tos = 13; + uint32 ttl = 14; + bytes src_ip_address = 15; + bytes dst_ip_address = 16; + bytes src_mac_address = 17; + bytes dst_mac_address = 18; + uint32 gre_protocol_type = 19; + Uint64List monitor_portlist = 20; + uint64 policer = 21; + uint32 udp_src_port = 22; + uint32 udp_dst_port = 23; + } +} + +message SetMirrorSessionAttributeResponse {} + +message GetMirrorSessionAttributeRequest { + uint64 oid = 1; + MirrorSessionAttr attr_type = 2; +} + +message GetMirrorSessionAttributeResponse { + MirrorSessionAttribute attr = 1; +} + +service Mirror { + rpc CreateMirrorSession(CreateMirrorSessionRequest) + returns (CreateMirrorSessionResponse) {} + rpc RemoveMirrorSession(RemoveMirrorSessionRequest) + returns (RemoveMirrorSessionResponse) {} + rpc SetMirrorSessionAttribute(SetMirrorSessionAttributeRequest) + returns (SetMirrorSessionAttributeResponse) {} + rpc GetMirrorSessionAttribute(GetMirrorSessionAttributeRequest) + returns (GetMirrorSessionAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/mpls.proto b/dataplane/standalone/proto/mpls.proto new file mode 100644 index 00000000..94e722b0 --- /dev/null +++ b/dataplane/standalone/proto/mpls.proto @@ -0,0 +1,88 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum InsegEntryAttr { + INSEG_ENTRY_ATTR_UNSPECIFIED = 0; + INSEG_ENTRY_ATTR_NUM_OF_POP = 1; + INSEG_ENTRY_ATTR_PACKET_ACTION = 2; + INSEG_ENTRY_ATTR_TRAP_PRIORITY = 3; + INSEG_ENTRY_ATTR_NEXT_HOP_ID = 4; + INSEG_ENTRY_ATTR_PSC_TYPE = 5; + INSEG_ENTRY_ATTR_QOS_TC = 6; + INSEG_ENTRY_ATTR_MPLS_EXP_TO_TC_MAP = 7; + INSEG_ENTRY_ATTR_MPLS_EXP_TO_COLOR_MAP = 8; + INSEG_ENTRY_ATTR_POP_TTL_MODE = 9; + INSEG_ENTRY_ATTR_POP_QOS_MODE = 10; + INSEG_ENTRY_ATTR_COUNTER_ID = 11; +} + +message CreateInsegEntryRequest { + InsegEntry entry = 1; + + uint32 num_of_pop = 2; + PacketAction packet_action = 3; + uint32 trap_priority = 4; + uint64 next_hop_id = 5; + InsegEntryPscType psc_type = 6; + uint32 qos_tc = 7; + uint64 mpls_exp_to_tc_map = 8; + uint64 mpls_exp_to_color_map = 9; + InsegEntryPopTtlMode pop_ttl_mode = 10; + InsegEntryPopQosMode pop_qos_mode = 11; + uint64 counter_id = 12; +} + +message CreateInsegEntryResponse { + uint64 oid = 1; +} + +message RemoveInsegEntryRequest { + InsegEntry entry = 1; +} + +message RemoveInsegEntryResponse {} + +message SetInsegEntryAttributeRequest { + InsegEntry entry = 1; + oneof attr { + uint32 num_of_pop = 2; + PacketAction packet_action = 3; + uint32 trap_priority = 4; + uint64 next_hop_id = 5; + InsegEntryPscType psc_type = 6; + uint32 qos_tc = 7; + uint64 mpls_exp_to_tc_map = 8; + uint64 mpls_exp_to_color_map = 9; + InsegEntryPopTtlMode pop_ttl_mode = 10; + InsegEntryPopQosMode pop_qos_mode = 11; + uint64 counter_id = 12; + } +} + +message SetInsegEntryAttributeResponse {} + +message GetInsegEntryAttributeRequest { + InsegEntry entry = 1; + InsegEntryAttr attr_type = 2; +} + +message GetInsegEntryAttributeResponse { + InsegEntryAttribute attr = 1; +} + +service Mpls { + rpc CreateInsegEntry(CreateInsegEntryRequest) + returns (CreateInsegEntryResponse) {} + rpc RemoveInsegEntry(RemoveInsegEntryRequest) + returns (RemoveInsegEntryResponse) {} + rpc SetInsegEntryAttribute(SetInsegEntryAttributeRequest) + returns (SetInsegEntryAttributeResponse) {} + rpc GetInsegEntryAttribute(GetInsegEntryAttributeRequest) + returns (GetInsegEntryAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/my_mac.proto b/dataplane/standalone/proto/my_mac.proto new file mode 100644 index 00000000..34045bce --- /dev/null +++ b/dataplane/standalone/proto/my_mac.proto @@ -0,0 +1,64 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum MyMacAttr { + MY_MAC_ATTR_UNSPECIFIED = 0; + MY_MAC_ATTR_PRIORITY = 1; + MY_MAC_ATTR_PORT_ID = 2; + MY_MAC_ATTR_VLAN_ID = 3; + MY_MAC_ATTR_MAC_ADDRESS = 4; + MY_MAC_ATTR_MAC_ADDRESS_MASK = 5; +} + +message CreateMyMacRequest { + uint64 switch = 1; + + uint32 priority = 2; + uint64 port_id = 3; + uint32 vlan_id = 4; + bytes mac_address = 5; + bytes mac_address_mask = 6; +} + +message CreateMyMacResponse { + uint64 oid = 1; +} + +message RemoveMyMacRequest { + uint64 oid = 1; +} + +message RemoveMyMacResponse {} + +message SetMyMacAttributeRequest { + uint64 oid = 1; + oneof attr { + uint32 priority = 2; + } +} + +message SetMyMacAttributeResponse {} + +message GetMyMacAttributeRequest { + uint64 oid = 1; + MyMacAttr attr_type = 2; +} + +message GetMyMacAttributeResponse { + MyMacAttribute attr = 1; +} + +service MyMac { + rpc CreateMyMac(CreateMyMacRequest) returns (CreateMyMacResponse) {} + rpc RemoveMyMac(RemoveMyMacRequest) returns (RemoveMyMacResponse) {} + rpc SetMyMacAttribute(SetMyMacAttributeRequest) + returns (SetMyMacAttributeResponse) {} + rpc GetMyMacAttribute(GetMyMacAttributeRequest) + returns (GetMyMacAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/nat.proto b/dataplane/standalone/proto/nat.proto new file mode 100644 index 00000000..547561e4 --- /dev/null +++ b/dataplane/standalone/proto/nat.proto @@ -0,0 +1,160 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum NatEntryAttr { + NAT_ENTRY_ATTR_UNSPECIFIED = 0; + NAT_ENTRY_ATTR_NAT_TYPE = 1; + NAT_ENTRY_ATTR_SRC_IP = 2; + NAT_ENTRY_ATTR_SRC_IP_MASK = 3; + NAT_ENTRY_ATTR_VR_ID = 4; + NAT_ENTRY_ATTR_DST_IP = 5; + NAT_ENTRY_ATTR_DST_IP_MASK = 6; + NAT_ENTRY_ATTR_L4_SRC_PORT = 7; + NAT_ENTRY_ATTR_L4_DST_PORT = 8; + NAT_ENTRY_ATTR_ENABLE_PACKET_COUNT = 9; + NAT_ENTRY_ATTR_PACKET_COUNT = 10; + NAT_ENTRY_ATTR_ENABLE_BYTE_COUNT = 11; + NAT_ENTRY_ATTR_BYTE_COUNT = 12; + NAT_ENTRY_ATTR_HIT_BIT_COR = 13; + NAT_ENTRY_ATTR_HIT_BIT = 14; +} + +enum NatZoneCounterAttr { + NAT_ZONE_COUNTER_ATTR_UNSPECIFIED = 0; + NAT_ZONE_COUNTER_ATTR_NAT_TYPE = 1; + NAT_ZONE_COUNTER_ATTR_ZONE_ID = 2; + NAT_ZONE_COUNTER_ATTR_ENABLE_DISCARD = 3; + NAT_ZONE_COUNTER_ATTR_DISCARD_PACKET_COUNT = 4; + NAT_ZONE_COUNTER_ATTR_ENABLE_TRANSLATION_NEEDED = 5; + NAT_ZONE_COUNTER_ATTR_TRANSLATION_NEEDED_PACKET_COUNT = 6; + NAT_ZONE_COUNTER_ATTR_ENABLE_TRANSLATIONS = 7; + NAT_ZONE_COUNTER_ATTR_TRANSLATIONS_PACKET_COUNT = 8; +} + +message CreateNatEntryRequest { + NatEntry entry = 1; + + NatType nat_type = 2; + bytes src_ip = 3; + bytes src_ip_mask = 4; + uint64 vr_id = 5; + bytes dst_ip = 6; + bytes dst_ip_mask = 7; + uint32 l4_src_port = 8; + uint32 l4_dst_port = 9; + bool enable_packet_count = 10; + uint64 packet_count = 11; + bool enable_byte_count = 12; + uint64 byte_count = 13; + bool hit_bit_cor = 14; + bool hit_bit = 15; +} + +message CreateNatEntryResponse { + uint64 oid = 1; +} + +message RemoveNatEntryRequest { + NatEntry entry = 1; +} + +message RemoveNatEntryResponse {} + +message SetNatEntryAttributeRequest { + NatEntry entry = 1; + oneof attr { + NatType nat_type = 2; + bytes src_ip = 3; + bytes src_ip_mask = 4; + uint64 vr_id = 5; + bytes dst_ip = 6; + bytes dst_ip_mask = 7; + uint32 l4_src_port = 8; + uint32 l4_dst_port = 9; + bool enable_packet_count = 10; + uint64 packet_count = 11; + bool enable_byte_count = 12; + uint64 byte_count = 13; + bool hit_bit_cor = 14; + bool hit_bit = 15; + } +} + +message SetNatEntryAttributeResponse {} + +message GetNatEntryAttributeRequest { + NatEntry entry = 1; + NatEntryAttr attr_type = 2; +} + +message GetNatEntryAttributeResponse { + NatEntryAttribute attr = 1; +} + +message CreateNatZoneCounterRequest { + uint64 switch = 1; + + NatType nat_type = 2; + uint32 zone_id = 3; + bool enable_discard = 4; + uint64 discard_packet_count = 5; + bool enable_translation_needed = 6; + uint64 translation_needed_packet_count = 7; + bool enable_translations = 8; + uint64 translations_packet_count = 9; +} + +message CreateNatZoneCounterResponse { + uint64 oid = 1; +} + +message RemoveNatZoneCounterRequest { + uint64 oid = 1; +} + +message RemoveNatZoneCounterResponse {} + +message SetNatZoneCounterAttributeRequest { + uint64 oid = 1; + oneof attr { + NatType nat_type = 2; + uint32 zone_id = 3; + uint64 discard_packet_count = 4; + uint64 translation_needed_packet_count = 5; + uint64 translations_packet_count = 6; + } +} + +message SetNatZoneCounterAttributeResponse {} + +message GetNatZoneCounterAttributeRequest { + uint64 oid = 1; + NatZoneCounterAttr attr_type = 2; +} + +message GetNatZoneCounterAttributeResponse { + NatZoneCounterAttribute attr = 1; +} + +service Nat { + rpc CreateNatEntry(CreateNatEntryRequest) returns (CreateNatEntryResponse) {} + rpc RemoveNatEntry(RemoveNatEntryRequest) returns (RemoveNatEntryResponse) {} + rpc SetNatEntryAttribute(SetNatEntryAttributeRequest) + returns (SetNatEntryAttributeResponse) {} + rpc GetNatEntryAttribute(GetNatEntryAttributeRequest) + returns (GetNatEntryAttributeResponse) {} + rpc CreateNatZoneCounter(CreateNatZoneCounterRequest) + returns (CreateNatZoneCounterResponse) {} + rpc RemoveNatZoneCounter(RemoveNatZoneCounterRequest) + returns (RemoveNatZoneCounterResponse) {} + rpc SetNatZoneCounterAttribute(SetNatZoneCounterAttributeRequest) + returns (SetNatZoneCounterAttributeResponse) {} + rpc GetNatZoneCounterAttribute(GetNatZoneCounterAttributeRequest) + returns (GetNatZoneCounterAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/neighbor.proto b/dataplane/standalone/proto/neighbor.proto new file mode 100644 index 00000000..04b52be6 --- /dev/null +++ b/dataplane/standalone/proto/neighbor.proto @@ -0,0 +1,83 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum NeighborEntryAttr { + NEIGHBOR_ENTRY_ATTR_UNSPECIFIED = 0; + NEIGHBOR_ENTRY_ATTR_DST_MAC_ADDRESS = 1; + NEIGHBOR_ENTRY_ATTR_PACKET_ACTION = 2; + NEIGHBOR_ENTRY_ATTR_USER_TRAP_ID = 3; + NEIGHBOR_ENTRY_ATTR_NO_HOST_ROUTE = 4; + NEIGHBOR_ENTRY_ATTR_META_DATA = 5; + NEIGHBOR_ENTRY_ATTR_COUNTER_ID = 6; + NEIGHBOR_ENTRY_ATTR_ENCAP_INDEX = 7; + NEIGHBOR_ENTRY_ATTR_ENCAP_IMPOSE_INDEX = 8; + NEIGHBOR_ENTRY_ATTR_IS_LOCAL = 9; + NEIGHBOR_ENTRY_ATTR_IP_ADDR_FAMILY = 10; +} + +message CreateNeighborEntryRequest { + NeighborEntry entry = 1; + + bytes dst_mac_address = 2; + PacketAction packet_action = 3; + uint64 user_trap_id = 4; + bool no_host_route = 5; + uint32 meta_data = 6; + uint64 counter_id = 7; + uint32 encap_index = 8; + bool encap_impose_index = 9; + bool is_local = 10; +} + +message CreateNeighborEntryResponse { + uint64 oid = 1; +} + +message RemoveNeighborEntryRequest { + NeighborEntry entry = 1; +} + +message RemoveNeighborEntryResponse {} + +message SetNeighborEntryAttributeRequest { + NeighborEntry entry = 1; + oneof attr { + bytes dst_mac_address = 2; + PacketAction packet_action = 3; + uint64 user_trap_id = 4; + bool no_host_route = 5; + uint32 meta_data = 6; + uint64 counter_id = 7; + uint32 encap_index = 8; + bool encap_impose_index = 9; + bool is_local = 10; + } +} + +message SetNeighborEntryAttributeResponse {} + +message GetNeighborEntryAttributeRequest { + NeighborEntry entry = 1; + NeighborEntryAttr attr_type = 2; +} + +message GetNeighborEntryAttributeResponse { + NeighborEntryAttribute attr = 1; +} + +service Neighbor { + rpc CreateNeighborEntry(CreateNeighborEntryRequest) + returns (CreateNeighborEntryResponse) {} + rpc RemoveNeighborEntry(RemoveNeighborEntryRequest) + returns (RemoveNeighborEntryResponse) {} + rpc SetNeighborEntryAttribute(SetNeighborEntryAttributeRequest) + returns (SetNeighborEntryAttributeResponse) {} + rpc GetNeighborEntryAttribute(GetNeighborEntryAttributeRequest) + returns (GetNeighborEntryAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/next_hop.proto b/dataplane/standalone/proto/next_hop.proto new file mode 100644 index 00000000..3f3604c3 --- /dev/null +++ b/dataplane/standalone/proto/next_hop.proto @@ -0,0 +1,95 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum NextHopAttr { + NEXT_HOP_ATTR_UNSPECIFIED = 0; + NEXT_HOP_ATTR_TYPE = 1; + NEXT_HOP_ATTR_IP = 2; + NEXT_HOP_ATTR_ROUTER_INTERFACE_ID = 3; + NEXT_HOP_ATTR_TUNNEL_ID = 4; + NEXT_HOP_ATTR_TUNNEL_VNI = 5; + NEXT_HOP_ATTR_TUNNEL_MAC = 6; + NEXT_HOP_ATTR_SRV6_SIDLIST_ID = 7; + NEXT_HOP_ATTR_LABELSTACK = 8; + NEXT_HOP_ATTR_COUNTER_ID = 9; + NEXT_HOP_ATTR_DISABLE_DECREMENT_TTL = 10; + NEXT_HOP_ATTR_OUTSEG_TYPE = 11; + NEXT_HOP_ATTR_OUTSEG_TTL_MODE = 12; + NEXT_HOP_ATTR_OUTSEG_TTL_VALUE = 13; + NEXT_HOP_ATTR_OUTSEG_EXP_MODE = 14; + NEXT_HOP_ATTR_OUTSEG_EXP_VALUE = 15; + NEXT_HOP_ATTR_QOS_TC_AND_COLOR_TO_MPLS_EXP_MAP = 16; +} + +message CreateNextHopRequest { + uint64 switch = 1; + + NextHopType type = 2; + bytes ip = 3; + uint64 router_interface_id = 4; + uint64 tunnel_id = 5; + uint32 tunnel_vni = 6; + bytes tunnel_mac = 7; + uint64 srv6_sidlist_id = 8; + repeated uint32 labelstack = 9; + uint64 counter_id = 10; + bool disable_decrement_ttl = 11; + OutsegType outseg_type = 12; + OutsegTtlMode outseg_ttl_mode = 13; + uint32 outseg_ttl_value = 14; + OutsegExpMode outseg_exp_mode = 15; + uint32 outseg_exp_value = 16; + uint64 qos_tc_and_color_to_mpls_exp_map = 17; +} + +message CreateNextHopResponse { + uint64 oid = 1; +} + +message RemoveNextHopRequest { + uint64 oid = 1; +} + +message RemoveNextHopResponse {} + +message SetNextHopAttributeRequest { + uint64 oid = 1; + oneof attr { + uint32 tunnel_vni = 2; + bytes tunnel_mac = 3; + uint64 counter_id = 4; + bool disable_decrement_ttl = 5; + OutsegType outseg_type = 6; + OutsegTtlMode outseg_ttl_mode = 7; + uint32 outseg_ttl_value = 8; + OutsegExpMode outseg_exp_mode = 9; + uint32 outseg_exp_value = 10; + uint64 qos_tc_and_color_to_mpls_exp_map = 11; + } +} + +message SetNextHopAttributeResponse {} + +message GetNextHopAttributeRequest { + uint64 oid = 1; + NextHopAttr attr_type = 2; +} + +message GetNextHopAttributeResponse { + NextHopAttribute attr = 1; +} + +service NextHop { + rpc CreateNextHop(CreateNextHopRequest) returns (CreateNextHopResponse) {} + rpc RemoveNextHop(RemoveNextHopRequest) returns (RemoveNextHopResponse) {} + rpc SetNextHopAttribute(SetNextHopAttributeRequest) + returns (SetNextHopAttributeResponse) {} + rpc GetNextHopAttribute(GetNextHopAttributeRequest) + returns (GetNextHopAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/next_hop_group.proto b/dataplane/standalone/proto/next_hop_group.proto new file mode 100644 index 00000000..84185b76 --- /dev/null +++ b/dataplane/standalone/proto/next_hop_group.proto @@ -0,0 +1,186 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum NextHopGroupAttr { + NEXT_HOP_GROUP_ATTR_UNSPECIFIED = 0; + NEXT_HOP_GROUP_ATTR_NEXT_HOP_COUNT = 1; + NEXT_HOP_GROUP_ATTR_NEXT_HOP_MEMBER_LIST = 2; + NEXT_HOP_GROUP_ATTR_TYPE = 3; + NEXT_HOP_GROUP_ATTR_SET_SWITCHOVER = 4; + NEXT_HOP_GROUP_ATTR_COUNTER_ID = 5; + NEXT_HOP_GROUP_ATTR_CONFIGURED_SIZE = 6; + NEXT_HOP_GROUP_ATTR_REAL_SIZE = 7; + NEXT_HOP_GROUP_ATTR_SELECTION_MAP = 8; +} + +enum NextHopGroupMapAttr { + NEXT_HOP_GROUP_MAP_ATTR_UNSPECIFIED = 0; + NEXT_HOP_GROUP_MAP_ATTR_TYPE = 1; + NEXT_HOP_GROUP_MAP_ATTR_MAP_TO_VALUE_LIST = 2; +} + +enum NextHopGroupMemberAttr { + NEXT_HOP_GROUP_MEMBER_ATTR_UNSPECIFIED = 0; + NEXT_HOP_GROUP_MEMBER_ATTR_NEXT_HOP_GROUP_ID = 1; + NEXT_HOP_GROUP_MEMBER_ATTR_NEXT_HOP_ID = 2; + NEXT_HOP_GROUP_MEMBER_ATTR_WEIGHT = 3; + NEXT_HOP_GROUP_MEMBER_ATTR_CONFIGURED_ROLE = 4; + NEXT_HOP_GROUP_MEMBER_ATTR_OBSERVED_ROLE = 5; + NEXT_HOP_GROUP_MEMBER_ATTR_MONITORED_OBJECT = 6; + NEXT_HOP_GROUP_MEMBER_ATTR_INDEX = 7; + NEXT_HOP_GROUP_MEMBER_ATTR_SEQUENCE_ID = 8; + NEXT_HOP_GROUP_MEMBER_ATTR_COUNTER_ID = 9; +} + +message CreateNextHopGroupRequest { + uint64 switch = 1; + + NextHopGroupType type = 2; + bool set_switchover = 3; + uint64 counter_id = 4; + uint32 configured_size = 5; + uint64 selection_map = 6; +} + +message CreateNextHopGroupResponse { + uint64 oid = 1; +} + +message RemoveNextHopGroupRequest { + uint64 oid = 1; +} + +message RemoveNextHopGroupResponse {} + +message SetNextHopGroupAttributeRequest { + uint64 oid = 1; + oneof attr { + bool set_switchover = 2; + uint64 counter_id = 3; + uint64 selection_map = 4; + } +} + +message SetNextHopGroupAttributeResponse {} + +message GetNextHopGroupAttributeRequest { + uint64 oid = 1; + NextHopGroupAttr attr_type = 2; +} + +message GetNextHopGroupAttributeResponse { + NextHopGroupAttribute attr = 1; +} + +message CreateNextHopGroupMemberRequest { + uint64 switch = 1; + + uint64 next_hop_group_id = 2; + uint64 next_hop_id = 3; + uint32 weight = 4; + NextHopGroupMemberConfiguredRole configured_role = 5; + uint64 monitored_object = 6; + uint32 index = 7; + uint32 sequence_id = 8; + uint64 counter_id = 9; +} + +message CreateNextHopGroupMemberResponse { + uint64 oid = 1; +} + +message RemoveNextHopGroupMemberRequest { + uint64 oid = 1; +} + +message RemoveNextHopGroupMemberResponse {} + +message SetNextHopGroupMemberAttributeRequest { + uint64 oid = 1; + oneof attr { + uint64 next_hop_id = 2; + uint32 weight = 3; + uint64 monitored_object = 4; + uint32 sequence_id = 5; + uint64 counter_id = 6; + } +} + +message SetNextHopGroupMemberAttributeResponse {} + +message GetNextHopGroupMemberAttributeRequest { + uint64 oid = 1; + NextHopGroupMemberAttr attr_type = 2; +} + +message GetNextHopGroupMemberAttributeResponse { + NextHopGroupMemberAttribute attr = 1; +} + +message CreateNextHopGroupMapRequest { + uint64 switch = 1; + + NextHopGroupMapType type = 2; + repeated UintMap map_to_value_list = 3; +} + +message CreateNextHopGroupMapResponse { + uint64 oid = 1; +} + +message RemoveNextHopGroupMapRequest { + uint64 oid = 1; +} + +message RemoveNextHopGroupMapResponse {} + +message SetNextHopGroupMapAttributeRequest { + uint64 oid = 1; + oneof attr { + UintMapList map_to_value_list = 2; + } +} + +message SetNextHopGroupMapAttributeResponse {} + +message GetNextHopGroupMapAttributeRequest { + uint64 oid = 1; + NextHopGroupMapAttr attr_type = 2; +} + +message GetNextHopGroupMapAttributeResponse { + NextHopGroupMapAttribute attr = 1; +} + +service NextHopGroup { + rpc CreateNextHopGroup(CreateNextHopGroupRequest) + returns (CreateNextHopGroupResponse) {} + rpc RemoveNextHopGroup(RemoveNextHopGroupRequest) + returns (RemoveNextHopGroupResponse) {} + rpc SetNextHopGroupAttribute(SetNextHopGroupAttributeRequest) + returns (SetNextHopGroupAttributeResponse) {} + rpc GetNextHopGroupAttribute(GetNextHopGroupAttributeRequest) + returns (GetNextHopGroupAttributeResponse) {} + rpc CreateNextHopGroupMember(CreateNextHopGroupMemberRequest) + returns (CreateNextHopGroupMemberResponse) {} + rpc RemoveNextHopGroupMember(RemoveNextHopGroupMemberRequest) + returns (RemoveNextHopGroupMemberResponse) {} + rpc SetNextHopGroupMemberAttribute(SetNextHopGroupMemberAttributeRequest) + returns (SetNextHopGroupMemberAttributeResponse) {} + rpc GetNextHopGroupMemberAttribute(GetNextHopGroupMemberAttributeRequest) + returns (GetNextHopGroupMemberAttributeResponse) {} + rpc CreateNextHopGroupMap(CreateNextHopGroupMapRequest) + returns (CreateNextHopGroupMapResponse) {} + rpc RemoveNextHopGroupMap(RemoveNextHopGroupMapRequest) + returns (RemoveNextHopGroupMapResponse) {} + rpc SetNextHopGroupMapAttribute(SetNextHopGroupMapAttributeRequest) + returns (SetNextHopGroupMapAttributeResponse) {} + rpc GetNextHopGroupMapAttribute(GetNextHopGroupMapAttributeRequest) + returns (GetNextHopGroupMapAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/policer.proto b/dataplane/standalone/proto/policer.proto new file mode 100644 index 00000000..13689fc8 --- /dev/null +++ b/dataplane/standalone/proto/policer.proto @@ -0,0 +1,83 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum PolicerAttr { + POLICER_ATTR_UNSPECIFIED = 0; + POLICER_ATTR_METER_TYPE = 1; + POLICER_ATTR_MODE = 2; + POLICER_ATTR_COLOR_SOURCE = 3; + POLICER_ATTR_CBS = 4; + POLICER_ATTR_CIR = 5; + POLICER_ATTR_PBS = 6; + POLICER_ATTR_PIR = 7; + POLICER_ATTR_GREEN_PACKET_ACTION = 8; + POLICER_ATTR_YELLOW_PACKET_ACTION = 9; + POLICER_ATTR_RED_PACKET_ACTION = 10; + POLICER_ATTR_ENABLE_COUNTER_PACKET_ACTION_LIST = 11; +} + +message CreatePolicerRequest { + uint64 switch = 1; + + MeterType meter_type = 2; + PolicerMode mode = 3; + PolicerColorSource color_source = 4; + uint64 cbs = 5; + uint64 cir = 6; + uint64 pbs = 7; + uint64 pir = 8; + PacketAction green_packet_action = 9; + PacketAction yellow_packet_action = 10; + PacketAction red_packet_action = 11; + repeated PacketAction enable_counter_packet_action_list = 12; +} + +message CreatePolicerResponse { + uint64 oid = 1; +} + +message RemovePolicerRequest { + uint64 oid = 1; +} + +message RemovePolicerResponse {} + +message SetPolicerAttributeRequest { + uint64 oid = 1; + oneof attr { + uint64 cbs = 2; + uint64 cir = 3; + uint64 pbs = 4; + uint64 pir = 5; + PacketAction green_packet_action = 6; + PacketAction yellow_packet_action = 7; + PacketAction red_packet_action = 8; + PacketActionList enable_counter_packet_action_list = 9; + } +} + +message SetPolicerAttributeResponse {} + +message GetPolicerAttributeRequest { + uint64 oid = 1; + PolicerAttr attr_type = 2; +} + +message GetPolicerAttributeResponse { + PolicerAttribute attr = 1; +} + +service Policer { + rpc CreatePolicer(CreatePolicerRequest) returns (CreatePolicerResponse) {} + rpc RemovePolicer(RemovePolicerRequest) returns (RemovePolicerResponse) {} + rpc SetPolicerAttribute(SetPolicerAttributeRequest) + returns (SetPolicerAttributeResponse) {} + rpc GetPolicerAttribute(GetPolicerAttributeRequest) + returns (GetPolicerAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/port.proto b/dataplane/standalone/proto/port.proto new file mode 100644 index 00000000..058cfc61 --- /dev/null +++ b/dataplane/standalone/proto/port.proto @@ -0,0 +1,544 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum PortAttr { + PORT_ATTR_UNSPECIFIED = 0; + PORT_ATTR_TYPE = 1; + PORT_ATTR_OPER_STATUS = 2; + PORT_ATTR_SUPPORTED_BREAKOUT_MODE_TYPE = 3; + PORT_ATTR_CURRENT_BREAKOUT_MODE_TYPE = 4; + PORT_ATTR_QOS_NUMBER_OF_QUEUES = 5; + PORT_ATTR_QOS_QUEUE_LIST = 6; + PORT_ATTR_QOS_NUMBER_OF_SCHEDULER_GROUPS = 7; + PORT_ATTR_QOS_SCHEDULER_GROUP_LIST = 8; + PORT_ATTR_QOS_MAXIMUM_HEADROOM_SIZE = 9; + PORT_ATTR_SUPPORTED_SPEED = 10; + PORT_ATTR_SUPPORTED_FEC_MODE = 11; + PORT_ATTR_SUPPORTED_FEC_MODE_EXTENDED = 12; + PORT_ATTR_SUPPORTED_HALF_DUPLEX_SPEED = 13; + PORT_ATTR_SUPPORTED_AUTO_NEG_MODE = 14; + PORT_ATTR_SUPPORTED_FLOW_CONTROL_MODE = 15; + PORT_ATTR_SUPPORTED_ASYMMETRIC_PAUSE_MODE = 16; + PORT_ATTR_SUPPORTED_MEDIA_TYPE = 17; + PORT_ATTR_REMOTE_ADVERTISED_SPEED = 18; + PORT_ATTR_REMOTE_ADVERTISED_FEC_MODE = 19; + PORT_ATTR_REMOTE_ADVERTISED_FEC_MODE_EXTENDED = 20; + PORT_ATTR_REMOTE_ADVERTISED_HALF_DUPLEX_SPEED = 21; + PORT_ATTR_REMOTE_ADVERTISED_AUTO_NEG_MODE = 22; + PORT_ATTR_REMOTE_ADVERTISED_FLOW_CONTROL_MODE = 23; + PORT_ATTR_REMOTE_ADVERTISED_ASYMMETRIC_PAUSE_MODE = 24; + PORT_ATTR_REMOTE_ADVERTISED_MEDIA_TYPE = 25; + PORT_ATTR_REMOTE_ADVERTISED_OUI_CODE = 26; + PORT_ATTR_NUMBER_OF_INGRESS_PRIORITY_GROUPS = 27; + PORT_ATTR_INGRESS_PRIORITY_GROUP_LIST = 28; + PORT_ATTR_EYE_VALUES = 29; + PORT_ATTR_OPER_SPEED = 30; + PORT_ATTR_HW_LANE_LIST = 31; + PORT_ATTR_SPEED = 32; + PORT_ATTR_FULL_DUPLEX_MODE = 33; + PORT_ATTR_AUTO_NEG_MODE = 34; + PORT_ATTR_ADMIN_STATE = 35; + PORT_ATTR_MEDIA_TYPE = 36; + PORT_ATTR_ADVERTISED_SPEED = 37; + PORT_ATTR_ADVERTISED_FEC_MODE = 38; + PORT_ATTR_ADVERTISED_FEC_MODE_EXTENDED = 39; + PORT_ATTR_ADVERTISED_HALF_DUPLEX_SPEED = 40; + PORT_ATTR_ADVERTISED_AUTO_NEG_MODE = 41; + PORT_ATTR_ADVERTISED_FLOW_CONTROL_MODE = 42; + PORT_ATTR_ADVERTISED_ASYMMETRIC_PAUSE_MODE = 43; + PORT_ATTR_ADVERTISED_MEDIA_TYPE = 44; + PORT_ATTR_ADVERTISED_OUI_CODE = 45; + PORT_ATTR_PORT_VLAN_ID = 46; + PORT_ATTR_DEFAULT_VLAN_PRIORITY = 47; + PORT_ATTR_DROP_UNTAGGED = 48; + PORT_ATTR_DROP_TAGGED = 49; + PORT_ATTR_INTERNAL_LOOPBACK_MODE = 50; + PORT_ATTR_USE_EXTENDED_FEC = 51; + PORT_ATTR_FEC_MODE = 52; + PORT_ATTR_FEC_MODE_EXTENDED = 53; + PORT_ATTR_UPDATE_DSCP = 54; + PORT_ATTR_MTU = 55; + PORT_ATTR_FLOOD_STORM_CONTROL_POLICER_ID = 56; + PORT_ATTR_BROADCAST_STORM_CONTROL_POLICER_ID = 57; + PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID = 58; + PORT_ATTR_GLOBAL_FLOW_CONTROL_MODE = 59; + PORT_ATTR_INGRESS_ACL = 60; + PORT_ATTR_EGRESS_ACL = 61; + PORT_ATTR_INGRESS_MACSEC_ACL = 62; + PORT_ATTR_EGRESS_MACSEC_ACL = 63; + PORT_ATTR_MACSEC_PORT_LIST = 64; + PORT_ATTR_INGRESS_MIRROR_SESSION = 65; + PORT_ATTR_EGRESS_MIRROR_SESSION = 66; + PORT_ATTR_INGRESS_SAMPLEPACKET_ENABLE = 67; + PORT_ATTR_EGRESS_SAMPLEPACKET_ENABLE = 68; + PORT_ATTR_INGRESS_SAMPLE_MIRROR_SESSION = 69; + PORT_ATTR_EGRESS_SAMPLE_MIRROR_SESSION = 70; + PORT_ATTR_POLICER_ID = 71; + PORT_ATTR_QOS_DEFAULT_TC = 72; + PORT_ATTR_QOS_DOT1P_TO_TC_MAP = 73; + PORT_ATTR_QOS_DOT1P_TO_COLOR_MAP = 74; + PORT_ATTR_QOS_DSCP_TO_TC_MAP = 75; + PORT_ATTR_QOS_DSCP_TO_COLOR_MAP = 76; + PORT_ATTR_QOS_TC_TO_QUEUE_MAP = 77; + PORT_ATTR_QOS_TC_AND_COLOR_TO_DOT1P_MAP = 78; + PORT_ATTR_QOS_TC_AND_COLOR_TO_DSCP_MAP = 79; + PORT_ATTR_QOS_TC_TO_PRIORITY_GROUP_MAP = 80; + PORT_ATTR_QOS_PFC_PRIORITY_TO_PRIORITY_GROUP_MAP = 81; + PORT_ATTR_QOS_PFC_PRIORITY_TO_QUEUE_MAP = 82; + PORT_ATTR_QOS_SCHEDULER_PROFILE_ID = 83; + PORT_ATTR_QOS_INGRESS_BUFFER_PROFILE_LIST = 84; + PORT_ATTR_QOS_EGRESS_BUFFER_PROFILE_LIST = 85; + PORT_ATTR_PRIORITY_FLOW_CONTROL_MODE = 86; + PORT_ATTR_PRIORITY_FLOW_CONTROL = 87; + PORT_ATTR_PRIORITY_FLOW_CONTROL_RX = 88; + PORT_ATTR_PRIORITY_FLOW_CONTROL_TX = 89; + PORT_ATTR_META_DATA = 90; + PORT_ATTR_EGRESS_BLOCK_PORT_LIST = 91; + PORT_ATTR_HW_PROFILE_ID = 92; + PORT_ATTR_EEE_ENABLE = 93; + PORT_ATTR_EEE_IDLE_TIME = 94; + PORT_ATTR_EEE_WAKE_TIME = 95; + PORT_ATTR_PORT_POOL_LIST = 96; + PORT_ATTR_ISOLATION_GROUP = 97; + PORT_ATTR_PKT_TX_ENABLE = 98; + PORT_ATTR_TAM_OBJECT = 99; + PORT_ATTR_SERDES_PREEMPHASIS = 100; + PORT_ATTR_SERDES_IDRIVER = 101; + PORT_ATTR_SERDES_IPREDRIVER = 102; + PORT_ATTR_LINK_TRAINING_ENABLE = 103; + PORT_ATTR_PTP_MODE = 104; + PORT_ATTR_INTERFACE_TYPE = 105; + PORT_ATTR_ADVERTISED_INTERFACE_TYPE = 106; + PORT_ATTR_REFERENCE_CLOCK = 107; + PORT_ATTR_PRBS_POLYNOMIAL = 108; + PORT_ATTR_PORT_SERDES_ID = 109; + PORT_ATTR_LINK_TRAINING_FAILURE_STATUS = 110; + PORT_ATTR_LINK_TRAINING_RX_STATUS = 111; + PORT_ATTR_PRBS_CONFIG = 112; + PORT_ATTR_PRBS_LOCK_STATUS = 113; + PORT_ATTR_PRBS_LOCK_LOSS_STATUS = 114; + PORT_ATTR_PRBS_RX_STATUS = 115; + PORT_ATTR_PRBS_RX_STATE = 116; + PORT_ATTR_AUTO_NEG_STATUS = 117; + PORT_ATTR_DISABLE_DECREMENT_TTL = 118; + PORT_ATTR_QOS_MPLS_EXP_TO_TC_MAP = 119; + PORT_ATTR_QOS_MPLS_EXP_TO_COLOR_MAP = 120; + PORT_ATTR_QOS_TC_AND_COLOR_TO_MPLS_EXP_MAP = 121; + PORT_ATTR_TPID = 122; + PORT_ATTR_ERR_STATUS_LIST = 123; + PORT_ATTR_FABRIC_ATTACHED = 124; + PORT_ATTR_FABRIC_ATTACHED_SWITCH_TYPE = 125; + PORT_ATTR_FABRIC_ATTACHED_SWITCH_ID = 126; + PORT_ATTR_FABRIC_ATTACHED_PORT_INDEX = 127; + PORT_ATTR_FABRIC_REACHABILITY = 128; + PORT_ATTR_SYSTEM_PORT = 129; + PORT_ATTR_AUTO_NEG_FEC_MODE_OVERRIDE = 130; + PORT_ATTR_LOOPBACK_MODE = 131; + PORT_ATTR_MDIX_MODE_STATUS = 132; + PORT_ATTR_MDIX_MODE_CONFIG = 133; + PORT_ATTR_AUTO_NEG_CONFIG_MODE = 134; + PORT_ATTR_1000X_SGMII_SLAVE_AUTODETECT = 135; + PORT_ATTR_MODULE_TYPE = 136; + PORT_ATTR_DUAL_MEDIA = 137; + PORT_ATTR_AUTO_NEG_FEC_MODE_EXTENDED = 138; + PORT_ATTR_IPG = 139; + PORT_ATTR_GLOBAL_FLOW_CONTROL_FORWARD = 140; + PORT_ATTR_PRIORITY_FLOW_CONTROL_FORWARD = 141; + PORT_ATTR_QOS_DSCP_TO_FORWARDING_CLASS_MAP = 142; + PORT_ATTR_QOS_MPLS_EXP_TO_FORWARDING_CLASS_MAP = 143; + PORT_ATTR_IPSEC_PORT = 144; +} + +enum PortConnectorAttr { + PORT_CONNECTOR_ATTR_UNSPECIFIED = 0; + PORT_CONNECTOR_ATTR_SYSTEM_SIDE_PORT_ID = 1; + PORT_CONNECTOR_ATTR_LINE_SIDE_PORT_ID = 2; + PORT_CONNECTOR_ATTR_SYSTEM_SIDE_FAILOVER_PORT_ID = 3; + PORT_CONNECTOR_ATTR_LINE_SIDE_FAILOVER_PORT_ID = 4; + PORT_CONNECTOR_ATTR_FAILOVER_MODE = 5; +} + +enum PortPoolAttr { + PORT_POOL_ATTR_UNSPECIFIED = 0; + PORT_POOL_ATTR_PORT_ID = 1; + PORT_POOL_ATTR_BUFFER_POOL_ID = 2; + PORT_POOL_ATTR_QOS_WRED_PROFILE_ID = 3; +} + +enum PortSerdesAttr { + PORT_SERDES_ATTR_UNSPECIFIED = 0; + PORT_SERDES_ATTR_PORT_ID = 1; + PORT_SERDES_ATTR_PREEMPHASIS = 2; + PORT_SERDES_ATTR_IDRIVER = 3; + PORT_SERDES_ATTR_IPREDRIVER = 4; + PORT_SERDES_ATTR_TX_FIR_PRE1 = 5; + PORT_SERDES_ATTR_TX_FIR_PRE2 = 6; + PORT_SERDES_ATTR_TX_FIR_PRE3 = 7; + PORT_SERDES_ATTR_TX_FIR_MAIN = 8; + PORT_SERDES_ATTR_TX_FIR_POST1 = 9; + PORT_SERDES_ATTR_TX_FIR_POST2 = 10; + PORT_SERDES_ATTR_TX_FIR_POST3 = 11; + PORT_SERDES_ATTR_TX_FIR_ATTN = 12; +} + +message CreatePortRequest { + uint64 switch = 1; + + repeated uint32 hw_lane_list = 2; + uint32 speed = 3; + bool full_duplex_mode = 4; + bool auto_neg_mode = 5; + bool admin_state = 6; + PortMediaType media_type = 7; + repeated uint32 advertised_speed = 8; + repeated PortFecMode advertised_fec_mode = 9; + repeated PortFecModeExtended advertised_fec_mode_extended = 10; + repeated uint32 advertised_half_duplex_speed = 11; + bool advertised_auto_neg_mode = 12; + PortFlowControlMode advertised_flow_control_mode = 13; + bool advertised_asymmetric_pause_mode = 14; + PortMediaType advertised_media_type = 15; + uint32 advertised_oui_code = 16; + uint32 port_vlan_id = 17; + uint32 default_vlan_priority = 18; + bool drop_untagged = 19; + bool drop_tagged = 20; + PortInternalLoopbackMode internal_loopback_mode = 21; + bool use_extended_fec = 22; + PortFecMode fec_mode = 23; + PortFecModeExtended fec_mode_extended = 24; + bool update_dscp = 25; + uint32 mtu = 26; + uint64 flood_storm_control_policer_id = 27; + uint64 broadcast_storm_control_policer_id = 28; + uint64 multicast_storm_control_policer_id = 29; + PortFlowControlMode global_flow_control_mode = 30; + uint64 ingress_acl = 31; + uint64 egress_acl = 32; + uint64 ingress_macsec_acl = 33; + uint64 egress_macsec_acl = 34; + repeated uint64 ingress_mirror_session = 35; + repeated uint64 egress_mirror_session = 36; + uint64 ingress_samplepacket_enable = 37; + uint64 egress_samplepacket_enable = 38; + repeated uint64 ingress_sample_mirror_session = 39; + repeated uint64 egress_sample_mirror_session = 40; + uint64 policer_id = 41; + uint32 qos_default_tc = 42; + uint64 qos_dot1p_to_tc_map = 43; + uint64 qos_dot1p_to_color_map = 44; + uint64 qos_dscp_to_tc_map = 45; + uint64 qos_dscp_to_color_map = 46; + uint64 qos_tc_to_queue_map = 47; + uint64 qos_tc_and_color_to_dot1p_map = 48; + uint64 qos_tc_and_color_to_dscp_map = 49; + uint64 qos_tc_to_priority_group_map = 50; + uint64 qos_pfc_priority_to_priority_group_map = 51; + uint64 qos_pfc_priority_to_queue_map = 52; + uint64 qos_scheduler_profile_id = 53; + repeated uint64 qos_ingress_buffer_profile_list = 54; + repeated uint64 qos_egress_buffer_profile_list = 55; + PortPriorityFlowControlMode priority_flow_control_mode = 56; + uint32 priority_flow_control = 57; + uint32 priority_flow_control_rx = 58; + uint32 priority_flow_control_tx = 59; + uint32 meta_data = 60; + repeated uint64 egress_block_port_list = 61; + uint64 hw_profile_id = 62; + bool eee_enable = 63; + uint32 eee_idle_time = 64; + uint32 eee_wake_time = 65; + uint64 isolation_group = 66; + bool pkt_tx_enable = 67; + repeated uint64 tam_object = 68; + repeated uint32 serdes_preemphasis = 69; + repeated uint32 serdes_idriver = 70; + repeated uint32 serdes_ipredriver = 71; + bool link_training_enable = 72; + PortPtpMode ptp_mode = 73; + PortInterfaceType interface_type = 74; + repeated PortInterfaceType advertised_interface_type = 75; + uint64 reference_clock = 76; + uint32 prbs_polynomial = 77; + PortPrbsConfig prbs_config = 78; + bool disable_decrement_ttl = 79; + uint64 qos_mpls_exp_to_tc_map = 80; + uint64 qos_mpls_exp_to_color_map = 81; + uint64 qos_tc_and_color_to_mpls_exp_map = 82; + uint32 tpid = 83; + bool auto_neg_fec_mode_override = 84; + PortLoopbackMode loopback_mode = 85; + PortMdixModeConfig mdix_mode_config = 86; + PortAutoNegConfigMode auto_neg_config_mode = 87; + bool _1000x_sgmii_slave_autodetect = 88; + PortModuleType module_type = 89; + PortDualMedia dual_media = 90; + uint32 ipg = 91; + bool global_flow_control_forward = 92; + bool priority_flow_control_forward = 93; + uint64 qos_dscp_to_forwarding_class_map = 94; + uint64 qos_mpls_exp_to_forwarding_class_map = 95; +} + +message CreatePortResponse { + uint64 oid = 1; +} + +message RemovePortRequest { + uint64 oid = 1; +} + +message RemovePortResponse {} + +message SetPortAttributeRequest { + uint64 oid = 1; + oneof attr { + uint32 speed = 2; + bool auto_neg_mode = 3; + bool admin_state = 4; + PortMediaType media_type = 5; + Uint32List advertised_speed = 6; + PortFecModeList advertised_fec_mode = 7; + PortFecModeExtendedList advertised_fec_mode_extended = 8; + Uint32List advertised_half_duplex_speed = 9; + bool advertised_auto_neg_mode = 10; + PortFlowControlMode advertised_flow_control_mode = 11; + bool advertised_asymmetric_pause_mode = 12; + PortMediaType advertised_media_type = 13; + uint32 advertised_oui_code = 14; + uint32 port_vlan_id = 15; + uint32 default_vlan_priority = 16; + bool drop_untagged = 17; + bool drop_tagged = 18; + PortInternalLoopbackMode internal_loopback_mode = 19; + bool use_extended_fec = 20; + PortFecMode fec_mode = 21; + PortFecModeExtended fec_mode_extended = 22; + bool update_dscp = 23; + uint32 mtu = 24; + uint64 flood_storm_control_policer_id = 25; + uint64 broadcast_storm_control_policer_id = 26; + uint64 multicast_storm_control_policer_id = 27; + PortFlowControlMode global_flow_control_mode = 28; + uint64 ingress_acl = 29; + uint64 egress_acl = 30; + uint64 ingress_macsec_acl = 31; + uint64 egress_macsec_acl = 32; + Uint64List ingress_mirror_session = 33; + Uint64List egress_mirror_session = 34; + uint64 ingress_samplepacket_enable = 35; + uint64 egress_samplepacket_enable = 36; + Uint64List ingress_sample_mirror_session = 37; + Uint64List egress_sample_mirror_session = 38; + uint64 policer_id = 39; + uint32 qos_default_tc = 40; + uint64 qos_dot1p_to_tc_map = 41; + uint64 qos_dot1p_to_color_map = 42; + uint64 qos_dscp_to_tc_map = 43; + uint64 qos_dscp_to_color_map = 44; + uint64 qos_tc_to_queue_map = 45; + uint64 qos_tc_and_color_to_dot1p_map = 46; + uint64 qos_tc_and_color_to_dscp_map = 47; + uint64 qos_tc_to_priority_group_map = 48; + uint64 qos_pfc_priority_to_priority_group_map = 49; + uint64 qos_pfc_priority_to_queue_map = 50; + uint64 qos_scheduler_profile_id = 51; + Uint64List qos_ingress_buffer_profile_list = 52; + Uint64List qos_egress_buffer_profile_list = 53; + PortPriorityFlowControlMode priority_flow_control_mode = 54; + uint32 priority_flow_control = 55; + uint32 priority_flow_control_rx = 56; + uint32 priority_flow_control_tx = 57; + uint32 meta_data = 58; + Uint64List egress_block_port_list = 59; + uint64 hw_profile_id = 60; + bool eee_enable = 61; + uint32 eee_idle_time = 62; + uint32 eee_wake_time = 63; + uint64 isolation_group = 64; + bool pkt_tx_enable = 65; + Uint64List tam_object = 66; + Uint32List serdes_preemphasis = 67; + Uint32List serdes_idriver = 68; + Uint32List serdes_ipredriver = 69; + bool link_training_enable = 70; + PortPtpMode ptp_mode = 71; + PortInterfaceType interface_type = 72; + PortInterfaceTypeList advertised_interface_type = 73; + uint32 prbs_polynomial = 74; + PortPrbsConfig prbs_config = 75; + bool disable_decrement_ttl = 76; + uint64 qos_mpls_exp_to_tc_map = 77; + uint64 qos_mpls_exp_to_color_map = 78; + uint64 qos_tc_and_color_to_mpls_exp_map = 79; + uint32 tpid = 80; + bool auto_neg_fec_mode_override = 81; + PortLoopbackMode loopback_mode = 82; + PortMdixModeConfig mdix_mode_config = 83; + PortAutoNegConfigMode auto_neg_config_mode = 84; + bool _1000x_sgmii_slave_autodetect = 85; + PortModuleType module_type = 86; + PortDualMedia dual_media = 87; + uint32 ipg = 88; + bool global_flow_control_forward = 89; + bool priority_flow_control_forward = 90; + uint64 qos_dscp_to_forwarding_class_map = 91; + uint64 qos_mpls_exp_to_forwarding_class_map = 92; + } +} + +message SetPortAttributeResponse {} + +message GetPortAttributeRequest { + uint64 oid = 1; + PortAttr attr_type = 2; +} + +message GetPortAttributeResponse { + PortAttribute attr = 1; +} + +message CreatePortPoolRequest { + uint64 switch = 1; + + uint64 port_id = 2; + uint64 buffer_pool_id = 3; + uint64 qos_wred_profile_id = 4; +} + +message CreatePortPoolResponse { + uint64 oid = 1; +} + +message RemovePortPoolRequest { + uint64 oid = 1; +} + +message RemovePortPoolResponse {} + +message SetPortPoolAttributeRequest { + uint64 oid = 1; + oneof attr { + uint64 qos_wred_profile_id = 2; + } +} + +message SetPortPoolAttributeResponse {} + +message GetPortPoolAttributeRequest { + uint64 oid = 1; + PortPoolAttr attr_type = 2; +} + +message GetPortPoolAttributeResponse { + PortPoolAttribute attr = 1; +} + +message CreatePortConnectorRequest { + uint64 switch = 1; + + uint64 system_side_port_id = 2; + uint64 line_side_port_id = 3; + uint64 system_side_failover_port_id = 4; + uint64 line_side_failover_port_id = 5; + PortConnectorFailoverMode failover_mode = 6; +} + +message CreatePortConnectorResponse { + uint64 oid = 1; +} + +message RemovePortConnectorRequest { + uint64 oid = 1; +} + +message RemovePortConnectorResponse {} + +message SetPortConnectorAttributeRequest { + uint64 oid = 1; + oneof attr { + PortConnectorFailoverMode failover_mode = 2; + } +} + +message SetPortConnectorAttributeResponse {} + +message GetPortConnectorAttributeRequest { + uint64 oid = 1; + PortConnectorAttr attr_type = 2; +} + +message GetPortConnectorAttributeResponse { + PortConnectorAttribute attr = 1; +} + +message CreatePortSerdesRequest { + uint64 switch = 1; + + uint64 port_id = 2; + repeated int32 preemphasis = 3; + repeated int32 idriver = 4; + repeated int32 ipredriver = 5; + repeated int32 tx_fir_pre1 = 6; + repeated int32 tx_fir_pre2 = 7; + repeated int32 tx_fir_pre3 = 8; + repeated int32 tx_fir_main = 9; + repeated int32 tx_fir_post1 = 10; + repeated int32 tx_fir_post2 = 11; + repeated int32 tx_fir_post3 = 12; + repeated int32 tx_fir_attn = 13; +} + +message CreatePortSerdesResponse { + uint64 oid = 1; +} + +message RemovePortSerdesRequest { + uint64 oid = 1; +} + +message RemovePortSerdesResponse {} + +message GetPortSerdesAttributeRequest { + uint64 oid = 1; + PortSerdesAttr attr_type = 2; +} + +message GetPortSerdesAttributeResponse { + PortSerdesAttribute attr = 1; +} + +service Port { + rpc CreatePort(CreatePortRequest) returns (CreatePortResponse) {} + rpc RemovePort(RemovePortRequest) returns (RemovePortResponse) {} + rpc SetPortAttribute(SetPortAttributeRequest) + returns (SetPortAttributeResponse) {} + rpc GetPortAttribute(GetPortAttributeRequest) + returns (GetPortAttributeResponse) {} + rpc CreatePortPool(CreatePortPoolRequest) returns (CreatePortPoolResponse) {} + rpc RemovePortPool(RemovePortPoolRequest) returns (RemovePortPoolResponse) {} + rpc SetPortPoolAttribute(SetPortPoolAttributeRequest) + returns (SetPortPoolAttributeResponse) {} + rpc GetPortPoolAttribute(GetPortPoolAttributeRequest) + returns (GetPortPoolAttributeResponse) {} + rpc CreatePortConnector(CreatePortConnectorRequest) + returns (CreatePortConnectorResponse) {} + rpc RemovePortConnector(RemovePortConnectorRequest) + returns (RemovePortConnectorResponse) {} + rpc SetPortConnectorAttribute(SetPortConnectorAttributeRequest) + returns (SetPortConnectorAttributeResponse) {} + rpc GetPortConnectorAttribute(GetPortConnectorAttributeRequest) + returns (GetPortConnectorAttributeResponse) {} + rpc CreatePortSerdes(CreatePortSerdesRequest) + returns (CreatePortSerdesResponse) {} + rpc RemovePortSerdes(RemovePortSerdesRequest) + returns (RemovePortSerdesResponse) {} + rpc GetPortSerdesAttribute(GetPortSerdesAttributeRequest) + returns (GetPortSerdesAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/qos_map.proto b/dataplane/standalone/proto/qos_map.proto new file mode 100644 index 00000000..4489bbd1 --- /dev/null +++ b/dataplane/standalone/proto/qos_map.proto @@ -0,0 +1,58 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum QosMapAttr { + QOS_MAP_ATTR_UNSPECIFIED = 0; + QOS_MAP_ATTR_TYPE = 1; + QOS_MAP_ATTR_MAP_TO_VALUE_LIST = 2; +} + +message CreateQosMapRequest { + uint64 switch = 1; + + QosMapType type = 2; + repeated QOSMap map_to_value_list = 3; +} + +message CreateQosMapResponse { + uint64 oid = 1; +} + +message RemoveQosMapRequest { + uint64 oid = 1; +} + +message RemoveQosMapResponse {} + +message SetQosMapAttributeRequest { + uint64 oid = 1; + oneof attr { + QosMapList map_to_value_list = 2; + } +} + +message SetQosMapAttributeResponse {} + +message GetQosMapAttributeRequest { + uint64 oid = 1; + QosMapAttr attr_type = 2; +} + +message GetQosMapAttributeResponse { + QosMapAttribute attr = 1; +} + +service QosMap { + rpc CreateQosMap(CreateQosMapRequest) returns (CreateQosMapResponse) {} + rpc RemoveQosMap(RemoveQosMapRequest) returns (RemoveQosMapResponse) {} + rpc SetQosMapAttribute(SetQosMapAttributeRequest) + returns (SetQosMapAttributeResponse) {} + rpc GetQosMapAttribute(GetQosMapAttributeRequest) + returns (GetQosMapAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/queue.proto b/dataplane/standalone/proto/queue.proto new file mode 100644 index 00000000..6b3e5758 --- /dev/null +++ b/dataplane/standalone/proto/queue.proto @@ -0,0 +1,81 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum QueueAttr { + QUEUE_ATTR_UNSPECIFIED = 0; + QUEUE_ATTR_TYPE = 1; + QUEUE_ATTR_PORT = 2; + QUEUE_ATTR_INDEX = 3; + QUEUE_ATTR_PARENT_SCHEDULER_NODE = 4; + QUEUE_ATTR_WRED_PROFILE_ID = 5; + QUEUE_ATTR_BUFFER_PROFILE_ID = 6; + QUEUE_ATTR_SCHEDULER_PROFILE_ID = 7; + QUEUE_ATTR_PAUSE_STATUS = 8; + QUEUE_ATTR_ENABLE_PFC_DLDR = 9; + QUEUE_ATTR_PFC_DLR_INIT = 10; + QUEUE_ATTR_TAM_OBJECT = 11; +} + +message CreateQueueRequest { + uint64 switch = 1; + + QueueType type = 2; + uint64 port = 3; + uint32 index = 4; + uint64 parent_scheduler_node = 5; + uint64 wred_profile_id = 6; + uint64 buffer_profile_id = 7; + uint64 scheduler_profile_id = 8; + bool enable_pfc_dldr = 9; + bool pfc_dlr_init = 10; + repeated uint64 tam_object = 11; +} + +message CreateQueueResponse { + uint64 oid = 1; +} + +message RemoveQueueRequest { + uint64 oid = 1; +} + +message RemoveQueueResponse {} + +message SetQueueAttributeRequest { + uint64 oid = 1; + oneof attr { + uint64 parent_scheduler_node = 2; + uint64 wred_profile_id = 3; + uint64 buffer_profile_id = 4; + uint64 scheduler_profile_id = 5; + bool enable_pfc_dldr = 6; + bool pfc_dlr_init = 7; + Uint64List tam_object = 8; + } +} + +message SetQueueAttributeResponse {} + +message GetQueueAttributeRequest { + uint64 oid = 1; + QueueAttr attr_type = 2; +} + +message GetQueueAttributeResponse { + QueueAttribute attr = 1; +} + +service Queue { + rpc CreateQueue(CreateQueueRequest) returns (CreateQueueResponse) {} + rpc RemoveQueue(RemoveQueueRequest) returns (RemoveQueueResponse) {} + rpc SetQueueAttribute(SetQueueAttributeRequest) + returns (SetQueueAttributeResponse) {} + rpc GetQueueAttribute(GetQueueAttributeRequest) + returns (GetQueueAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/route.proto b/dataplane/standalone/proto/route.proto new file mode 100644 index 00000000..3a1b981a --- /dev/null +++ b/dataplane/standalone/proto/route.proto @@ -0,0 +1,71 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum RouteEntryAttr { + ROUTE_ENTRY_ATTR_UNSPECIFIED = 0; + ROUTE_ENTRY_ATTR_PACKET_ACTION = 1; + ROUTE_ENTRY_ATTR_USER_TRAP_ID = 2; + ROUTE_ENTRY_ATTR_NEXT_HOP_ID = 3; + ROUTE_ENTRY_ATTR_META_DATA = 4; + ROUTE_ENTRY_ATTR_IP_ADDR_FAMILY = 5; + ROUTE_ENTRY_ATTR_COUNTER_ID = 6; +} + +message CreateRouteEntryRequest { + RouteEntry entry = 1; + + PacketAction packet_action = 2; + uint64 user_trap_id = 3; + uint64 next_hop_id = 4; + uint32 meta_data = 5; + uint64 counter_id = 6; +} + +message CreateRouteEntryResponse { + uint64 oid = 1; +} + +message RemoveRouteEntryRequest { + RouteEntry entry = 1; +} + +message RemoveRouteEntryResponse {} + +message SetRouteEntryAttributeRequest { + RouteEntry entry = 1; + oneof attr { + PacketAction packet_action = 2; + uint64 user_trap_id = 3; + uint64 next_hop_id = 4; + uint32 meta_data = 5; + uint64 counter_id = 6; + } +} + +message SetRouteEntryAttributeResponse {} + +message GetRouteEntryAttributeRequest { + RouteEntry entry = 1; + RouteEntryAttr attr_type = 2; +} + +message GetRouteEntryAttributeResponse { + RouteEntryAttribute attr = 1; +} + +service Route { + rpc CreateRouteEntry(CreateRouteEntryRequest) + returns (CreateRouteEntryResponse) {} + rpc RemoveRouteEntry(RemoveRouteEntryRequest) + returns (RemoveRouteEntryResponse) {} + rpc SetRouteEntryAttribute(SetRouteEntryAttributeRequest) + returns (SetRouteEntryAttributeResponse) {} + rpc GetRouteEntryAttribute(GetRouteEntryAttributeRequest) + returns (GetRouteEntryAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/router_interface.proto b/dataplane/standalone/proto/router_interface.proto new file mode 100644 index 00000000..54c167a9 --- /dev/null +++ b/dataplane/standalone/proto/router_interface.proto @@ -0,0 +1,110 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum RouterInterfaceAttr { + ROUTER_INTERFACE_ATTR_UNSPECIFIED = 0; + ROUTER_INTERFACE_ATTR_VIRTUAL_ROUTER_ID = 1; + ROUTER_INTERFACE_ATTR_TYPE = 2; + ROUTER_INTERFACE_ATTR_PORT_ID = 3; + ROUTER_INTERFACE_ATTR_VLAN_ID = 4; + ROUTER_INTERFACE_ATTR_OUTER_VLAN_ID = 5; + ROUTER_INTERFACE_ATTR_INNER_VLAN_ID = 6; + ROUTER_INTERFACE_ATTR_BRIDGE_ID = 7; + ROUTER_INTERFACE_ATTR_SRC_MAC_ADDRESS = 8; + ROUTER_INTERFACE_ATTR_ADMIN_V4_STATE = 9; + ROUTER_INTERFACE_ATTR_ADMIN_V6_STATE = 10; + ROUTER_INTERFACE_ATTR_MTU = 11; + ROUTER_INTERFACE_ATTR_INGRESS_ACL = 12; + ROUTER_INTERFACE_ATTR_EGRESS_ACL = 13; + ROUTER_INTERFACE_ATTR_NEIGHBOR_MISS_PACKET_ACTION = 14; + ROUTER_INTERFACE_ATTR_V4_MCAST_ENABLE = 15; + ROUTER_INTERFACE_ATTR_V6_MCAST_ENABLE = 16; + ROUTER_INTERFACE_ATTR_LOOPBACK_PACKET_ACTION = 17; + ROUTER_INTERFACE_ATTR_IS_VIRTUAL = 18; + ROUTER_INTERFACE_ATTR_NAT_ZONE_ID = 19; + ROUTER_INTERFACE_ATTR_DISABLE_DECREMENT_TTL = 20; + ROUTER_INTERFACE_ATTR_ADMIN_MPLS_STATE = 21; +} + +message CreateRouterInterfaceRequest { + uint64 switch = 1; + + uint64 virtual_router_id = 2; + RouterInterfaceType type = 3; + uint64 port_id = 4; + uint64 vlan_id = 5; + uint32 outer_vlan_id = 6; + uint32 inner_vlan_id = 7; + uint64 bridge_id = 8; + bytes src_mac_address = 9; + bool admin_v4_state = 10; + bool admin_v6_state = 11; + uint32 mtu = 12; + uint64 ingress_acl = 13; + uint64 egress_acl = 14; + PacketAction neighbor_miss_packet_action = 15; + bool v4_mcast_enable = 16; + bool v6_mcast_enable = 17; + PacketAction loopback_packet_action = 18; + bool is_virtual = 19; + uint32 nat_zone_id = 20; + bool disable_decrement_ttl = 21; + bool admin_mpls_state = 22; +} + +message CreateRouterInterfaceResponse { + uint64 oid = 1; +} + +message RemoveRouterInterfaceRequest { + uint64 oid = 1; +} + +message RemoveRouterInterfaceResponse {} + +message SetRouterInterfaceAttributeRequest { + uint64 oid = 1; + oneof attr { + bytes src_mac_address = 2; + bool admin_v4_state = 3; + bool admin_v6_state = 4; + uint32 mtu = 5; + uint64 ingress_acl = 6; + uint64 egress_acl = 7; + PacketAction neighbor_miss_packet_action = 8; + bool v4_mcast_enable = 9; + bool v6_mcast_enable = 10; + PacketAction loopback_packet_action = 11; + uint32 nat_zone_id = 12; + bool disable_decrement_ttl = 13; + bool admin_mpls_state = 14; + } +} + +message SetRouterInterfaceAttributeResponse {} + +message GetRouterInterfaceAttributeRequest { + uint64 oid = 1; + RouterInterfaceAttr attr_type = 2; +} + +message GetRouterInterfaceAttributeResponse { + RouterInterfaceAttribute attr = 1; +} + +service RouterInterface { + rpc CreateRouterInterface(CreateRouterInterfaceRequest) + returns (CreateRouterInterfaceResponse) {} + rpc RemoveRouterInterface(RemoveRouterInterfaceRequest) + returns (RemoveRouterInterfaceResponse) {} + rpc SetRouterInterfaceAttribute(SetRouterInterfaceAttributeRequest) + returns (SetRouterInterfaceAttributeResponse) {} + rpc GetRouterInterfaceAttribute(GetRouterInterfaceAttributeRequest) + returns (GetRouterInterfaceAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/rpf_group.proto b/dataplane/standalone/proto/rpf_group.proto new file mode 100644 index 00000000..c506537f --- /dev/null +++ b/dataplane/standalone/proto/rpf_group.proto @@ -0,0 +1,82 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum RpfGroupAttr { + RPF_GROUP_ATTR_UNSPECIFIED = 0; + RPF_GROUP_ATTR_RPF_INTERFACE_COUNT = 1; + RPF_GROUP_ATTR_RPF_MEMBER_LIST = 2; +} + +enum RpfGroupMemberAttr { + RPF_GROUP_MEMBER_ATTR_UNSPECIFIED = 0; + RPF_GROUP_MEMBER_ATTR_RPF_GROUP_ID = 1; + RPF_GROUP_MEMBER_ATTR_RPF_INTERFACE_ID = 2; +} + +message CreateRpfGroupRequest { + uint64 switch = 1; +} + +message CreateRpfGroupResponse { + uint64 oid = 1; +} + +message RemoveRpfGroupRequest { + uint64 oid = 1; +} + +message RemoveRpfGroupResponse {} + +message GetRpfGroupAttributeRequest { + uint64 oid = 1; + RpfGroupAttr attr_type = 2; +} + +message GetRpfGroupAttributeResponse { + RpfGroupAttribute attr = 1; +} + +message CreateRpfGroupMemberRequest { + uint64 switch = 1; + + uint64 rpf_group_id = 2; + uint64 rpf_interface_id = 3; +} + +message CreateRpfGroupMemberResponse { + uint64 oid = 1; +} + +message RemoveRpfGroupMemberRequest { + uint64 oid = 1; +} + +message RemoveRpfGroupMemberResponse {} + +message GetRpfGroupMemberAttributeRequest { + uint64 oid = 1; + RpfGroupMemberAttr attr_type = 2; +} + +message GetRpfGroupMemberAttributeResponse { + RpfGroupMemberAttribute attr = 1; +} + +service RpfGroup { + rpc CreateRpfGroup(CreateRpfGroupRequest) returns (CreateRpfGroupResponse) {} + rpc RemoveRpfGroup(RemoveRpfGroupRequest) returns (RemoveRpfGroupResponse) {} + rpc GetRpfGroupAttribute(GetRpfGroupAttributeRequest) + returns (GetRpfGroupAttributeResponse) {} + rpc CreateRpfGroupMember(CreateRpfGroupMemberRequest) + returns (CreateRpfGroupMemberResponse) {} + rpc RemoveRpfGroupMember(RemoveRpfGroupMemberRequest) + returns (RemoveRpfGroupMemberResponse) {} + rpc GetRpfGroupMemberAttribute(GetRpfGroupMemberAttributeRequest) + returns (GetRpfGroupMemberAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/samplepacket.proto b/dataplane/standalone/proto/samplepacket.proto new file mode 100644 index 00000000..c8c77064 --- /dev/null +++ b/dataplane/standalone/proto/samplepacket.proto @@ -0,0 +1,62 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum SamplepacketAttr { + SAMPLEPACKET_ATTR_UNSPECIFIED = 0; + SAMPLEPACKET_ATTR_SAMPLE_RATE = 1; + SAMPLEPACKET_ATTR_TYPE = 2; + SAMPLEPACKET_ATTR_MODE = 3; +} + +message CreateSamplepacketRequest { + uint64 switch = 1; + + uint32 sample_rate = 2; + SamplepacketType type = 3; + SamplepacketMode mode = 4; +} + +message CreateSamplepacketResponse { + uint64 oid = 1; +} + +message RemoveSamplepacketRequest { + uint64 oid = 1; +} + +message RemoveSamplepacketResponse {} + +message SetSamplepacketAttributeRequest { + uint64 oid = 1; + oneof attr { + uint32 sample_rate = 2; + } +} + +message SetSamplepacketAttributeResponse {} + +message GetSamplepacketAttributeRequest { + uint64 oid = 1; + SamplepacketAttr attr_type = 2; +} + +message GetSamplepacketAttributeResponse { + SamplepacketAttribute attr = 1; +} + +service Samplepacket { + rpc CreateSamplepacket(CreateSamplepacketRequest) + returns (CreateSamplepacketResponse) {} + rpc RemoveSamplepacket(RemoveSamplepacketRequest) + returns (RemoveSamplepacketResponse) {} + rpc SetSamplepacketAttribute(SetSamplepacketAttributeRequest) + returns (SetSamplepacketAttributeResponse) {} + rpc GetSamplepacketAttribute(GetSamplepacketAttributeRequest) + returns (GetSamplepacketAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/scheduler.proto b/dataplane/standalone/proto/scheduler.proto new file mode 100644 index 00000000..06f3dc81 --- /dev/null +++ b/dataplane/standalone/proto/scheduler.proto @@ -0,0 +1,76 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum SchedulerAttr { + SCHEDULER_ATTR_UNSPECIFIED = 0; + SCHEDULER_ATTR_SCHEDULING_TYPE = 1; + SCHEDULER_ATTR_SCHEDULING_WEIGHT = 2; + SCHEDULER_ATTR_METER_TYPE = 3; + SCHEDULER_ATTR_MIN_BANDWIDTH_RATE = 4; + SCHEDULER_ATTR_MIN_BANDWIDTH_BURST_RATE = 5; + SCHEDULER_ATTR_MAX_BANDWIDTH_RATE = 6; + SCHEDULER_ATTR_MAX_BANDWIDTH_BURST_RATE = 7; +} + +message CreateSchedulerRequest { + uint64 switch = 1; + + SchedulingType scheduling_type = 2; + uint32 scheduling_weight = 3; + MeterType meter_type = 4; + uint64 min_bandwidth_rate = 5; + uint64 min_bandwidth_burst_rate = 6; + uint64 max_bandwidth_rate = 7; + uint64 max_bandwidth_burst_rate = 8; +} + +message CreateSchedulerResponse { + uint64 oid = 1; +} + +message RemoveSchedulerRequest { + uint64 oid = 1; +} + +message RemoveSchedulerResponse {} + +message SetSchedulerAttributeRequest { + uint64 oid = 1; + oneof attr { + SchedulingType scheduling_type = 2; + uint32 scheduling_weight = 3; + MeterType meter_type = 4; + uint64 min_bandwidth_rate = 5; + uint64 min_bandwidth_burst_rate = 6; + uint64 max_bandwidth_rate = 7; + uint64 max_bandwidth_burst_rate = 8; + } +} + +message SetSchedulerAttributeResponse {} + +message GetSchedulerAttributeRequest { + uint64 oid = 1; + SchedulerAttr attr_type = 2; +} + +message GetSchedulerAttributeResponse { + SchedulerAttribute attr = 1; +} + +service Scheduler { + rpc CreateScheduler(CreateSchedulerRequest) + returns (CreateSchedulerResponse) {} + rpc RemoveScheduler(RemoveSchedulerRequest) + returns (RemoveSchedulerResponse) {} + rpc SetSchedulerAttribute(SetSchedulerAttributeRequest) + returns (SetSchedulerAttributeResponse) {} + rpc GetSchedulerAttribute(GetSchedulerAttributeRequest) + returns (GetSchedulerAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/scheduler_group.proto b/dataplane/standalone/proto/scheduler_group.proto new file mode 100644 index 00000000..b736fb96 --- /dev/null +++ b/dataplane/standalone/proto/scheduler_group.proto @@ -0,0 +1,69 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum SchedulerGroupAttr { + SCHEDULER_GROUP_ATTR_UNSPECIFIED = 0; + SCHEDULER_GROUP_ATTR_CHILD_COUNT = 1; + SCHEDULER_GROUP_ATTR_CHILD_LIST = 2; + SCHEDULER_GROUP_ATTR_PORT_ID = 3; + SCHEDULER_GROUP_ATTR_LEVEL = 4; + SCHEDULER_GROUP_ATTR_MAX_CHILDS = 5; + SCHEDULER_GROUP_ATTR_SCHEDULER_PROFILE_ID = 6; + SCHEDULER_GROUP_ATTR_PARENT_NODE = 7; +} + +message CreateSchedulerGroupRequest { + uint64 switch = 1; + + uint64 port_id = 2; + uint32 level = 3; + uint32 max_childs = 4; + uint64 scheduler_profile_id = 5; + uint64 parent_node = 6; +} + +message CreateSchedulerGroupResponse { + uint64 oid = 1; +} + +message RemoveSchedulerGroupRequest { + uint64 oid = 1; +} + +message RemoveSchedulerGroupResponse {} + +message SetSchedulerGroupAttributeRequest { + uint64 oid = 1; + oneof attr { + uint64 scheduler_profile_id = 2; + uint64 parent_node = 3; + } +} + +message SetSchedulerGroupAttributeResponse {} + +message GetSchedulerGroupAttributeRequest { + uint64 oid = 1; + SchedulerGroupAttr attr_type = 2; +} + +message GetSchedulerGroupAttributeResponse { + SchedulerGroupAttribute attr = 1; +} + +service SchedulerGroup { + rpc CreateSchedulerGroup(CreateSchedulerGroupRequest) + returns (CreateSchedulerGroupResponse) {} + rpc RemoveSchedulerGroup(RemoveSchedulerGroupRequest) + returns (RemoveSchedulerGroupResponse) {} + rpc SetSchedulerGroupAttribute(SetSchedulerGroupAttributeRequest) + returns (SetSchedulerGroupAttributeResponse) {} + rpc GetSchedulerGroupAttribute(GetSchedulerGroupAttributeRequest) + returns (GetSchedulerGroupAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/srv6.proto b/dataplane/standalone/proto/srv6.proto new file mode 100644 index 00000000..657a1fe9 --- /dev/null +++ b/dataplane/standalone/proto/srv6.proto @@ -0,0 +1,131 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum MySidEntryAttr { + MY_SID_ENTRY_ATTR_UNSPECIFIED = 0; + MY_SID_ENTRY_ATTR_ENDPOINT_BEHAVIOR = 1; + MY_SID_ENTRY_ATTR_ENDPOINT_BEHAVIOR_FLAVOR = 2; + MY_SID_ENTRY_ATTR_PACKET_ACTION = 3; + MY_SID_ENTRY_ATTR_TRAP_PRIORITY = 4; + MY_SID_ENTRY_ATTR_NEXT_HOP_ID = 5; + MY_SID_ENTRY_ATTR_TUNNEL_ID = 6; + MY_SID_ENTRY_ATTR_VRF = 7; + MY_SID_ENTRY_ATTR_COUNTER_ID = 8; +} + +enum Srv6SidlistAttr { + SRV6_SIDLIST_ATTR_UNSPECIFIED = 0; + SRV6_SIDLIST_ATTR_TYPE = 1; + SRV6_SIDLIST_ATTR_TLV_LIST = 2; + SRV6_SIDLIST_ATTR_SEGMENT_LIST = 3; +} + +message CreateSrv6SidlistRequest { + uint64 switch = 1; + + Srv6SidlistType type = 2; + repeated TLVEntry tlv_list = 3; + repeated bytes segment_list = 4; +} + +message CreateSrv6SidlistResponse { + uint64 oid = 1; +} + +message RemoveSrv6SidlistRequest { + uint64 oid = 1; +} + +message RemoveSrv6SidlistResponse {} + +message SetSrv6SidlistAttributeRequest { + uint64 oid = 1; + oneof attr { + TlvEntryList tlv_list = 2; + BytesList segment_list = 3; + } +} + +message SetSrv6SidlistAttributeResponse {} + +message GetSrv6SidlistAttributeRequest { + uint64 oid = 1; + Srv6SidlistAttr attr_type = 2; +} + +message GetSrv6SidlistAttributeResponse { + Srv6SidlistAttribute attr = 1; +} + +message CreateMySidEntryRequest { + MySidEntry entry = 1; + + MySidEntryEndpointBehavior endpoint_behavior = 2; + MySidEntryEndpointBehaviorFlavor endpoint_behavior_flavor = 3; + PacketAction packet_action = 4; + uint32 trap_priority = 5; + uint64 next_hop_id = 6; + uint64 tunnel_id = 7; + uint64 vrf = 8; + uint64 counter_id = 9; +} + +message CreateMySidEntryResponse { + uint64 oid = 1; +} + +message RemoveMySidEntryRequest { + MySidEntry entry = 1; +} + +message RemoveMySidEntryResponse {} + +message SetMySidEntryAttributeRequest { + MySidEntry entry = 1; + oneof attr { + MySidEntryEndpointBehavior endpoint_behavior = 2; + MySidEntryEndpointBehaviorFlavor endpoint_behavior_flavor = 3; + PacketAction packet_action = 4; + uint32 trap_priority = 5; + uint64 next_hop_id = 6; + uint64 tunnel_id = 7; + uint64 vrf = 8; + uint64 counter_id = 9; + } +} + +message SetMySidEntryAttributeResponse {} + +message GetMySidEntryAttributeRequest { + MySidEntry entry = 1; + MySidEntryAttr attr_type = 2; +} + +message GetMySidEntryAttributeResponse { + MySidEntryAttribute attr = 1; +} + +service Srv6 { + rpc CreateSrv6Sidlist(CreateSrv6SidlistRequest) + returns (CreateSrv6SidlistResponse) {} + rpc RemoveSrv6Sidlist(RemoveSrv6SidlistRequest) + returns (RemoveSrv6SidlistResponse) {} + rpc SetSrv6SidlistAttribute(SetSrv6SidlistAttributeRequest) + returns (SetSrv6SidlistAttributeResponse) {} + rpc GetSrv6SidlistAttribute(GetSrv6SidlistAttributeRequest) + returns (GetSrv6SidlistAttributeResponse) {} + rpc CreateMySidEntry(CreateMySidEntryRequest) + returns (CreateMySidEntryResponse) {} + rpc RemoveMySidEntry(RemoveMySidEntryRequest) + returns (RemoveMySidEntryResponse) {} + rpc SetMySidEntryAttribute(SetMySidEntryAttributeRequest) + returns (SetMySidEntryAttributeResponse) {} + rpc GetMySidEntryAttribute(GetMySidEntryAttributeRequest) + returns (GetMySidEntryAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/stp.proto b/dataplane/standalone/proto/stp.proto new file mode 100644 index 00000000..9b194e9e --- /dev/null +++ b/dataplane/standalone/proto/stp.proto @@ -0,0 +1,94 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum StpAttr { + STP_ATTR_UNSPECIFIED = 0; + STP_ATTR_VLAN_LIST = 1; + STP_ATTR_BRIDGE_ID = 2; + STP_ATTR_PORT_LIST = 3; +} + +enum StpPortAttr { + STP_PORT_ATTR_UNSPECIFIED = 0; + STP_PORT_ATTR_STP = 1; + STP_PORT_ATTR_BRIDGE_PORT = 2; + STP_PORT_ATTR_STATE = 3; +} + +message CreateStpRequest { + uint64 switch = 1; +} + +message CreateStpResponse { + uint64 oid = 1; +} + +message RemoveStpRequest { + uint64 oid = 1; +} + +message RemoveStpResponse {} + +message GetStpAttributeRequest { + uint64 oid = 1; + StpAttr attr_type = 2; +} + +message GetStpAttributeResponse { + StpAttribute attr = 1; +} + +message CreateStpPortRequest { + uint64 switch = 1; + + uint64 stp = 2; + uint64 bridge_port = 3; + StpPortState state = 4; +} + +message CreateStpPortResponse { + uint64 oid = 1; +} + +message RemoveStpPortRequest { + uint64 oid = 1; +} + +message RemoveStpPortResponse {} + +message SetStpPortAttributeRequest { + uint64 oid = 1; + oneof attr { + StpPortState state = 2; + } +} + +message SetStpPortAttributeResponse {} + +message GetStpPortAttributeRequest { + uint64 oid = 1; + StpPortAttr attr_type = 2; +} + +message GetStpPortAttributeResponse { + StpPortAttribute attr = 1; +} + +service Stp { + rpc CreateStp(CreateStpRequest) returns (CreateStpResponse) {} + rpc RemoveStp(RemoveStpRequest) returns (RemoveStpResponse) {} + rpc GetStpAttribute(GetStpAttributeRequest) + returns (GetStpAttributeResponse) {} + rpc CreateStpPort(CreateStpPortRequest) returns (CreateStpPortResponse) {} + rpc RemoveStpPort(RemoveStpPortRequest) returns (RemoveStpPortResponse) {} + rpc SetStpPortAttribute(SetStpPortAttributeRequest) + returns (SetStpPortAttributeResponse) {} + rpc GetStpPortAttribute(GetStpPortAttributeRequest) + returns (GetStpPortAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/switch.proto b/dataplane/standalone/proto/switch.proto new file mode 100644 index 00000000..b44be62a --- /dev/null +++ b/dataplane/standalone/proto/switch.proto @@ -0,0 +1,554 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum SwitchAttr { + SWITCH_ATTR_UNSPECIFIED = 0; + SWITCH_ATTR_NUMBER_OF_ACTIVE_PORTS = 1; + SWITCH_ATTR_MAX_NUMBER_OF_SUPPORTED_PORTS = 2; + SWITCH_ATTR_PORT_LIST = 3; + SWITCH_ATTR_PORT_MAX_MTU = 4; + SWITCH_ATTR_CPU_PORT = 5; + SWITCH_ATTR_MAX_VIRTUAL_ROUTERS = 6; + SWITCH_ATTR_FDB_TABLE_SIZE = 7; + SWITCH_ATTR_L3_NEIGHBOR_TABLE_SIZE = 8; + SWITCH_ATTR_L3_ROUTE_TABLE_SIZE = 9; + SWITCH_ATTR_LAG_MEMBERS = 10; + SWITCH_ATTR_NUMBER_OF_LAGS = 11; + SWITCH_ATTR_ECMP_MEMBERS = 12; + SWITCH_ATTR_NUMBER_OF_ECMP_GROUPS = 13; + SWITCH_ATTR_NUMBER_OF_UNICAST_QUEUES = 14; + SWITCH_ATTR_NUMBER_OF_MULTICAST_QUEUES = 15; + SWITCH_ATTR_NUMBER_OF_QUEUES = 16; + SWITCH_ATTR_NUMBER_OF_CPU_QUEUES = 17; + SWITCH_ATTR_ON_LINK_ROUTE_SUPPORTED = 18; + SWITCH_ATTR_OPER_STATUS = 19; + SWITCH_ATTR_MAX_NUMBER_OF_TEMP_SENSORS = 20; + SWITCH_ATTR_TEMP_LIST = 21; + SWITCH_ATTR_MAX_TEMP = 22; + SWITCH_ATTR_AVERAGE_TEMP = 23; + SWITCH_ATTR_ACL_TABLE_MINIMUM_PRIORITY = 24; + SWITCH_ATTR_ACL_TABLE_MAXIMUM_PRIORITY = 25; + SWITCH_ATTR_ACL_ENTRY_MINIMUM_PRIORITY = 26; + SWITCH_ATTR_ACL_ENTRY_MAXIMUM_PRIORITY = 27; + SWITCH_ATTR_ACL_TABLE_GROUP_MINIMUM_PRIORITY = 28; + SWITCH_ATTR_ACL_TABLE_GROUP_MAXIMUM_PRIORITY = 29; + SWITCH_ATTR_FDB_DST_USER_META_DATA_RANGE = 30; + SWITCH_ATTR_ROUTE_DST_USER_META_DATA_RANGE = 31; + SWITCH_ATTR_NEIGHBOR_DST_USER_META_DATA_RANGE = 32; + SWITCH_ATTR_PORT_USER_META_DATA_RANGE = 33; + SWITCH_ATTR_VLAN_USER_META_DATA_RANGE = 34; + SWITCH_ATTR_ACL_USER_META_DATA_RANGE = 35; + SWITCH_ATTR_ACL_USER_TRAP_ID_RANGE = 36; + SWITCH_ATTR_DEFAULT_VLAN_ID = 37; + SWITCH_ATTR_DEFAULT_STP_INST_ID = 38; + SWITCH_ATTR_MAX_STP_INSTANCE = 39; + SWITCH_ATTR_DEFAULT_VIRTUAL_ROUTER_ID = 40; + SWITCH_ATTR_DEFAULT_OVERRIDE_VIRTUAL_ROUTER_ID = 41; + SWITCH_ATTR_DEFAULT_1Q_BRIDGE_ID = 42; + SWITCH_ATTR_INGRESS_ACL = 43; + SWITCH_ATTR_EGRESS_ACL = 44; + SWITCH_ATTR_QOS_MAX_NUMBER_OF_TRAFFIC_CLASSES = 45; + SWITCH_ATTR_QOS_MAX_NUMBER_OF_SCHEDULER_GROUP_HIERARCHY_LEVELS = 46; + SWITCH_ATTR_QOS_MAX_NUMBER_OF_SCHEDULER_GROUPS_PER_HIERARCHY_LEVEL = 47; + SWITCH_ATTR_QOS_MAX_NUMBER_OF_CHILDS_PER_SCHEDULER_GROUP = 48; + SWITCH_ATTR_TOTAL_BUFFER_SIZE = 49; + SWITCH_ATTR_INGRESS_BUFFER_POOL_NUM = 50; + SWITCH_ATTR_EGRESS_BUFFER_POOL_NUM = 51; + SWITCH_ATTR_AVAILABLE_IPV4_ROUTE_ENTRY = 52; + SWITCH_ATTR_AVAILABLE_IPV6_ROUTE_ENTRY = 53; + SWITCH_ATTR_AVAILABLE_IPV4_NEXTHOP_ENTRY = 54; + SWITCH_ATTR_AVAILABLE_IPV6_NEXTHOP_ENTRY = 55; + SWITCH_ATTR_AVAILABLE_IPV4_NEIGHBOR_ENTRY = 56; + SWITCH_ATTR_AVAILABLE_IPV6_NEIGHBOR_ENTRY = 57; + SWITCH_ATTR_AVAILABLE_NEXT_HOP_GROUP_ENTRY = 58; + SWITCH_ATTR_AVAILABLE_NEXT_HOP_GROUP_MEMBER_ENTRY = 59; + SWITCH_ATTR_AVAILABLE_FDB_ENTRY = 60; + SWITCH_ATTR_AVAILABLE_L2MC_ENTRY = 61; + SWITCH_ATTR_AVAILABLE_IPMC_ENTRY = 62; + SWITCH_ATTR_AVAILABLE_SNAT_ENTRY = 63; + SWITCH_ATTR_AVAILABLE_DNAT_ENTRY = 64; + SWITCH_ATTR_AVAILABLE_DOUBLE_NAT_ENTRY = 65; + SWITCH_ATTR_AVAILABLE_ACL_TABLE = 66; + SWITCH_ATTR_AVAILABLE_ACL_TABLE_GROUP = 67; + SWITCH_ATTR_AVAILABLE_MY_SID_ENTRY = 68; + SWITCH_ATTR_DEFAULT_TRAP_GROUP = 69; + SWITCH_ATTR_ECMP_HASH = 70; + SWITCH_ATTR_LAG_HASH = 71; + SWITCH_ATTR_RESTART_WARM = 72; + SWITCH_ATTR_WARM_RECOVER = 73; + SWITCH_ATTR_RESTART_TYPE = 74; + SWITCH_ATTR_MIN_PLANNED_RESTART_INTERVAL = 75; + SWITCH_ATTR_NV_STORAGE_SIZE = 76; + SWITCH_ATTR_MAX_ACL_ACTION_COUNT = 77; + SWITCH_ATTR_MAX_ACL_RANGE_COUNT = 78; + SWITCH_ATTR_ACL_CAPABILITY = 79; + SWITCH_ATTR_MCAST_SNOOPING_CAPABILITY = 80; + SWITCH_ATTR_SWITCHING_MODE = 81; + SWITCH_ATTR_BCAST_CPU_FLOOD_ENABLE = 82; + SWITCH_ATTR_MCAST_CPU_FLOOD_ENABLE = 83; + SWITCH_ATTR_SRC_MAC_ADDRESS = 84; + SWITCH_ATTR_MAX_LEARNED_ADDRESSES = 85; + SWITCH_ATTR_FDB_AGING_TIME = 86; + SWITCH_ATTR_FDB_UNICAST_MISS_PACKET_ACTION = 87; + SWITCH_ATTR_FDB_BROADCAST_MISS_PACKET_ACTION = 88; + SWITCH_ATTR_FDB_MULTICAST_MISS_PACKET_ACTION = 89; + SWITCH_ATTR_ECMP_DEFAULT_HASH_ALGORITHM = 90; + SWITCH_ATTR_ECMP_DEFAULT_HASH_SEED = 91; + SWITCH_ATTR_ECMP_DEFAULT_HASH_OFFSET = 92; + SWITCH_ATTR_ECMP_DEFAULT_SYMMETRIC_HASH = 93; + SWITCH_ATTR_ECMP_HASH_IPV4 = 94; + SWITCH_ATTR_ECMP_HASH_IPV4_IN_IPV4 = 95; + SWITCH_ATTR_ECMP_HASH_IPV6 = 96; + SWITCH_ATTR_LAG_DEFAULT_HASH_ALGORITHM = 97; + SWITCH_ATTR_LAG_DEFAULT_HASH_SEED = 98; + SWITCH_ATTR_LAG_DEFAULT_HASH_OFFSET = 99; + SWITCH_ATTR_LAG_DEFAULT_SYMMETRIC_HASH = 100; + SWITCH_ATTR_LAG_HASH_IPV4 = 101; + SWITCH_ATTR_LAG_HASH_IPV4_IN_IPV4 = 102; + SWITCH_ATTR_LAG_HASH_IPV6 = 103; + SWITCH_ATTR_COUNTER_REFRESH_INTERVAL = 104; + SWITCH_ATTR_QOS_DEFAULT_TC = 105; + SWITCH_ATTR_QOS_DOT1P_TO_TC_MAP = 106; + SWITCH_ATTR_QOS_DOT1P_TO_COLOR_MAP = 107; + SWITCH_ATTR_QOS_DSCP_TO_TC_MAP = 108; + SWITCH_ATTR_QOS_DSCP_TO_COLOR_MAP = 109; + SWITCH_ATTR_QOS_TC_TO_QUEUE_MAP = 110; + SWITCH_ATTR_QOS_TC_AND_COLOR_TO_DOT1P_MAP = 111; + SWITCH_ATTR_QOS_TC_AND_COLOR_TO_DSCP_MAP = 112; + SWITCH_ATTR_SWITCH_SHELL_ENABLE = 113; + SWITCH_ATTR_SWITCH_PROFILE_ID = 114; + SWITCH_ATTR_SWITCH_HARDWARE_INFO = 115; + SWITCH_ATTR_FIRMWARE_PATH_NAME = 116; + SWITCH_ATTR_INIT_SWITCH = 117; + SWITCH_ATTR_SWITCH_STATE_CHANGE_NOTIFY = 118; + SWITCH_ATTR_SWITCH_SHUTDOWN_REQUEST_NOTIFY = 119; + SWITCH_ATTR_FDB_EVENT_NOTIFY = 120; + SWITCH_ATTR_PORT_STATE_CHANGE_NOTIFY = 121; + SWITCH_ATTR_PACKET_EVENT_NOTIFY = 122; + SWITCH_ATTR_FAST_API_ENABLE = 123; + SWITCH_ATTR_MIRROR_TC = 124; + SWITCH_ATTR_ACL_STAGE_INGRESS = 125; + SWITCH_ATTR_ACL_STAGE_EGRESS = 126; + SWITCH_ATTR_SRV6_MAX_SID_DEPTH = 127; + SWITCH_ATTR_SRV6_TLV_TYPE = 128; + SWITCH_ATTR_QOS_NUM_LOSSLESS_QUEUES = 129; + SWITCH_ATTR_QUEUE_PFC_DEADLOCK_NOTIFY = 130; + SWITCH_ATTR_PFC_DLR_PACKET_ACTION = 131; + SWITCH_ATTR_PFC_TC_DLD_INTERVAL_RANGE = 132; + SWITCH_ATTR_PFC_TC_DLD_INTERVAL = 133; + SWITCH_ATTR_PFC_TC_DLR_INTERVAL_RANGE = 134; + SWITCH_ATTR_PFC_TC_DLR_INTERVAL = 135; + SWITCH_ATTR_SUPPORTED_PROTECTED_OBJECT_TYPE = 136; + SWITCH_ATTR_TPID_OUTER_VLAN = 137; + SWITCH_ATTR_TPID_INNER_VLAN = 138; + SWITCH_ATTR_CRC_CHECK_ENABLE = 139; + SWITCH_ATTR_CRC_RECALCULATION_ENABLE = 140; + SWITCH_ATTR_BFD_SESSION_STATE_CHANGE_NOTIFY = 141; + SWITCH_ATTR_NUMBER_OF_BFD_SESSION = 142; + SWITCH_ATTR_MAX_BFD_SESSION = 143; + SWITCH_ATTR_SUPPORTED_IPV4_BFD_SESSION_OFFLOAD_TYPE = 144; + SWITCH_ATTR_SUPPORTED_IPV6_BFD_SESSION_OFFLOAD_TYPE = 145; + SWITCH_ATTR_MIN_BFD_RX = 146; + SWITCH_ATTR_MIN_BFD_TX = 147; + SWITCH_ATTR_ECN_ECT_THRESHOLD_ENABLE = 148; + SWITCH_ATTR_VXLAN_DEFAULT_ROUTER_MAC = 149; + SWITCH_ATTR_VXLAN_DEFAULT_PORT = 150; + SWITCH_ATTR_MAX_MIRROR_SESSION = 151; + SWITCH_ATTR_MAX_SAMPLED_MIRROR_SESSION = 152; + SWITCH_ATTR_SUPPORTED_EXTENDED_STATS_MODE = 153; + SWITCH_ATTR_UNINIT_DATA_PLANE_ON_REMOVAL = 154; + SWITCH_ATTR_TAM_OBJECT_ID = 155; + SWITCH_ATTR_TAM_EVENT_NOTIFY = 156; + SWITCH_ATTR_SUPPORTED_OBJECT_TYPE_LIST = 157; + SWITCH_ATTR_PRE_SHUTDOWN = 158; + SWITCH_ATTR_NAT_ZONE_COUNTER_OBJECT_ID = 159; + SWITCH_ATTR_NAT_ENABLE = 160; + SWITCH_ATTR_HARDWARE_ACCESS_BUS = 161; + SWITCH_ATTR_PLATFROM_CONTEXT = 162; + SWITCH_ATTR_REGISTER_READ = 163; + SWITCH_ATTR_REGISTER_WRITE = 164; + SWITCH_ATTR_FIRMWARE_DOWNLOAD_BROADCAST = 165; + SWITCH_ATTR_FIRMWARE_LOAD_METHOD = 166; + SWITCH_ATTR_FIRMWARE_LOAD_TYPE = 167; + SWITCH_ATTR_FIRMWARE_DOWNLOAD_EXECUTE = 168; + SWITCH_ATTR_FIRMWARE_BROADCAST_STOP = 169; + SWITCH_ATTR_FIRMWARE_VERIFY_AND_INIT_SWITCH = 170; + SWITCH_ATTR_FIRMWARE_STATUS = 171; + SWITCH_ATTR_FIRMWARE_MAJOR_VERSION = 172; + SWITCH_ATTR_FIRMWARE_MINOR_VERSION = 173; + SWITCH_ATTR_PORT_CONNECTOR_LIST = 174; + SWITCH_ATTR_PROPOGATE_PORT_STATE_FROM_LINE_TO_SYSTEM_PORT_SUPPORT = 175; + SWITCH_ATTR_TYPE = 176; + SWITCH_ATTR_MACSEC_OBJECT_LIST = 177; + SWITCH_ATTR_QOS_MPLS_EXP_TO_TC_MAP = 178; + SWITCH_ATTR_QOS_MPLS_EXP_TO_COLOR_MAP = 179; + SWITCH_ATTR_QOS_TC_AND_COLOR_TO_MPLS_EXP_MAP = 180; + SWITCH_ATTR_SWITCH_ID = 181; + SWITCH_ATTR_MAX_SYSTEM_CORES = 182; + SWITCH_ATTR_SYSTEM_PORT_CONFIG_LIST = 183; + SWITCH_ATTR_NUMBER_OF_SYSTEM_PORTS = 184; + SWITCH_ATTR_SYSTEM_PORT_LIST = 185; + SWITCH_ATTR_NUMBER_OF_FABRIC_PORTS = 186; + SWITCH_ATTR_FABRIC_PORT_LIST = 187; + SWITCH_ATTR_PACKET_DMA_MEMORY_POOL_SIZE = 188; + SWITCH_ATTR_FAILOVER_CONFIG_MODE = 189; + SWITCH_ATTR_SUPPORTED_FAILOVER_MODE = 190; + SWITCH_ATTR_TUNNEL_OBJECTS_LIST = 191; + SWITCH_ATTR_PACKET_AVAILABLE_DMA_MEMORY_POOL_SIZE = 192; + SWITCH_ATTR_PRE_INGRESS_ACL = 193; + SWITCH_ATTR_AVAILABLE_SNAPT_ENTRY = 194; + SWITCH_ATTR_AVAILABLE_DNAPT_ENTRY = 195; + SWITCH_ATTR_AVAILABLE_DOUBLE_NAPT_ENTRY = 196; + SWITCH_ATTR_SLAVE_MDIO_ADDR_LIST = 197; + SWITCH_ATTR_MY_MAC_TABLE_MINIMUM_PRIORITY = 198; + SWITCH_ATTR_MY_MAC_TABLE_MAXIMUM_PRIORITY = 199; + SWITCH_ATTR_MY_MAC_LIST = 200; + SWITCH_ATTR_INSTALLED_MY_MAC_ENTRIES = 201; + SWITCH_ATTR_AVAILABLE_MY_MAC_ENTRIES = 202; + SWITCH_ATTR_MAX_NUMBER_OF_FORWARDING_CLASSES = 203; + SWITCH_ATTR_QOS_DSCP_TO_FORWARDING_CLASS_MAP = 204; + SWITCH_ATTR_QOS_MPLS_EXP_TO_FORWARDING_CLASS_MAP = 205; + SWITCH_ATTR_IPSEC_OBJECT_ID = 206; + SWITCH_ATTR_IPSEC_SA_TAG_TPID = 207; + SWITCH_ATTR_IPSEC_SA_STATUS_CHANGE_NOTIFY = 208; +} + +enum SwitchTunnelAttr { + SWITCH_TUNNEL_ATTR_UNSPECIFIED = 0; + SWITCH_TUNNEL_ATTR_TUNNEL_TYPE = 1; + SWITCH_TUNNEL_ATTR_LOOPBACK_PACKET_ACTION = 2; + SWITCH_TUNNEL_ATTR_TUNNEL_ENCAP_ECN_MODE = 3; + SWITCH_TUNNEL_ATTR_ENCAP_MAPPERS = 4; + SWITCH_TUNNEL_ATTR_TUNNEL_DECAP_ECN_MODE = 5; + SWITCH_TUNNEL_ATTR_DECAP_MAPPERS = 6; + SWITCH_TUNNEL_ATTR_TUNNEL_VXLAN_UDP_SPORT_MODE = 7; + SWITCH_TUNNEL_ATTR_VXLAN_UDP_SPORT = 8; + SWITCH_TUNNEL_ATTR_VXLAN_UDP_SPORT_MASK = 9; +} + +message CreateSwitchRequest { + uint64 ingress_acl = 2; + uint64 egress_acl = 3; + bool restart_warm = 4; + bool warm_recover = 5; + SwitchSwitchingMode switching_mode = 6; + bool bcast_cpu_flood_enable = 7; + bool mcast_cpu_flood_enable = 8; + bytes src_mac_address = 9; + uint32 max_learned_addresses = 10; + uint32 fdb_aging_time = 11; + PacketAction fdb_unicast_miss_packet_action = 12; + PacketAction fdb_broadcast_miss_packet_action = 13; + PacketAction fdb_multicast_miss_packet_action = 14; + HashAlgorithm ecmp_default_hash_algorithm = 15; + uint32 ecmp_default_hash_seed = 16; + uint32 ecmp_default_hash_offset = 17; + bool ecmp_default_symmetric_hash = 18; + uint64 ecmp_hash_ipv4 = 19; + uint64 ecmp_hash_ipv4_in_ipv4 = 20; + uint64 ecmp_hash_ipv6 = 21; + HashAlgorithm lag_default_hash_algorithm = 22; + uint32 lag_default_hash_seed = 23; + uint32 lag_default_hash_offset = 24; + bool lag_default_symmetric_hash = 25; + uint64 lag_hash_ipv4 = 26; + uint64 lag_hash_ipv4_in_ipv4 = 27; + uint64 lag_hash_ipv6 = 28; + uint32 counter_refresh_interval = 29; + uint32 qos_default_tc = 30; + uint64 qos_dot1p_to_tc_map = 31; + uint64 qos_dot1p_to_color_map = 32; + uint64 qos_dscp_to_tc_map = 33; + uint64 qos_dscp_to_color_map = 34; + uint64 qos_tc_to_queue_map = 35; + uint64 qos_tc_and_color_to_dot1p_map = 36; + uint64 qos_tc_and_color_to_dscp_map = 37; + bool switch_shell_enable = 38; + uint32 switch_profile_id = 39; + repeated int32 switch_hardware_info = 40; + repeated int32 firmware_path_name = 41; + bool init_switch = 42; + bool fast_api_enable = 43; + uint32 mirror_tc = 44; + PacketAction pfc_dlr_packet_action = 45; + repeated UintMap pfc_tc_dld_interval = 46; + repeated UintMap pfc_tc_dlr_interval = 47; + uint32 tpid_outer_vlan = 48; + uint32 tpid_inner_vlan = 49; + bool crc_check_enable = 50; + bool crc_recalculation_enable = 51; + bool ecn_ect_threshold_enable = 52; + bytes vxlan_default_router_mac = 53; + uint32 vxlan_default_port = 54; + bool uninit_data_plane_on_removal = 55; + repeated uint64 tam_object_id = 56; + bool pre_shutdown = 57; + uint64 nat_zone_counter_object_id = 58; + bool nat_enable = 59; + SwitchHardwareAccessBus hardware_access_bus = 60; + uint64 platfrom_context = 61; + bool firmware_download_broadcast = 62; + SwitchFirmwareLoadMethod firmware_load_method = 63; + SwitchFirmwareLoadType firmware_load_type = 64; + bool firmware_download_execute = 65; + bool firmware_broadcast_stop = 66; + bool firmware_verify_and_init_switch = 67; + SwitchType type = 68; + repeated uint64 macsec_object_list = 69; + uint64 qos_mpls_exp_to_tc_map = 70; + uint64 qos_mpls_exp_to_color_map = 71; + uint64 qos_tc_and_color_to_mpls_exp_map = 72; + uint32 switch_id = 73; + uint32 max_system_cores = 74; + repeated SystemPortConfig system_port_config_list = 75; + SwitchFailoverConfigMode failover_config_mode = 76; + repeated uint64 tunnel_objects_list = 77; + uint64 pre_ingress_acl = 78; + repeated uint32 slave_mdio_addr_list = 79; + uint64 qos_dscp_to_forwarding_class_map = 80; + uint64 qos_mpls_exp_to_forwarding_class_map = 81; + uint64 ipsec_object_id = 82; + uint32 ipsec_sa_tag_tpid = 83; +} + +message CreateSwitchResponse { + uint64 oid = 1; +} + +message RemoveSwitchRequest { + uint64 oid = 1; +} + +message RemoveSwitchResponse {} + +message SetSwitchAttributeRequest { + uint64 oid = 1; + oneof attr { + uint64 ingress_acl = 2; + uint64 egress_acl = 3; + bool restart_warm = 4; + bool warm_recover = 5; + SwitchSwitchingMode switching_mode = 6; + bool bcast_cpu_flood_enable = 7; + bool mcast_cpu_flood_enable = 8; + bytes src_mac_address = 9; + uint32 max_learned_addresses = 10; + uint32 fdb_aging_time = 11; + PacketAction fdb_unicast_miss_packet_action = 12; + PacketAction fdb_broadcast_miss_packet_action = 13; + PacketAction fdb_multicast_miss_packet_action = 14; + HashAlgorithm ecmp_default_hash_algorithm = 15; + uint32 ecmp_default_hash_seed = 16; + uint32 ecmp_default_hash_offset = 17; + bool ecmp_default_symmetric_hash = 18; + uint64 ecmp_hash_ipv4 = 19; + uint64 ecmp_hash_ipv4_in_ipv4 = 20; + uint64 ecmp_hash_ipv6 = 21; + HashAlgorithm lag_default_hash_algorithm = 22; + uint32 lag_default_hash_seed = 23; + uint32 lag_default_hash_offset = 24; + bool lag_default_symmetric_hash = 25; + uint64 lag_hash_ipv4 = 26; + uint64 lag_hash_ipv4_in_ipv4 = 27; + uint64 lag_hash_ipv6 = 28; + uint32 counter_refresh_interval = 29; + uint32 qos_default_tc = 30; + uint64 qos_dot1p_to_tc_map = 31; + uint64 qos_dot1p_to_color_map = 32; + uint64 qos_dscp_to_tc_map = 33; + uint64 qos_dscp_to_color_map = 34; + uint64 qos_tc_to_queue_map = 35; + uint64 qos_tc_and_color_to_dot1p_map = 36; + uint64 qos_tc_and_color_to_dscp_map = 37; + bool switch_shell_enable = 38; + bool fast_api_enable = 39; + uint32 mirror_tc = 40; + PacketAction pfc_dlr_packet_action = 41; + UintMapList pfc_tc_dld_interval = 42; + UintMapList pfc_tc_dlr_interval = 43; + uint32 tpid_outer_vlan = 44; + uint32 tpid_inner_vlan = 45; + bool crc_check_enable = 46; + bool crc_recalculation_enable = 47; + bool ecn_ect_threshold_enable = 48; + bytes vxlan_default_router_mac = 49; + uint32 vxlan_default_port = 50; + bool uninit_data_plane_on_removal = 51; + Uint64List tam_object_id = 52; + bool pre_shutdown = 53; + uint64 nat_zone_counter_object_id = 54; + bool nat_enable = 55; + bool firmware_download_execute = 56; + bool firmware_broadcast_stop = 57; + bool firmware_verify_and_init_switch = 58; + Uint64List macsec_object_list = 59; + uint64 qos_mpls_exp_to_tc_map = 60; + uint64 qos_mpls_exp_to_color_map = 61; + uint64 qos_tc_and_color_to_mpls_exp_map = 62; + SwitchFailoverConfigMode failover_config_mode = 63; + Uint64List tunnel_objects_list = 64; + uint64 pre_ingress_acl = 65; + uint64 qos_dscp_to_forwarding_class_map = 66; + uint64 qos_mpls_exp_to_forwarding_class_map = 67; + uint64 ipsec_object_id = 68; + uint32 ipsec_sa_tag_tpid = 69; + } +} + +message SetSwitchAttributeResponse {} + +message SwitchStateChangeNotificationRequest {} + +message SwitchStateChangeNotificationResponse { + uint64 switch_id = 1; + SwitchOperStatus switch_oper_status = 2; +} + +message SwitchShutdownRequestNotificationRequest {} + +message SwitchShutdownRequestNotificationResponse { + uint64 switch_id = 1; +} + +message FdbEventNotificationRequest {} + +message FdbEventNotificationResponse { + repeated FdbEventNotificationData data = 1; +} + +message PortStateChangeNotificationRequest {} + +message PortStateChangeNotificationResponse { + repeated PortOperStatusNotification data = 1; +} + +message PacketEventNotificationRequest {} + +message PacketEventNotificationResponse { + uint64 switch_id = 1; + bytes buffer = 2; + repeated HostifPacketAttribute attrs = 3; +} + +message QueuePfcDeadlockNotificationRequest {} + +message QueuePfcDeadlockNotificationResponse { + repeated QueueDeadlockNotificationData data = 1; +} + +message BfdSessionStateChangeNotificationRequest {} + +message BfdSessionStateChangeNotificationResponse { + repeated BfdSessionStateChangeNotificationData data = 1; +} + +message TamEventNotificationRequest {} + +message TamEventNotificationResponse { + uint64 tam_event_id = 1; + bytes buffer = 2; + repeated TamEventActionAttribute attrs = 3; +} + +message IpsecSaStatusChangeNotificationRequest {} + +message IpsecSaStatusNotificationDataResponse { + repeated IpsecSaStatusNotificationData data = 1; +} + +message GetSwitchAttributeRequest { + uint64 oid = 1; + SwitchAttr attr_type = 2; +} + +message GetSwitchAttributeResponse { + SwitchAttribute attr = 1; +} + +message CreateSwitchTunnelRequest { + uint64 switch = 1; + + TunnelType tunnel_type = 2; + PacketAction loopback_packet_action = 3; + TunnelEncapEcnMode tunnel_encap_ecn_mode = 4; + repeated uint64 encap_mappers = 5; + TunnelDecapEcnMode tunnel_decap_ecn_mode = 6; + repeated uint64 decap_mappers = 7; + TunnelVxlanUdpSportMode tunnel_vxlan_udp_sport_mode = 8; + uint32 vxlan_udp_sport = 9; + uint32 vxlan_udp_sport_mask = 10; +} + +message CreateSwitchTunnelResponse { + uint64 oid = 1; +} + +message RemoveSwitchTunnelRequest { + uint64 oid = 1; +} + +message RemoveSwitchTunnelResponse {} + +message SetSwitchTunnelAttributeRequest { + uint64 oid = 1; + oneof attr { + PacketAction loopback_packet_action = 2; + TunnelVxlanUdpSportMode tunnel_vxlan_udp_sport_mode = 3; + uint32 vxlan_udp_sport = 4; + uint32 vxlan_udp_sport_mask = 5; + } +} + +message SetSwitchTunnelAttributeResponse {} + +message GetSwitchTunnelAttributeRequest { + uint64 oid = 1; + SwitchTunnelAttr attr_type = 2; +} + +message GetSwitchTunnelAttributeResponse { + SwitchTunnelAttribute attr = 1; +} + +service Switch { + rpc CreateSwitch(CreateSwitchRequest) returns (CreateSwitchResponse) {} + rpc RemoveSwitch(RemoveSwitchRequest) returns (RemoveSwitchResponse) {} + rpc SetSwitchAttribute(SetSwitchAttributeRequest) + returns (SetSwitchAttributeResponse) {} + rpc SwitchStateChangeNotification(SwitchStateChangeNotificationRequest) + returns (stream SwitchStateChangeNotificationResponse) {} + rpc SwitchShutdownRequestNotification( + SwitchShutdownRequestNotificationRequest) + returns (stream SwitchShutdownRequestNotificationResponse) {} + rpc FdbEventNotification(FdbEventNotificationRequest) + returns (stream FdbEventNotificationResponse) {} + rpc PortStateChangeNotification(PortStateChangeNotificationRequest) + returns (stream PortStateChangeNotificationResponse) {} + rpc PacketEventNotification(PacketEventNotificationRequest) + returns (stream PacketEventNotificationResponse) {} + rpc QueuePfcDeadlockNotification(QueuePfcDeadlockNotificationRequest) + returns (stream QueuePfcDeadlockNotificationResponse) {} + rpc BfdSessionStateChangeNotification( + BfdSessionStateChangeNotificationRequest) + returns (stream BfdSessionStateChangeNotificationResponse) {} + rpc TamEventNotification(TamEventNotificationRequest) + returns (stream TamEventNotificationResponse) {} + rpc IpsecSaStatusChangeNotification(IpsecSaStatusChangeNotificationRequest) + returns (stream IpsecSaStatusNotificationDataResponse) {} + rpc GetSwitchAttribute(GetSwitchAttributeRequest) + returns (GetSwitchAttributeResponse) {} + rpc CreateSwitchTunnel(CreateSwitchTunnelRequest) + returns (CreateSwitchTunnelResponse) {} + rpc RemoveSwitchTunnel(RemoveSwitchTunnelRequest) + returns (RemoveSwitchTunnelResponse) {} + rpc SetSwitchTunnelAttribute(SetSwitchTunnelAttributeRequest) + returns (SetSwitchTunnelAttributeResponse) {} + rpc GetSwitchTunnelAttribute(GetSwitchTunnelAttributeRequest) + returns (GetSwitchTunnelAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/system_port.proto b/dataplane/standalone/proto/system_port.proto new file mode 100644 index 00000000..418475b0 --- /dev/null +++ b/dataplane/standalone/proto/system_port.proto @@ -0,0 +1,67 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum SystemPortAttr { + SYSTEM_PORT_ATTR_UNSPECIFIED = 0; + SYSTEM_PORT_ATTR_TYPE = 1; + SYSTEM_PORT_ATTR_QOS_NUMBER_OF_VOQS = 2; + SYSTEM_PORT_ATTR_QOS_VOQ_LIST = 3; + SYSTEM_PORT_ATTR_PORT = 4; + SYSTEM_PORT_ATTR_ADMIN_STATE = 5; + SYSTEM_PORT_ATTR_CONFIG_INFO = 6; + SYSTEM_PORT_ATTR_QOS_TC_TO_QUEUE_MAP = 7; +} + +message CreateSystemPortRequest { + uint64 switch = 1; + + bool admin_state = 2; + SystemPortConfig config_info = 3; + uint64 qos_tc_to_queue_map = 4; +} + +message CreateSystemPortResponse { + uint64 oid = 1; +} + +message RemoveSystemPortRequest { + uint64 oid = 1; +} + +message RemoveSystemPortResponse {} + +message SetSystemPortAttributeRequest { + uint64 oid = 1; + oneof attr { + bool admin_state = 2; + uint64 qos_tc_to_queue_map = 3; + } +} + +message SetSystemPortAttributeResponse {} + +message GetSystemPortAttributeRequest { + uint64 oid = 1; + SystemPortAttr attr_type = 2; +} + +message GetSystemPortAttributeResponse { + SystemPortAttribute attr = 1; +} + +service SystemPort { + rpc CreateSystemPort(CreateSystemPortRequest) + returns (CreateSystemPortResponse) {} + rpc RemoveSystemPort(RemoveSystemPortRequest) + returns (RemoveSystemPortResponse) {} + rpc SetSystemPortAttribute(SetSystemPortAttributeRequest) + returns (SetSystemPortAttributeResponse) {} + rpc GetSystemPortAttribute(GetSystemPortAttributeRequest) + returns (GetSystemPortAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/tam.proto b/dataplane/standalone/proto/tam.proto new file mode 100644 index 00000000..ec94fe5a --- /dev/null +++ b/dataplane/standalone/proto/tam.proto @@ -0,0 +1,718 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum TamAttr { + TAM_ATTR_UNSPECIFIED = 0; + TAM_ATTR_TELEMETRY_OBJECTS_LIST = 1; + TAM_ATTR_EVENT_OBJECTS_LIST = 2; + TAM_ATTR_INT_OBJECTS_LIST = 3; + TAM_ATTR_TAM_BIND_POINT_TYPE_LIST = 4; +} + +enum TamCollectorAttr { + TAM_COLLECTOR_ATTR_UNSPECIFIED = 0; + TAM_COLLECTOR_ATTR_SRC_IP = 1; + TAM_COLLECTOR_ATTR_DST_IP = 2; + TAM_COLLECTOR_ATTR_LOCALHOST = 3; + TAM_COLLECTOR_ATTR_VIRTUAL_ROUTER_ID = 4; + TAM_COLLECTOR_ATTR_TRUNCATE_SIZE = 5; + TAM_COLLECTOR_ATTR_TRANSPORT = 6; + TAM_COLLECTOR_ATTR_DSCP_VALUE = 7; +} + +enum TamEventActionAttr { + TAM_EVENT_ACTION_ATTR_UNSPECIFIED = 0; + TAM_EVENT_ACTION_ATTR_REPORT_TYPE = 1; + TAM_EVENT_ACTION_ATTR_QOS_ACTION_TYPE = 2; +} + +enum TamEventAttr { + TAM_EVENT_ATTR_UNSPECIFIED = 0; + TAM_EVENT_ATTR_TYPE = 1; + TAM_EVENT_ATTR_ACTION_LIST = 2; + TAM_EVENT_ATTR_COLLECTOR_LIST = 3; + TAM_EVENT_ATTR_THRESHOLD = 4; + TAM_EVENT_ATTR_DSCP_VALUE = 5; +} + +enum TamEventThresholdAttr { + TAM_EVENT_THRESHOLD_ATTR_UNSPECIFIED = 0; + TAM_EVENT_THRESHOLD_ATTR_HIGH_WATERMARK = 1; + TAM_EVENT_THRESHOLD_ATTR_LOW_WATERMARK = 2; + TAM_EVENT_THRESHOLD_ATTR_LATENCY = 3; + TAM_EVENT_THRESHOLD_ATTR_RATE = 4; + TAM_EVENT_THRESHOLD_ATTR_ABS_VALUE = 5; + TAM_EVENT_THRESHOLD_ATTR_UNIT = 6; +} + +enum TamIntAttr { + TAM_INT_ATTR_UNSPECIFIED = 0; + TAM_INT_ATTR_TYPE = 1; + TAM_INT_ATTR_DEVICE_ID = 2; + TAM_INT_ATTR_IOAM_TRACE_TYPE = 3; + TAM_INT_ATTR_INT_PRESENCE_TYPE = 4; + TAM_INT_ATTR_INT_PRESENCE_PB1 = 5; + TAM_INT_ATTR_INT_PRESENCE_PB2 = 6; + TAM_INT_ATTR_INT_PRESENCE_DSCP_VALUE = 7; + TAM_INT_ATTR_INLINE = 8; + TAM_INT_ATTR_INT_PRESENCE_L3_PROTOCOL = 9; + TAM_INT_ATTR_TRACE_VECTOR = 10; + TAM_INT_ATTR_ACTION_VECTOR = 11; + TAM_INT_ATTR_P4_INT_INSTRUCTION_BITMAP = 12; + TAM_INT_ATTR_METADATA_FRAGMENT_ENABLE = 13; + TAM_INT_ATTR_METADATA_CHECKSUM_ENABLE = 14; + TAM_INT_ATTR_REPORT_ALL_PACKETS = 15; + TAM_INT_ATTR_FLOW_LIVENESS_PERIOD = 16; + TAM_INT_ATTR_LATENCY_SENSITIVITY = 17; + TAM_INT_ATTR_ACL_GROUP = 18; + TAM_INT_ATTR_MAX_HOP_COUNT = 19; + TAM_INT_ATTR_MAX_LENGTH = 20; + TAM_INT_ATTR_NAME_SPACE_ID = 21; + TAM_INT_ATTR_NAME_SPACE_ID_GLOBAL = 22; + TAM_INT_ATTR_INGRESS_SAMPLEPACKET_ENABLE = 23; + TAM_INT_ATTR_COLLECTOR_LIST = 24; + TAM_INT_ATTR_MATH_FUNC = 25; + TAM_INT_ATTR_REPORT_ID = 26; +} + +enum TamMathFuncAttr { + TAM_MATH_FUNC_ATTR_UNSPECIFIED = 0; + TAM_MATH_FUNC_ATTR_TAM_TEL_MATH_FUNC_TYPE = 1; +} + +enum TamReportAttr { + TAM_REPORT_ATTR_UNSPECIFIED = 0; + TAM_REPORT_ATTR_TYPE = 1; + TAM_REPORT_ATTR_HISTOGRAM_NUMBER_OF_BINS = 2; + TAM_REPORT_ATTR_HISTOGRAM_BIN_BOUNDARY = 3; + TAM_REPORT_ATTR_QUOTA = 4; + TAM_REPORT_ATTR_REPORT_MODE = 5; + TAM_REPORT_ATTR_REPORT_INTERVAL = 6; + TAM_REPORT_ATTR_ENTERPRISE_NUMBER = 7; +} + +enum TamTelTypeAttr { + TAM_TEL_TYPE_ATTR_UNSPECIFIED = 0; + TAM_TEL_TYPE_ATTR_TAM_TELEMETRY_TYPE = 1; + TAM_TEL_TYPE_ATTR_INT_SWITCH_IDENTIFIER = 2; + TAM_TEL_TYPE_ATTR_SWITCH_ENABLE_PORT_STATS = 3; + TAM_TEL_TYPE_ATTR_SWITCH_ENABLE_PORT_STATS_INGRESS = 4; + TAM_TEL_TYPE_ATTR_SWITCH_ENABLE_PORT_STATS_EGRESS = 5; + TAM_TEL_TYPE_ATTR_SWITCH_ENABLE_VIRTUAL_QUEUE_STATS = 6; + TAM_TEL_TYPE_ATTR_SWITCH_ENABLE_OUTPUT_QUEUE_STATS = 7; + TAM_TEL_TYPE_ATTR_SWITCH_ENABLE_MMU_STATS = 8; + TAM_TEL_TYPE_ATTR_SWITCH_ENABLE_FABRIC_STATS = 9; + TAM_TEL_TYPE_ATTR_SWITCH_ENABLE_FILTER_STATS = 10; + TAM_TEL_TYPE_ATTR_SWITCH_ENABLE_RESOURCE_UTILIZATION_STATS = 11; + TAM_TEL_TYPE_ATTR_FABRIC_Q = 12; + TAM_TEL_TYPE_ATTR_NE_ENABLE = 13; + TAM_TEL_TYPE_ATTR_DSCP_VALUE = 14; + TAM_TEL_TYPE_ATTR_MATH_FUNC = 15; + TAM_TEL_TYPE_ATTR_REPORT_ID = 16; +} + +enum TamTelemetryAttr { + TAM_TELEMETRY_ATTR_UNSPECIFIED = 0; + TAM_TELEMETRY_ATTR_TAM_TYPE_LIST = 1; + TAM_TELEMETRY_ATTR_COLLECTOR_LIST = 2; + TAM_TELEMETRY_ATTR_TAM_REPORTING_UNIT = 3; + TAM_TELEMETRY_ATTR_REPORTING_INTERVAL = 4; +} + +enum TamTransportAttr { + TAM_TRANSPORT_ATTR_UNSPECIFIED = 0; + TAM_TRANSPORT_ATTR_TRANSPORT_TYPE = 1; + TAM_TRANSPORT_ATTR_SRC_PORT = 2; + TAM_TRANSPORT_ATTR_DST_PORT = 3; + TAM_TRANSPORT_ATTR_TRANSPORT_AUTH_TYPE = 4; + TAM_TRANSPORT_ATTR_MTU = 5; +} + +message CreateTamRequest { + uint64 switch = 1; + + repeated uint64 telemetry_objects_list = 2; + repeated uint64 event_objects_list = 3; + repeated uint64 int_objects_list = 4; + repeated TamBindPointType tam_bind_point_type_list = 5; +} + +message CreateTamResponse { + uint64 oid = 1; +} + +message RemoveTamRequest { + uint64 oid = 1; +} + +message RemoveTamResponse {} + +message SetTamAttributeRequest { + uint64 oid = 1; + oneof attr { + Uint64List telemetry_objects_list = 2; + Uint64List event_objects_list = 3; + Uint64List int_objects_list = 4; + } +} + +message SetTamAttributeResponse {} + +message GetTamAttributeRequest { + uint64 oid = 1; + TamAttr attr_type = 2; +} + +message GetTamAttributeResponse { + TamAttribute attr = 1; +} + +message CreateTamMathFuncRequest { + uint64 switch = 1; + + TamTelMathFuncType tam_tel_math_func_type = 2; +} + +message CreateTamMathFuncResponse { + uint64 oid = 1; +} + +message RemoveTamMathFuncRequest { + uint64 oid = 1; +} + +message RemoveTamMathFuncResponse {} + +message SetTamMathFuncAttributeRequest { + uint64 oid = 1; + oneof attr { + TamTelMathFuncType tam_tel_math_func_type = 2; + } +} + +message SetTamMathFuncAttributeResponse {} + +message GetTamMathFuncAttributeRequest { + uint64 oid = 1; + TamMathFuncAttr attr_type = 2; +} + +message GetTamMathFuncAttributeResponse { + TamMathFuncAttribute attr = 1; +} + +message CreateTamReportRequest { + uint64 switch = 1; + + TamReportType type = 2; + uint32 histogram_number_of_bins = 3; + repeated uint32 histogram_bin_boundary = 4; + uint32 quota = 5; + TamReportMode report_mode = 6; + uint32 report_interval = 7; + uint32 enterprise_number = 8; +} + +message CreateTamReportResponse { + uint64 oid = 1; +} + +message RemoveTamReportRequest { + uint64 oid = 1; +} + +message RemoveTamReportResponse {} + +message SetTamReportAttributeRequest { + uint64 oid = 1; + oneof attr { + TamReportType type = 2; + uint32 quota = 3; + uint32 report_interval = 4; + uint32 enterprise_number = 5; + } +} + +message SetTamReportAttributeResponse {} + +message GetTamReportAttributeRequest { + uint64 oid = 1; + TamReportAttr attr_type = 2; +} + +message GetTamReportAttributeResponse { + TamReportAttribute attr = 1; +} + +message CreateTamEventThresholdRequest { + uint64 switch = 1; + + uint32 high_watermark = 2; + uint32 low_watermark = 3; + uint32 latency = 4; + uint32 rate = 5; + uint32 abs_value = 6; + TamEventThresholdUnit unit = 7; +} + +message CreateTamEventThresholdResponse { + uint64 oid = 1; +} + +message RemoveTamEventThresholdRequest { + uint64 oid = 1; +} + +message RemoveTamEventThresholdResponse {} + +message SetTamEventThresholdAttributeRequest { + uint64 oid = 1; + oneof attr { + uint32 high_watermark = 2; + uint32 low_watermark = 3; + uint32 latency = 4; + uint32 rate = 5; + uint32 abs_value = 6; + TamEventThresholdUnit unit = 7; + } +} + +message SetTamEventThresholdAttributeResponse {} + +message GetTamEventThresholdAttributeRequest { + uint64 oid = 1; + TamEventThresholdAttr attr_type = 2; +} + +message GetTamEventThresholdAttributeResponse { + TamEventThresholdAttribute attr = 1; +} + +message CreateTamIntRequest { + uint64 switch = 1; + + TamIntType type = 2; + uint32 device_id = 3; + uint32 ioam_trace_type = 4; + TamIntPresenceType int_presence_type = 5; + uint32 int_presence_pb1 = 6; + uint32 int_presence_pb2 = 7; + uint32 int_presence_dscp_value = 8; + bool inline = 9; + uint32 int_presence_l3_protocol = 10; + uint32 trace_vector = 11; + uint32 action_vector = 12; + uint32 p4_int_instruction_bitmap = 13; + bool metadata_fragment_enable = 14; + bool metadata_checksum_enable = 15; + bool report_all_packets = 16; + uint32 flow_liveness_period = 17; + uint32 latency_sensitivity = 18; + uint64 acl_group = 19; + uint32 max_hop_count = 20; + uint32 max_length = 21; + uint32 name_space_id = 22; + bool name_space_id_global = 23; + uint64 ingress_samplepacket_enable = 24; + repeated uint64 collector_list = 25; + uint64 math_func = 26; + uint64 report_id = 27; +} + +message CreateTamIntResponse { + uint64 oid = 1; +} + +message RemoveTamIntRequest { + uint64 oid = 1; +} + +message RemoveTamIntResponse {} + +message SetTamIntAttributeRequest { + uint64 oid = 1; + oneof attr { + uint32 ioam_trace_type = 2; + uint32 trace_vector = 3; + uint32 action_vector = 4; + uint32 p4_int_instruction_bitmap = 5; + bool metadata_fragment_enable = 6; + bool metadata_checksum_enable = 7; + bool report_all_packets = 8; + uint32 flow_liveness_period = 9; + uint32 latency_sensitivity = 10; + uint64 acl_group = 11; + uint32 max_hop_count = 12; + uint32 max_length = 13; + uint32 name_space_id = 14; + bool name_space_id_global = 15; + uint64 ingress_samplepacket_enable = 16; + Uint64List collector_list = 17; + uint64 math_func = 18; + } +} + +message SetTamIntAttributeResponse {} + +message GetTamIntAttributeRequest { + uint64 oid = 1; + TamIntAttr attr_type = 2; +} + +message GetTamIntAttributeResponse { + TamIntAttribute attr = 1; +} + +message CreateTamTelTypeRequest { + uint64 switch = 1; + + TamTelemetryType tam_telemetry_type = 2; + uint32 int_switch_identifier = 3; + bool switch_enable_port_stats = 4; + bool switch_enable_port_stats_ingress = 5; + bool switch_enable_port_stats_egress = 6; + bool switch_enable_virtual_queue_stats = 7; + bool switch_enable_output_queue_stats = 8; + bool switch_enable_mmu_stats = 9; + bool switch_enable_fabric_stats = 10; + bool switch_enable_filter_stats = 11; + bool switch_enable_resource_utilization_stats = 12; + bool fabric_q = 13; + bool ne_enable = 14; + uint32 dscp_value = 15; + uint64 math_func = 16; + uint64 report_id = 17; +} + +message CreateTamTelTypeResponse { + uint64 oid = 1; +} + +message RemoveTamTelTypeRequest { + uint64 oid = 1; +} + +message RemoveTamTelTypeResponse {} + +message SetTamTelTypeAttributeRequest { + uint64 oid = 1; + oneof attr { + uint32 int_switch_identifier = 2; + bool switch_enable_port_stats = 3; + bool switch_enable_port_stats_ingress = 4; + bool switch_enable_port_stats_egress = 5; + bool switch_enable_virtual_queue_stats = 6; + bool switch_enable_output_queue_stats = 7; + bool switch_enable_mmu_stats = 8; + bool switch_enable_fabric_stats = 9; + bool switch_enable_filter_stats = 10; + bool switch_enable_resource_utilization_stats = 11; + bool fabric_q = 12; + bool ne_enable = 13; + uint32 dscp_value = 14; + uint64 math_func = 15; + } +} + +message SetTamTelTypeAttributeResponse {} + +message GetTamTelTypeAttributeRequest { + uint64 oid = 1; + TamTelTypeAttr attr_type = 2; +} + +message GetTamTelTypeAttributeResponse { + TamTelTypeAttribute attr = 1; +} + +message CreateTamTransportRequest { + uint64 switch = 1; + + TamTransportType transport_type = 2; + uint32 src_port = 3; + uint32 dst_port = 4; + TamTransportAuthType transport_auth_type = 5; + uint32 mtu = 6; +} + +message CreateTamTransportResponse { + uint64 oid = 1; +} + +message RemoveTamTransportRequest { + uint64 oid = 1; +} + +message RemoveTamTransportResponse {} + +message SetTamTransportAttributeRequest { + uint64 oid = 1; + oneof attr { + uint32 src_port = 2; + uint32 dst_port = 3; + TamTransportAuthType transport_auth_type = 4; + uint32 mtu = 5; + } +} + +message SetTamTransportAttributeResponse {} + +message GetTamTransportAttributeRequest { + uint64 oid = 1; + TamTransportAttr attr_type = 2; +} + +message GetTamTransportAttributeResponse { + TamTransportAttribute attr = 1; +} + +message CreateTamTelemetryRequest { + uint64 switch = 1; + + repeated uint64 tam_type_list = 2; + repeated uint64 collector_list = 3; + TamReportingUnit tam_reporting_unit = 4; + uint32 reporting_interval = 5; +} + +message CreateTamTelemetryResponse { + uint64 oid = 1; +} + +message RemoveTamTelemetryRequest { + uint64 oid = 1; +} + +message RemoveTamTelemetryResponse {} + +message SetTamTelemetryAttributeRequest { + uint64 oid = 1; + oneof attr { + Uint64List tam_type_list = 2; + TamReportingUnit tam_reporting_unit = 3; + uint32 reporting_interval = 4; + } +} + +message SetTamTelemetryAttributeResponse {} + +message GetTamTelemetryAttributeRequest { + uint64 oid = 1; + TamTelemetryAttr attr_type = 2; +} + +message GetTamTelemetryAttributeResponse { + TamTelemetryAttribute attr = 1; +} + +message CreateTamCollectorRequest { + uint64 switch = 1; + + bytes src_ip = 2; + bytes dst_ip = 3; + bool localhost = 4; + uint64 virtual_router_id = 5; + uint32 truncate_size = 6; + uint64 transport = 7; + uint32 dscp_value = 8; +} + +message CreateTamCollectorResponse { + uint64 oid = 1; +} + +message RemoveTamCollectorRequest { + uint64 oid = 1; +} + +message RemoveTamCollectorResponse {} + +message SetTamCollectorAttributeRequest { + uint64 oid = 1; + oneof attr { + bytes src_ip = 2; + bytes dst_ip = 3; + bool localhost = 4; + uint64 virtual_router_id = 5; + uint32 truncate_size = 6; + uint64 transport = 7; + uint32 dscp_value = 8; + } +} + +message SetTamCollectorAttributeResponse {} + +message GetTamCollectorAttributeRequest { + uint64 oid = 1; + TamCollectorAttr attr_type = 2; +} + +message GetTamCollectorAttributeResponse { + TamCollectorAttribute attr = 1; +} + +message CreateTamEventActionRequest { + uint64 switch = 1; + + uint64 report_type = 2; + uint32 qos_action_type = 3; +} + +message CreateTamEventActionResponse { + uint64 oid = 1; +} + +message RemoveTamEventActionRequest { + uint64 oid = 1; +} + +message RemoveTamEventActionResponse {} + +message SetTamEventActionAttributeRequest { + uint64 oid = 1; + oneof attr { + uint64 report_type = 2; + uint32 qos_action_type = 3; + } +} + +message SetTamEventActionAttributeResponse {} + +message GetTamEventActionAttributeRequest { + uint64 oid = 1; + TamEventActionAttr attr_type = 2; +} + +message GetTamEventActionAttributeResponse { + TamEventActionAttribute attr = 1; +} + +message CreateTamEventRequest { + uint64 switch = 1; + + TamEventType type = 2; + repeated uint64 action_list = 3; + repeated uint64 collector_list = 4; + uint64 threshold = 5; + uint32 dscp_value = 6; +} + +message CreateTamEventResponse { + uint64 oid = 1; +} + +message RemoveTamEventRequest { + uint64 oid = 1; +} + +message RemoveTamEventResponse {} + +message SetTamEventAttributeRequest { + uint64 oid = 1; + oneof attr { + uint64 threshold = 2; + uint32 dscp_value = 3; + } +} + +message SetTamEventAttributeResponse {} + +message GetTamEventAttributeRequest { + uint64 oid = 1; + TamEventAttr attr_type = 2; +} + +message GetTamEventAttributeResponse { + TamEventAttribute attr = 1; +} + +service Tam { + rpc CreateTam(CreateTamRequest) returns (CreateTamResponse) {} + rpc RemoveTam(RemoveTamRequest) returns (RemoveTamResponse) {} + rpc SetTamAttribute(SetTamAttributeRequest) + returns (SetTamAttributeResponse) {} + rpc GetTamAttribute(GetTamAttributeRequest) + returns (GetTamAttributeResponse) {} + rpc CreateTamMathFunc(CreateTamMathFuncRequest) + returns (CreateTamMathFuncResponse) {} + rpc RemoveTamMathFunc(RemoveTamMathFuncRequest) + returns (RemoveTamMathFuncResponse) {} + rpc SetTamMathFuncAttribute(SetTamMathFuncAttributeRequest) + returns (SetTamMathFuncAttributeResponse) {} + rpc GetTamMathFuncAttribute(GetTamMathFuncAttributeRequest) + returns (GetTamMathFuncAttributeResponse) {} + rpc CreateTamReport(CreateTamReportRequest) + returns (CreateTamReportResponse) {} + rpc RemoveTamReport(RemoveTamReportRequest) + returns (RemoveTamReportResponse) {} + rpc SetTamReportAttribute(SetTamReportAttributeRequest) + returns (SetTamReportAttributeResponse) {} + rpc GetTamReportAttribute(GetTamReportAttributeRequest) + returns (GetTamReportAttributeResponse) {} + rpc CreateTamEventThreshold(CreateTamEventThresholdRequest) + returns (CreateTamEventThresholdResponse) {} + rpc RemoveTamEventThreshold(RemoveTamEventThresholdRequest) + returns (RemoveTamEventThresholdResponse) {} + rpc SetTamEventThresholdAttribute(SetTamEventThresholdAttributeRequest) + returns (SetTamEventThresholdAttributeResponse) {} + rpc GetTamEventThresholdAttribute(GetTamEventThresholdAttributeRequest) + returns (GetTamEventThresholdAttributeResponse) {} + rpc CreateTamInt(CreateTamIntRequest) returns (CreateTamIntResponse) {} + rpc RemoveTamInt(RemoveTamIntRequest) returns (RemoveTamIntResponse) {} + rpc SetTamIntAttribute(SetTamIntAttributeRequest) + returns (SetTamIntAttributeResponse) {} + rpc GetTamIntAttribute(GetTamIntAttributeRequest) + returns (GetTamIntAttributeResponse) {} + rpc CreateTamTelType(CreateTamTelTypeRequest) + returns (CreateTamTelTypeResponse) {} + rpc RemoveTamTelType(RemoveTamTelTypeRequest) + returns (RemoveTamTelTypeResponse) {} + rpc SetTamTelTypeAttribute(SetTamTelTypeAttributeRequest) + returns (SetTamTelTypeAttributeResponse) {} + rpc GetTamTelTypeAttribute(GetTamTelTypeAttributeRequest) + returns (GetTamTelTypeAttributeResponse) {} + rpc CreateTamTransport(CreateTamTransportRequest) + returns (CreateTamTransportResponse) {} + rpc RemoveTamTransport(RemoveTamTransportRequest) + returns (RemoveTamTransportResponse) {} + rpc SetTamTransportAttribute(SetTamTransportAttributeRequest) + returns (SetTamTransportAttributeResponse) {} + rpc GetTamTransportAttribute(GetTamTransportAttributeRequest) + returns (GetTamTransportAttributeResponse) {} + rpc CreateTamTelemetry(CreateTamTelemetryRequest) + returns (CreateTamTelemetryResponse) {} + rpc RemoveTamTelemetry(RemoveTamTelemetryRequest) + returns (RemoveTamTelemetryResponse) {} + rpc SetTamTelemetryAttribute(SetTamTelemetryAttributeRequest) + returns (SetTamTelemetryAttributeResponse) {} + rpc GetTamTelemetryAttribute(GetTamTelemetryAttributeRequest) + returns (GetTamTelemetryAttributeResponse) {} + rpc CreateTamCollector(CreateTamCollectorRequest) + returns (CreateTamCollectorResponse) {} + rpc RemoveTamCollector(RemoveTamCollectorRequest) + returns (RemoveTamCollectorResponse) {} + rpc SetTamCollectorAttribute(SetTamCollectorAttributeRequest) + returns (SetTamCollectorAttributeResponse) {} + rpc GetTamCollectorAttribute(GetTamCollectorAttributeRequest) + returns (GetTamCollectorAttributeResponse) {} + rpc CreateTamEventAction(CreateTamEventActionRequest) + returns (CreateTamEventActionResponse) {} + rpc RemoveTamEventAction(RemoveTamEventActionRequest) + returns (RemoveTamEventActionResponse) {} + rpc SetTamEventActionAttribute(SetTamEventActionAttributeRequest) + returns (SetTamEventActionAttributeResponse) {} + rpc GetTamEventActionAttribute(GetTamEventActionAttributeRequest) + returns (GetTamEventActionAttributeResponse) {} + rpc CreateTamEvent(CreateTamEventRequest) returns (CreateTamEventResponse) {} + rpc RemoveTamEvent(RemoveTamEventRequest) returns (RemoveTamEventResponse) {} + rpc SetTamEventAttribute(SetTamEventAttributeRequest) + returns (SetTamEventAttributeResponse) {} + rpc GetTamEventAttribute(GetTamEventAttributeRequest) + returns (GetTamEventAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/tunnel.proto b/dataplane/standalone/proto/tunnel.proto new file mode 100644 index 00000000..b0bc0c3a --- /dev/null +++ b/dataplane/standalone/proto/tunnel.proto @@ -0,0 +1,282 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum TunnelAttr { + TUNNEL_ATTR_UNSPECIFIED = 0; + TUNNEL_ATTR_TYPE = 1; + TUNNEL_ATTR_UNDERLAY_INTERFACE = 2; + TUNNEL_ATTR_OVERLAY_INTERFACE = 3; + TUNNEL_ATTR_PEER_MODE = 4; + TUNNEL_ATTR_ENCAP_SRC_IP = 5; + TUNNEL_ATTR_ENCAP_DST_IP = 6; + TUNNEL_ATTR_ENCAP_TTL_MODE = 7; + TUNNEL_ATTR_ENCAP_TTL_VAL = 8; + TUNNEL_ATTR_ENCAP_DSCP_MODE = 9; + TUNNEL_ATTR_ENCAP_DSCP_VAL = 10; + TUNNEL_ATTR_ENCAP_GRE_KEY_VALID = 11; + TUNNEL_ATTR_ENCAP_GRE_KEY = 12; + TUNNEL_ATTR_ENCAP_ECN_MODE = 13; + TUNNEL_ATTR_ENCAP_MAPPERS = 14; + TUNNEL_ATTR_DECAP_ECN_MODE = 15; + TUNNEL_ATTR_DECAP_MAPPERS = 16; + TUNNEL_ATTR_DECAP_TTL_MODE = 17; + TUNNEL_ATTR_DECAP_DSCP_MODE = 18; + TUNNEL_ATTR_TERM_TABLE_ENTRY_LIST = 19; + TUNNEL_ATTR_LOOPBACK_PACKET_ACTION = 20; + TUNNEL_ATTR_VXLAN_UDP_SPORT_MODE = 21; + TUNNEL_ATTR_VXLAN_UDP_SPORT = 22; + TUNNEL_ATTR_VXLAN_UDP_SPORT_MASK = 23; + TUNNEL_ATTR_SA_INDEX = 24; + TUNNEL_ATTR_IPSEC_SA_PORT_LIST = 25; +} + +enum TunnelMapAttr { + TUNNEL_MAP_ATTR_UNSPECIFIED = 0; + TUNNEL_MAP_ATTR_TYPE = 1; + TUNNEL_MAP_ATTR_ENTRY_LIST = 2; +} + +enum TunnelMapEntryAttr { + TUNNEL_MAP_ENTRY_ATTR_UNSPECIFIED = 0; + TUNNEL_MAP_ENTRY_ATTR_TUNNEL_MAP_TYPE = 1; + TUNNEL_MAP_ENTRY_ATTR_TUNNEL_MAP = 2; + TUNNEL_MAP_ENTRY_ATTR_OECN_KEY = 3; + TUNNEL_MAP_ENTRY_ATTR_OECN_VALUE = 4; + TUNNEL_MAP_ENTRY_ATTR_UECN_KEY = 5; + TUNNEL_MAP_ENTRY_ATTR_UECN_VALUE = 6; + TUNNEL_MAP_ENTRY_ATTR_VLAN_ID_KEY = 7; + TUNNEL_MAP_ENTRY_ATTR_VLAN_ID_VALUE = 8; + TUNNEL_MAP_ENTRY_ATTR_VNI_ID_KEY = 9; + TUNNEL_MAP_ENTRY_ATTR_VNI_ID_VALUE = 10; + TUNNEL_MAP_ENTRY_ATTR_BRIDGE_ID_KEY = 11; + TUNNEL_MAP_ENTRY_ATTR_BRIDGE_ID_VALUE = 12; + TUNNEL_MAP_ENTRY_ATTR_VIRTUAL_ROUTER_ID_KEY = 13; + TUNNEL_MAP_ENTRY_ATTR_VIRTUAL_ROUTER_ID_VALUE = 14; + TUNNEL_MAP_ENTRY_ATTR_VSID_ID_KEY = 15; + TUNNEL_MAP_ENTRY_ATTR_VSID_ID_VALUE = 16; +} + +enum TunnelTermTableEntryAttr { + TUNNEL_TERM_TABLE_ENTRY_ATTR_UNSPECIFIED = 0; + TUNNEL_TERM_TABLE_ENTRY_ATTR_VR_ID = 1; + TUNNEL_TERM_TABLE_ENTRY_ATTR_TYPE = 2; + TUNNEL_TERM_TABLE_ENTRY_ATTR_DST_IP = 3; + TUNNEL_TERM_TABLE_ENTRY_ATTR_DST_IP_MASK = 4; + TUNNEL_TERM_TABLE_ENTRY_ATTR_SRC_IP = 5; + TUNNEL_TERM_TABLE_ENTRY_ATTR_SRC_IP_MASK = 6; + TUNNEL_TERM_TABLE_ENTRY_ATTR_TUNNEL_TYPE = 7; + TUNNEL_TERM_TABLE_ENTRY_ATTR_ACTION_TUNNEL_ID = 8; + TUNNEL_TERM_TABLE_ENTRY_ATTR_IP_ADDR_FAMILY = 9; + TUNNEL_TERM_TABLE_ENTRY_ATTR_IPSEC_VERIFIED = 10; +} + +message CreateTunnelMapRequest { + uint64 switch = 1; + + TunnelMapType type = 2; +} + +message CreateTunnelMapResponse { + uint64 oid = 1; +} + +message RemoveTunnelMapRequest { + uint64 oid = 1; +} + +message RemoveTunnelMapResponse {} + +message GetTunnelMapAttributeRequest { + uint64 oid = 1; + TunnelMapAttr attr_type = 2; +} + +message GetTunnelMapAttributeResponse { + TunnelMapAttribute attr = 1; +} + +message CreateTunnelRequest { + uint64 switch = 1; + + TunnelType type = 2; + uint64 underlay_interface = 3; + uint64 overlay_interface = 4; + TunnelPeerMode peer_mode = 5; + bytes encap_src_ip = 6; + bytes encap_dst_ip = 7; + TunnelTtlMode encap_ttl_mode = 8; + uint32 encap_ttl_val = 9; + TunnelDscpMode encap_dscp_mode = 10; + uint32 encap_dscp_val = 11; + bool encap_gre_key_valid = 12; + uint32 encap_gre_key = 13; + TunnelEncapEcnMode encap_ecn_mode = 14; + repeated uint64 encap_mappers = 15; + TunnelDecapEcnMode decap_ecn_mode = 16; + repeated uint64 decap_mappers = 17; + TunnelTtlMode decap_ttl_mode = 18; + TunnelDscpMode decap_dscp_mode = 19; + PacketAction loopback_packet_action = 20; + TunnelVxlanUdpSportMode vxlan_udp_sport_mode = 21; + uint32 vxlan_udp_sport = 22; + uint32 vxlan_udp_sport_mask = 23; + uint32 sa_index = 24; + repeated uint64 ipsec_sa_port_list = 25; +} + +message CreateTunnelResponse { + uint64 oid = 1; +} + +message RemoveTunnelRequest { + uint64 oid = 1; +} + +message RemoveTunnelResponse {} + +message SetTunnelAttributeRequest { + uint64 oid = 1; + oneof attr { + TunnelTtlMode encap_ttl_mode = 2; + uint32 encap_ttl_val = 3; + TunnelDscpMode encap_dscp_mode = 4; + uint32 encap_dscp_val = 5; + uint32 encap_gre_key = 6; + TunnelTtlMode decap_ttl_mode = 7; + TunnelDscpMode decap_dscp_mode = 8; + PacketAction loopback_packet_action = 9; + TunnelVxlanUdpSportMode vxlan_udp_sport_mode = 10; + uint32 vxlan_udp_sport = 11; + uint32 vxlan_udp_sport_mask = 12; + uint32 sa_index = 13; + Uint64List ipsec_sa_port_list = 14; + } +} + +message SetTunnelAttributeResponse {} + +message GetTunnelAttributeRequest { + uint64 oid = 1; + TunnelAttr attr_type = 2; +} + +message GetTunnelAttributeResponse { + TunnelAttribute attr = 1; +} + +message CreateTunnelTermTableEntryRequest { + uint64 switch = 1; + + uint64 vr_id = 2; + TunnelTermTableEntryType type = 3; + bytes dst_ip = 4; + bytes dst_ip_mask = 5; + bytes src_ip = 6; + bytes src_ip_mask = 7; + TunnelType tunnel_type = 8; + uint64 action_tunnel_id = 9; + bool ipsec_verified = 10; +} + +message CreateTunnelTermTableEntryResponse { + uint64 oid = 1; +} + +message RemoveTunnelTermTableEntryRequest { + uint64 oid = 1; +} + +message RemoveTunnelTermTableEntryResponse {} + +message SetTunnelTermTableEntryAttributeRequest { + uint64 oid = 1; + oneof attr { + bool ipsec_verified = 2; + } +} + +message SetTunnelTermTableEntryAttributeResponse {} + +message GetTunnelTermTableEntryAttributeRequest { + uint64 oid = 1; + TunnelTermTableEntryAttr attr_type = 2; +} + +message GetTunnelTermTableEntryAttributeResponse { + TunnelTermTableEntryAttribute attr = 1; +} + +message CreateTunnelMapEntryRequest { + uint64 switch = 1; + + TunnelMapType tunnel_map_type = 2; + uint64 tunnel_map = 3; + uint32 oecn_key = 4; + uint32 oecn_value = 5; + uint32 uecn_key = 6; + uint32 uecn_value = 7; + uint32 vlan_id_key = 8; + uint32 vlan_id_value = 9; + uint32 vni_id_key = 10; + uint32 vni_id_value = 11; + uint64 bridge_id_key = 12; + uint64 bridge_id_value = 13; + uint64 virtual_router_id_key = 14; + uint64 virtual_router_id_value = 15; + uint32 vsid_id_key = 16; + uint32 vsid_id_value = 17; +} + +message CreateTunnelMapEntryResponse { + uint64 oid = 1; +} + +message RemoveTunnelMapEntryRequest { + uint64 oid = 1; +} + +message RemoveTunnelMapEntryResponse {} + +message GetTunnelMapEntryAttributeRequest { + uint64 oid = 1; + TunnelMapEntryAttr attr_type = 2; +} + +message GetTunnelMapEntryAttributeResponse { + TunnelMapEntryAttribute attr = 1; +} + +service Tunnel { + rpc CreateTunnelMap(CreateTunnelMapRequest) + returns (CreateTunnelMapResponse) {} + rpc RemoveTunnelMap(RemoveTunnelMapRequest) + returns (RemoveTunnelMapResponse) {} + rpc GetTunnelMapAttribute(GetTunnelMapAttributeRequest) + returns (GetTunnelMapAttributeResponse) {} + rpc CreateTunnel(CreateTunnelRequest) returns (CreateTunnelResponse) {} + rpc RemoveTunnel(RemoveTunnelRequest) returns (RemoveTunnelResponse) {} + rpc SetTunnelAttribute(SetTunnelAttributeRequest) + returns (SetTunnelAttributeResponse) {} + rpc GetTunnelAttribute(GetTunnelAttributeRequest) + returns (GetTunnelAttributeResponse) {} + rpc CreateTunnelTermTableEntry(CreateTunnelTermTableEntryRequest) + returns (CreateTunnelTermTableEntryResponse) {} + rpc RemoveTunnelTermTableEntry(RemoveTunnelTermTableEntryRequest) + returns (RemoveTunnelTermTableEntryResponse) {} + rpc SetTunnelTermTableEntryAttribute(SetTunnelTermTableEntryAttributeRequest) + returns (SetTunnelTermTableEntryAttributeResponse) {} + rpc GetTunnelTermTableEntryAttribute(GetTunnelTermTableEntryAttributeRequest) + returns (GetTunnelTermTableEntryAttributeResponse) {} + rpc CreateTunnelMapEntry(CreateTunnelMapEntryRequest) + returns (CreateTunnelMapEntryResponse) {} + rpc RemoveTunnelMapEntry(RemoveTunnelMapEntryRequest) + returns (RemoveTunnelMapEntryResponse) {} + rpc GetTunnelMapEntryAttribute(GetTunnelMapEntryAttributeRequest) + returns (GetTunnelMapEntryAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/udf.proto b/dataplane/standalone/proto/udf.proto new file mode 100644 index 00000000..37663539 --- /dev/null +++ b/dataplane/standalone/proto/udf.proto @@ -0,0 +1,142 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum UdfAttr { + UDF_ATTR_UNSPECIFIED = 0; + UDF_ATTR_MATCH_ID = 1; + UDF_ATTR_GROUP_ID = 2; + UDF_ATTR_BASE = 3; + UDF_ATTR_OFFSET = 4; + UDF_ATTR_HASH_MASK = 5; +} + +enum UdfGroupAttr { + UDF_GROUP_ATTR_UNSPECIFIED = 0; + UDF_GROUP_ATTR_UDF_LIST = 1; + UDF_GROUP_ATTR_TYPE = 2; + UDF_GROUP_ATTR_LENGTH = 3; +} + +enum UdfMatchAttr { + UDF_MATCH_ATTR_UNSPECIFIED = 0; + UDF_MATCH_ATTR_L2_TYPE = 1; + UDF_MATCH_ATTR_L3_TYPE = 2; + UDF_MATCH_ATTR_GRE_TYPE = 3; + UDF_MATCH_ATTR_PRIORITY = 4; +} + +message CreateUdfRequest { + uint64 switch = 1; + + uint64 match_id = 2; + uint64 group_id = 3; + UdfBase base = 4; + uint32 offset = 5; + repeated uint32 hash_mask = 6; +} + +message CreateUdfResponse { + uint64 oid = 1; +} + +message RemoveUdfRequest { + uint64 oid = 1; +} + +message RemoveUdfResponse {} + +message SetUdfAttributeRequest { + uint64 oid = 1; + oneof attr { + UdfBase base = 2; + Uint32List hash_mask = 3; + } +} + +message SetUdfAttributeResponse {} + +message GetUdfAttributeRequest { + uint64 oid = 1; + UdfAttr attr_type = 2; +} + +message GetUdfAttributeResponse { + UdfAttribute attr = 1; +} + +message CreateUdfMatchRequest { + uint64 switch = 1; + + AclFieldData l2_type = 2; + AclFieldData l3_type = 3; + AclFieldData gre_type = 4; + uint32 priority = 5; +} + +message CreateUdfMatchResponse { + uint64 oid = 1; +} + +message RemoveUdfMatchRequest { + uint64 oid = 1; +} + +message RemoveUdfMatchResponse {} + +message GetUdfMatchAttributeRequest { + uint64 oid = 1; + UdfMatchAttr attr_type = 2; +} + +message GetUdfMatchAttributeResponse { + UdfMatchAttribute attr = 1; +} + +message CreateUdfGroupRequest { + uint64 switch = 1; + + UdfGroupType type = 2; + uint32 length = 3; +} + +message CreateUdfGroupResponse { + uint64 oid = 1; +} + +message RemoveUdfGroupRequest { + uint64 oid = 1; +} + +message RemoveUdfGroupResponse {} + +message GetUdfGroupAttributeRequest { + uint64 oid = 1; + UdfGroupAttr attr_type = 2; +} + +message GetUdfGroupAttributeResponse { + UdfGroupAttribute attr = 1; +} + +service Udf { + rpc CreateUdf(CreateUdfRequest) returns (CreateUdfResponse) {} + rpc RemoveUdf(RemoveUdfRequest) returns (RemoveUdfResponse) {} + rpc SetUdfAttribute(SetUdfAttributeRequest) + returns (SetUdfAttributeResponse) {} + rpc GetUdfAttribute(GetUdfAttributeRequest) + returns (GetUdfAttributeResponse) {} + rpc CreateUdfMatch(CreateUdfMatchRequest) returns (CreateUdfMatchResponse) {} + rpc RemoveUdfMatch(RemoveUdfMatchRequest) returns (RemoveUdfMatchResponse) {} + rpc GetUdfMatchAttribute(GetUdfMatchAttributeRequest) + returns (GetUdfMatchAttributeResponse) {} + rpc CreateUdfGroup(CreateUdfGroupRequest) returns (CreateUdfGroupResponse) {} + rpc RemoveUdfGroup(RemoveUdfGroupRequest) returns (RemoveUdfGroupResponse) {} + rpc GetUdfGroupAttribute(GetUdfGroupAttributeRequest) + returns (GetUdfGroupAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/virtual_router.proto b/dataplane/standalone/proto/virtual_router.proto new file mode 100644 index 00000000..d6814bf7 --- /dev/null +++ b/dataplane/standalone/proto/virtual_router.proto @@ -0,0 +1,76 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum VirtualRouterAttr { + VIRTUAL_ROUTER_ATTR_UNSPECIFIED = 0; + VIRTUAL_ROUTER_ATTR_ADMIN_V4_STATE = 1; + VIRTUAL_ROUTER_ATTR_ADMIN_V6_STATE = 2; + VIRTUAL_ROUTER_ATTR_SRC_MAC_ADDRESS = 3; + VIRTUAL_ROUTER_ATTR_VIOLATION_TTL1_PACKET_ACTION = 4; + VIRTUAL_ROUTER_ATTR_VIOLATION_IP_OPTIONS_PACKET_ACTION = 5; + VIRTUAL_ROUTER_ATTR_UNKNOWN_L3_MULTICAST_PACKET_ACTION = 6; + VIRTUAL_ROUTER_ATTR_LABEL = 7; +} + +message CreateVirtualRouterRequest { + uint64 switch = 1; + + bool admin_v4_state = 2; + bool admin_v6_state = 3; + bytes src_mac_address = 4; + PacketAction violation_ttl1_packet_action = 5; + PacketAction violation_ip_options_packet_action = 6; + PacketAction unknown_l3_multicast_packet_action = 7; + bytes label = 8; +} + +message CreateVirtualRouterResponse { + uint64 oid = 1; +} + +message RemoveVirtualRouterRequest { + uint64 oid = 1; +} + +message RemoveVirtualRouterResponse {} + +message SetVirtualRouterAttributeRequest { + uint64 oid = 1; + oneof attr { + bool admin_v4_state = 2; + bool admin_v6_state = 3; + bytes src_mac_address = 4; + PacketAction violation_ttl1_packet_action = 5; + PacketAction violation_ip_options_packet_action = 6; + PacketAction unknown_l3_multicast_packet_action = 7; + bytes label = 8; + } +} + +message SetVirtualRouterAttributeResponse {} + +message GetVirtualRouterAttributeRequest { + uint64 oid = 1; + VirtualRouterAttr attr_type = 2; +} + +message GetVirtualRouterAttributeResponse { + VirtualRouterAttribute attr = 1; +} + +service VirtualRouter { + rpc CreateVirtualRouter(CreateVirtualRouterRequest) + returns (CreateVirtualRouterResponse) {} + rpc RemoveVirtualRouter(RemoveVirtualRouterRequest) + returns (RemoveVirtualRouterResponse) {} + rpc SetVirtualRouterAttribute(SetVirtualRouterAttributeRequest) + returns (SetVirtualRouterAttributeResponse) {} + rpc GetVirtualRouterAttribute(GetVirtualRouterAttributeRequest) + returns (GetVirtualRouterAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/vlan.proto b/dataplane/standalone/proto/vlan.proto new file mode 100644 index 00000000..7965a66e --- /dev/null +++ b/dataplane/standalone/proto/vlan.proto @@ -0,0 +1,167 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum VlanAttr { + VLAN_ATTR_UNSPECIFIED = 0; + VLAN_ATTR_VLAN_ID = 1; + VLAN_ATTR_MEMBER_LIST = 2; + VLAN_ATTR_MAX_LEARNED_ADDRESSES = 3; + VLAN_ATTR_STP_INSTANCE = 4; + VLAN_ATTR_LEARN_DISABLE = 5; + VLAN_ATTR_IPV4_MCAST_LOOKUP_KEY_TYPE = 6; + VLAN_ATTR_IPV6_MCAST_LOOKUP_KEY_TYPE = 7; + VLAN_ATTR_UNKNOWN_NON_IP_MCAST_OUTPUT_GROUP_ID = 8; + VLAN_ATTR_UNKNOWN_IPV4_MCAST_OUTPUT_GROUP_ID = 9; + VLAN_ATTR_UNKNOWN_IPV6_MCAST_OUTPUT_GROUP_ID = 10; + VLAN_ATTR_UNKNOWN_LINKLOCAL_MCAST_OUTPUT_GROUP_ID = 11; + VLAN_ATTR_INGRESS_ACL = 12; + VLAN_ATTR_EGRESS_ACL = 13; + VLAN_ATTR_META_DATA = 14; + VLAN_ATTR_UNKNOWN_UNICAST_FLOOD_CONTROL_TYPE = 15; + VLAN_ATTR_UNKNOWN_UNICAST_FLOOD_GROUP = 16; + VLAN_ATTR_UNKNOWN_MULTICAST_FLOOD_CONTROL_TYPE = 17; + VLAN_ATTR_UNKNOWN_MULTICAST_FLOOD_GROUP = 18; + VLAN_ATTR_BROADCAST_FLOOD_CONTROL_TYPE = 19; + VLAN_ATTR_BROADCAST_FLOOD_GROUP = 20; + VLAN_ATTR_CUSTOM_IGMP_SNOOPING_ENABLE = 21; + VLAN_ATTR_TAM_OBJECT = 22; +} + +enum VlanMemberAttr { + VLAN_MEMBER_ATTR_UNSPECIFIED = 0; + VLAN_MEMBER_ATTR_VLAN_ID = 1; + VLAN_MEMBER_ATTR_BRIDGE_PORT_ID = 2; + VLAN_MEMBER_ATTR_VLAN_TAGGING_MODE = 3; +} + +message CreateVlanRequest { + uint64 switch = 1; + + uint32 vlan_id = 2; + uint32 max_learned_addresses = 3; + uint64 stp_instance = 4; + bool learn_disable = 5; + VlanMcastLookupKeyType ipv4_mcast_lookup_key_type = 6; + VlanMcastLookupKeyType ipv6_mcast_lookup_key_type = 7; + uint64 unknown_non_ip_mcast_output_group_id = 8; + uint64 unknown_ipv4_mcast_output_group_id = 9; + uint64 unknown_ipv6_mcast_output_group_id = 10; + uint64 unknown_linklocal_mcast_output_group_id = 11; + uint64 ingress_acl = 12; + uint64 egress_acl = 13; + uint32 meta_data = 14; + VlanFloodControlType unknown_unicast_flood_control_type = 15; + uint64 unknown_unicast_flood_group = 16; + VlanFloodControlType unknown_multicast_flood_control_type = 17; + uint64 unknown_multicast_flood_group = 18; + VlanFloodControlType broadcast_flood_control_type = 19; + uint64 broadcast_flood_group = 20; + bool custom_igmp_snooping_enable = 21; + repeated uint64 tam_object = 22; +} + +message CreateVlanResponse { + uint64 oid = 1; +} + +message RemoveVlanRequest { + uint64 oid = 1; +} + +message RemoveVlanResponse {} + +message SetVlanAttributeRequest { + uint64 oid = 1; + oneof attr { + uint32 max_learned_addresses = 2; + uint64 stp_instance = 3; + bool learn_disable = 4; + VlanMcastLookupKeyType ipv4_mcast_lookup_key_type = 5; + VlanMcastLookupKeyType ipv6_mcast_lookup_key_type = 6; + uint64 unknown_non_ip_mcast_output_group_id = 7; + uint64 unknown_ipv4_mcast_output_group_id = 8; + uint64 unknown_ipv6_mcast_output_group_id = 9; + uint64 unknown_linklocal_mcast_output_group_id = 10; + uint64 ingress_acl = 11; + uint64 egress_acl = 12; + uint32 meta_data = 13; + VlanFloodControlType unknown_unicast_flood_control_type = 14; + uint64 unknown_unicast_flood_group = 15; + VlanFloodControlType unknown_multicast_flood_control_type = 16; + uint64 unknown_multicast_flood_group = 17; + VlanFloodControlType broadcast_flood_control_type = 18; + uint64 broadcast_flood_group = 19; + bool custom_igmp_snooping_enable = 20; + Uint64List tam_object = 21; + } +} + +message SetVlanAttributeResponse {} + +message GetVlanAttributeRequest { + uint64 oid = 1; + VlanAttr attr_type = 2; +} + +message GetVlanAttributeResponse { + VlanAttribute attr = 1; +} + +message CreateVlanMemberRequest { + uint64 switch = 1; + + uint64 vlan_id = 2; + uint64 bridge_port_id = 3; + VlanTaggingMode vlan_tagging_mode = 4; +} + +message CreateVlanMemberResponse { + uint64 oid = 1; +} + +message RemoveVlanMemberRequest { + uint64 oid = 1; +} + +message RemoveVlanMemberResponse {} + +message SetVlanMemberAttributeRequest { + uint64 oid = 1; + oneof attr { + VlanTaggingMode vlan_tagging_mode = 2; + } +} + +message SetVlanMemberAttributeResponse {} + +message GetVlanMemberAttributeRequest { + uint64 oid = 1; + VlanMemberAttr attr_type = 2; +} + +message GetVlanMemberAttributeResponse { + VlanMemberAttribute attr = 1; +} + +service Vlan { + rpc CreateVlan(CreateVlanRequest) returns (CreateVlanResponse) {} + rpc RemoveVlan(RemoveVlanRequest) returns (RemoveVlanResponse) {} + rpc SetVlanAttribute(SetVlanAttributeRequest) + returns (SetVlanAttributeResponse) {} + rpc GetVlanAttribute(GetVlanAttributeRequest) + returns (GetVlanAttributeResponse) {} + rpc CreateVlanMember(CreateVlanMemberRequest) + returns (CreateVlanMemberResponse) {} + rpc RemoveVlanMember(RemoveVlanMemberRequest) + returns (RemoveVlanMemberResponse) {} + rpc SetVlanMemberAttribute(SetVlanMemberAttributeRequest) + returns (SetVlanMemberAttributeResponse) {} + rpc GetVlanMemberAttribute(GetVlanMemberAttributeRequest) + returns (GetVlanMemberAttributeResponse) {} +} diff --git a/dataplane/standalone/proto/wred.proto b/dataplane/standalone/proto/wred.proto new file mode 100644 index 00000000..47cce692 --- /dev/null +++ b/dataplane/standalone/proto/wred.proto @@ -0,0 +1,131 @@ + +syntax = "proto3"; + +package lemming.dataplane.sai; + +import "dataplane/standalone/proto/common.proto"; + +option go_package = "github.com/openconfig/lemming/proto/dataplane/sai"; + +enum WredAttr { + WRED_ATTR_UNSPECIFIED = 0; + WRED_ATTR_GREEN_ENABLE = 1; + WRED_ATTR_GREEN_MIN_THRESHOLD = 2; + WRED_ATTR_GREEN_MAX_THRESHOLD = 3; + WRED_ATTR_GREEN_DROP_PROBABILITY = 4; + WRED_ATTR_YELLOW_ENABLE = 5; + WRED_ATTR_YELLOW_MIN_THRESHOLD = 6; + WRED_ATTR_YELLOW_MAX_THRESHOLD = 7; + WRED_ATTR_YELLOW_DROP_PROBABILITY = 8; + WRED_ATTR_RED_ENABLE = 9; + WRED_ATTR_RED_MIN_THRESHOLD = 10; + WRED_ATTR_RED_MAX_THRESHOLD = 11; + WRED_ATTR_RED_DROP_PROBABILITY = 12; + WRED_ATTR_WEIGHT = 13; + WRED_ATTR_ECN_MARK_MODE = 14; + WRED_ATTR_ECN_GREEN_MIN_THRESHOLD = 15; + WRED_ATTR_ECN_GREEN_MAX_THRESHOLD = 16; + WRED_ATTR_ECN_GREEN_MARK_PROBABILITY = 17; + WRED_ATTR_ECN_YELLOW_MIN_THRESHOLD = 18; + WRED_ATTR_ECN_YELLOW_MAX_THRESHOLD = 19; + WRED_ATTR_ECN_YELLOW_MARK_PROBABILITY = 20; + WRED_ATTR_ECN_RED_MIN_THRESHOLD = 21; + WRED_ATTR_ECN_RED_MAX_THRESHOLD = 22; + WRED_ATTR_ECN_RED_MARK_PROBABILITY = 23; + WRED_ATTR_ECN_COLOR_UNAWARE_MIN_THRESHOLD = 24; + WRED_ATTR_ECN_COLOR_UNAWARE_MAX_THRESHOLD = 25; + WRED_ATTR_ECN_COLOR_UNAWARE_MARK_PROBABILITY = 26; +} + +message CreateWredRequest { + uint64 switch = 1; + + bool green_enable = 2; + uint32 green_min_threshold = 3; + uint32 green_max_threshold = 4; + uint32 green_drop_probability = 5; + bool yellow_enable = 6; + uint32 yellow_min_threshold = 7; + uint32 yellow_max_threshold = 8; + uint32 yellow_drop_probability = 9; + bool red_enable = 10; + uint32 red_min_threshold = 11; + uint32 red_max_threshold = 12; + uint32 red_drop_probability = 13; + uint32 weight = 14; + EcnMarkMode ecn_mark_mode = 15; + uint32 ecn_green_min_threshold = 16; + uint32 ecn_green_max_threshold = 17; + uint32 ecn_green_mark_probability = 18; + uint32 ecn_yellow_min_threshold = 19; + uint32 ecn_yellow_max_threshold = 20; + uint32 ecn_yellow_mark_probability = 21; + uint32 ecn_red_min_threshold = 22; + uint32 ecn_red_max_threshold = 23; + uint32 ecn_red_mark_probability = 24; + uint32 ecn_color_unaware_min_threshold = 25; + uint32 ecn_color_unaware_max_threshold = 26; + uint32 ecn_color_unaware_mark_probability = 27; +} + +message CreateWredResponse { + uint64 oid = 1; +} + +message RemoveWredRequest { + uint64 oid = 1; +} + +message RemoveWredResponse {} + +message SetWredAttributeRequest { + uint64 oid = 1; + oneof attr { + bool green_enable = 2; + uint32 green_min_threshold = 3; + uint32 green_max_threshold = 4; + uint32 green_drop_probability = 5; + bool yellow_enable = 6; + uint32 yellow_min_threshold = 7; + uint32 yellow_max_threshold = 8; + uint32 yellow_drop_probability = 9; + bool red_enable = 10; + uint32 red_min_threshold = 11; + uint32 red_max_threshold = 12; + uint32 red_drop_probability = 13; + uint32 weight = 14; + EcnMarkMode ecn_mark_mode = 15; + uint32 ecn_green_min_threshold = 16; + uint32 ecn_green_max_threshold = 17; + uint32 ecn_green_mark_probability = 18; + uint32 ecn_yellow_min_threshold = 19; + uint32 ecn_yellow_max_threshold = 20; + uint32 ecn_yellow_mark_probability = 21; + uint32 ecn_red_min_threshold = 22; + uint32 ecn_red_max_threshold = 23; + uint32 ecn_red_mark_probability = 24; + uint32 ecn_color_unaware_min_threshold = 25; + uint32 ecn_color_unaware_max_threshold = 26; + uint32 ecn_color_unaware_mark_probability = 27; + } +} + +message SetWredAttributeResponse {} + +message GetWredAttributeRequest { + uint64 oid = 1; + WredAttr attr_type = 2; +} + +message GetWredAttributeResponse { + WredAttribute attr = 1; +} + +service Wred { + rpc CreateWred(CreateWredRequest) returns (CreateWredResponse) {} + rpc RemoveWred(RemoveWredRequest) returns (RemoveWredResponse) {} + rpc SetWredAttribute(SetWredAttributeRequest) + returns (SetWredAttributeResponse) {} + rpc GetWredAttribute(GetWredAttributeRequest) + returns (GetWredAttributeResponse) {} +}