brintos

brintos / linux-shallow public Read only

0
0
Text · 22.8 KiB · 46f5d1c Raw
999 lines · yaml
1# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)2 3name: ovs_flow4version: 15protocol: genetlink-legacy6uapi-header: linux/openvswitch.h7 8doc:9  OVS flow configuration over generic netlink.10 11definitions:12  -13    name: ovs-header14    type: struct15    doc: |16      Header for OVS Generic Netlink messages.17    members:18      -19        name: dp-ifindex20        type: u3221        doc: |22          ifindex of local port for datapath (0 to make a request not specific23          to a datapath).24  -25    name: ovs-flow-stats26    type: struct27    members:28      -29        name: n-packets30        type: u6431        doc: Number of matched packets.32      -33        name: n-bytes34        type: u6435        doc: Number of matched bytes.36  -37    name: ovs-key-ethernet38    type: struct39    members:40      -41        name: eth-src42        type: binary43        len: 644        display-hint: mac45      -46        name: eth-dst47        type: binary48        len: 649        display-hint: mac50  -51    name: ovs-key-mpls52    type: struct53    members:54      -55        name: mpls-lse56        type: u3257        byte-order: big-endian58  -59    name: ovs-key-ipv460    type: struct61    members:62      -63        name: ipv4-src64        type: u3265        byte-order: big-endian66        display-hint: ipv467      -68        name: ipv4-dst69        type: u3270        byte-order: big-endian71        display-hint: ipv472      -73        name: ipv4-proto74        type: u875      -76        name: ipv4-tos77        type: u878      -79        name: ipv4-ttl80        type: u881      -82        name: ipv4-frag83        type: u884        enum: ovs-frag-type85  -86    name: ovs-key-ipv687    type: struct88    members:89      -90        name: ipv6-src91        type: binary92        len: 1693        byte-order: big-endian94        display-hint: ipv695      -96        name: ipv6-dst97        type: binary98        len: 1699        byte-order: big-endian100        display-hint: ipv6101      -102        name: ipv6-label103        type: u32104        byte-order: big-endian105      -106        name: ipv6-proto107        type: u8108      -109        name: ipv6-tclass110        type: u8111      -112        name: ipv6-hlimit113        type: u8114      -115        name: ipv6-frag116        type: u8117  -118    name: ovs-key-ipv6-exthdrs119    type: struct120    members:121      -122        name: hdrs123        type: u16124  -125    name: ovs-frag-type126    name-prefix: ovs-frag-type-127    enum-name: ovs-frag-type128    type: enum129    entries:130      -131        name: none132        doc: Packet is not a fragment.133      -134        name: first135        doc: Packet is a fragment with offset 0.136      -137        name: later138        doc: Packet is a fragment with nonzero offset.139      -140        name: any141        value: 255142  -143    name: ovs-key-tcp144    type: struct145    members:146      -147        name: tcp-src148        type: u16149        byte-order: big-endian150      -151        name: tcp-dst152        type: u16153        byte-order: big-endian154  -155    name: ovs-key-udp156    type: struct157    members:158      -159        name: udp-src160        type: u16161        byte-order: big-endian162      -163        name: udp-dst164        type: u16165        byte-order: big-endian166  -167    name: ovs-key-sctp168    type: struct169    members:170      -171        name: sctp-src172        type: u16173        byte-order: big-endian174      -175        name: sctp-dst176        type: u16177        byte-order: big-endian178  -179    name: ovs-key-icmp180    type: struct181    members:182      -183        name: icmp-type184        type: u8185      -186        name: icmp-code187        type: u8188  -189    name: ovs-key-arp190    type: struct191    members:192      -193        name: arp-sip194        type: u32195        byte-order: big-endian196      -197        name: arp-tip198        type: u32199        byte-order: big-endian200      -201        name: arp-op202        type: u16203        byte-order: big-endian204      -205        name: arp-sha206        type: binary207        len: 6208        display-hint: mac209      -210        name: arp-tha211        type: binary212        len: 6213        display-hint: mac214  -215    name: ovs-key-nd216    type: struct217    members:218      -219        name: nd_target220        type: binary221        len: 16222        byte-order: big-endian223      -224        name: nd-sll225        type: binary226        len: 6227        display-hint: mac228      -229        name: nd-tll230        type: binary231        len: 6232        display-hint: mac233  -234    name: ovs-key-ct-tuple-ipv4235    type: struct236    members:237      -238        name: ipv4-src239        type: u32240        byte-order: big-endian241      -242        name: ipv4-dst243        type: u32244        byte-order: big-endian245      -246        name: src-port247        type: u16248        byte-order: big-endian249      -250        name: dst-port251        type: u16252        byte-order: big-endian253      -254        name: ipv4-proto255        type: u8256  -257    name: ovs-action-push-vlan258    type: struct259    members:260      -261        name: vlan_tpid262        type: u16263        byte-order: big-endian264        doc: Tag protocol identifier (TPID) to push.265      -266        name: vlan_tci267        type: u16268        byte-order: big-endian269        doc: Tag control identifier (TCI) to push.270  -271    name: ovs-ufid-flags272    name-prefix: ovs-ufid-f-273    enum-name:274    type: flags275    entries:276      - omit-key277      - omit-mask278      - omit-actions279  -280    name: ovs-action-hash281    type: struct282    members:283      -284        name: hash-alg285        type: u32286        doc: Algorithm used to compute hash prior to recirculation.287      -288        name: hash-basis289        type: u32290        doc: Basis used for computing hash.291  -292    name: ovs-hash-alg293    enum-name: ovs-hash-alg294    type: enum295    doc: |296      Data path hash algorithm for computing Datapath hash. The algorithm type only specifies297      the fields in a flow will be used as part of the hash. Each datapath is free to use its298      own hash algorithm. The hash value will be opaque to the user space daemon.299    entries:300      - ovs-hash-alg-l4301 302  -303    name: ovs-action-push-mpls304    type: struct305    members:306      -307        name: mpls-lse308        type: u32309        byte-order: big-endian310        doc: |311          MPLS label stack entry to push312      -313        name: mpls-ethertype314        type: u32315        byte-order: big-endian316        doc: |317          Ethertype to set in the encapsulating ethernet frame.  The only values318          ethertype should ever be given are ETH_P_MPLS_UC and ETH_P_MPLS_MC,319          indicating MPLS unicast or multicast. Other are rejected.320  -321    name: ovs-action-add-mpls322    type: struct323    members:324      -325        name: mpls-lse326        type: u32327        byte-order: big-endian328        doc: |329          MPLS label stack entry to push330      -331        name: mpls-ethertype332        type: u32333        byte-order: big-endian334        doc: |335          Ethertype to set in the encapsulating ethernet frame.  The only values336          ethertype should ever be given are ETH_P_MPLS_UC and ETH_P_MPLS_MC,337          indicating MPLS unicast or multicast. Other are rejected.338      -339        name: tun-flags340        type: u16341        doc: |342          MPLS tunnel attributes.343  -344    name: ct-state-flags345    enum-name:346    type: flags347    name-prefix: ovs-cs-f-348    entries:349      -350        name: new351        doc: Beginning of a new connection.352      -353        name: established354        doc: Part of an existing connenction355      -356        name: related357        doc: Related to an existing connection.358      -359        name: reply-dir360        doc: Flow is in the reply direction.361      -362        name: invalid363        doc: Could not track the connection.364      -365        name: tracked366        doc: Conntrack has occurred.367      -368        name: src-nat369        doc: Packet's source address/port was mangled by NAT.370      -371        name: dst-nat372        doc: Packet's destination address/port was mangled by NAT.373 374attribute-sets:375  -376    name: flow-attrs377    enum-name: ovs-flow-attr378    name-prefix: ovs-flow-attr-379    attributes:380      -381        name: key382        type: nest383        nested-attributes: key-attrs384        doc: |385          Nested attributes specifying the flow key. Always present in386          notifications. Required for all requests (except dumps).387      -388        name: actions389        type: nest390        nested-attributes: action-attrs391        doc: |392          Nested attributes specifying the actions to take for packets that393          match the key. Always present in notifications. Required for394          OVS_FLOW_CMD_NEW requests, optional for OVS_FLOW_CMD_SET requests.  An395          OVS_FLOW_CMD_SET without OVS_FLOW_ATTR_ACTIONS will not modify the396          actions.  To clear the actions, an OVS_FLOW_ATTR_ACTIONS without any397          nested attributes must be given.398      -399        name: stats400        type: binary401        struct: ovs-flow-stats402        doc: |403          Statistics for this flow. Present in notifications if the stats would404          be nonzero. Ignored in requests.405      -406        name: tcp-flags407        type: u8408        doc: |409          An 8-bit value giving the ORed value of all of the TCP flags seen on410          packets in this flow. Only present in notifications for TCP flows, and411          only if it would be nonzero. Ignored in requests.412      -413        name: used414        type: u64415        doc: |416          A 64-bit integer giving the time, in milliseconds on the system417          monotonic clock, at which a packet was last processed for this418          flow. Only present in notifications if a packet has been processed for419          this flow. Ignored in requests.420      -421        name: clear422        type: flag423        doc: |424          If present in a OVS_FLOW_CMD_SET request, clears the last-used time,425          accumulated TCP flags, and statistics for this flow.  Otherwise426          ignored in requests. Never present in notifications.427      -428        name: mask429        type: nest430        nested-attributes: key-attrs431        doc: |432          Nested attributes specifying the mask bits for wildcarded flow433          match. Mask bit value '1' specifies exact match with corresponding434          flow key bit, while mask bit value '0' specifies a wildcarded435          match. Omitting attribute is treated as wildcarding all corresponding436          fields. Optional for all requests. If not present, all flow key bits437          are exact match bits.438      -439        name: probe440        type: binary441        doc: |442          Flow operation is a feature probe, error logging should be suppressed.443      -444        name: ufid445        type: binary446        doc: |447          A value between 1-16 octets specifying a unique identifier for the448          flow. Causes the flow to be indexed by this value rather than the449          value of the OVS_FLOW_ATTR_KEY attribute. Optional for all450          requests. Present in notifications if the flow was created with this451          attribute.452        display-hint: uuid453      -454        name: ufid-flags455        type: u32456        enum: ovs-ufid-flags457        doc: |458          A 32-bit value of ORed flags that provide alternative semantics for459          flow installation and retrieval. Optional for all requests.460      -461        name: pad462        type: binary463 464  -465    name: key-attrs466    enum-name: ovs-key-attr467    name-prefix: ovs-key-attr-468    attributes:469      -470        name: encap471        type: nest472        nested-attributes: key-attrs473      -474        name: priority475        type: u32476      -477        name: in-port478        type: u32479      -480        name: ethernet481        type: binary482        struct: ovs-key-ethernet483        doc: struct ovs_key_ethernet484      -485        name: vlan486        type: u16487        byte-order: big-endian488      -489        name: ethertype490        type: u16491        byte-order: big-endian492      -493        name: ipv4494        type: binary495        struct: ovs-key-ipv4496      -497        name: ipv6498        type: binary499        struct: ovs-key-ipv6500        doc: struct ovs_key_ipv6501      -502        name: tcp503        type: binary504        struct: ovs-key-tcp505      -506        name: udp507        type: binary508        struct: ovs-key-udp509      -510        name: icmp511        type: binary512        struct: ovs-key-icmp513      -514        name: icmpv6515        type: binary516        struct: ovs-key-icmp517      -518        name: arp519        type: binary520        struct: ovs-key-arp521        doc: struct ovs_key_arp522      -523        name: nd524        type: binary525        struct: ovs-key-nd526        doc: struct ovs_key_nd527      -528        name: skb-mark529        type: u32530      -531        name: tunnel532        type: nest533        nested-attributes: tunnel-key-attrs534      -535        name: sctp536        type: binary537        struct: ovs-key-sctp538      -539        name: tcp-flags540        type: u16541        byte-order: big-endian542      -543        name: dp-hash544        type: u32545        doc: Value 0 indicates the hash is not computed by the datapath.546      -547        name: recirc-id548        type: u32549      -550        name: mpls551        type: binary552        struct: ovs-key-mpls553      -554        name: ct-state555        type: u32556        enum: ct-state-flags557        enum-as-flags: true558      -559        name: ct-zone560        type: u16561        doc: connection tracking zone562      -563        name: ct-mark564        type: u32565        doc: connection tracking mark566      -567        name: ct-labels568        type: binary569        display-hint: hex570        doc: 16-octet connection tracking label571      -572        name: ct-orig-tuple-ipv4573        type: binary574        struct: ovs-key-ct-tuple-ipv4575      -576        name: ct-orig-tuple-ipv6577        type: binary578        doc: struct ovs_key_ct_tuple_ipv6579      -580        name: nsh581        type: nest582        nested-attributes: ovs-nsh-key-attrs583      -584        name: packet-type585        type: u32586        byte-order: big-endian587        doc: Should not be sent to the kernel588      -589        name: nd-extensions590        type: binary591        doc: Should not be sent to the kernel592      -593        name: tunnel-info594        type: binary595        doc: struct ip_tunnel_info596      -597        name: ipv6-exthdrs598        type: binary599        struct: ovs-key-ipv6-exthdrs600        doc: struct ovs_key_ipv6_exthdr601  -602    name: action-attrs603    enum-name: ovs-action-attr604    name-prefix: ovs-action-attr-605    attributes:606      -607        name: output608        type: u32609        doc: ovs port number in datapath610      -611        name: userspace612        type: nest613        nested-attributes: userspace-attrs614      -615        name: set616        type: nest617        nested-attributes: key-attrs618        doc: Replaces the contents of an existing header. The single nested attribute specifies a header to modify and its value.619      -620        name: push-vlan621        type: binary622        struct: ovs-action-push-vlan623        doc: Push a new outermost 802.1Q or 802.1ad header onto the packet.624      -625        name: pop-vlan626        type: flag627        doc: Pop the outermost 802.1Q or 802.1ad header from the packet.628      -629        name: sample630        type: nest631        nested-attributes: sample-attrs632        doc: |633          Probabilistically executes actions, as specified in the nested attributes.634      -635        name: recirc636        type: u32637        doc: recirc id638      -639        name: hash640        type: binary641        struct: ovs-action-hash642      -643        name: push-mpls644        type: binary645        struct: ovs-action-push-mpls646        doc: |647          Push a new MPLS label stack entry onto the top of the packets MPLS648          label stack. Set the ethertype of the encapsulating frame to either649          ETH_P_MPLS_UC or ETH_P_MPLS_MC to indicate the new packet contents.650      -651        name: pop-mpls652        type: u16653        byte-order: big-endian654        doc: ethertype655      -656        name: set-masked657        type: nest658        nested-attributes: key-attrs659        doc: |660          Replaces the contents of an existing header. A nested attribute661          specifies a header to modify, its value, and a mask. For every bit set662          in the mask, the corresponding bit value is copied from the value to663          the packet header field, rest of the bits are left unchanged. The664          non-masked value bits must be passed in as zeroes. Masking is not665          supported for the OVS_KEY_ATTR_TUNNEL attribute.666      -667        name: ct668        type: nest669        nested-attributes: ct-attrs670        doc: |671          Track the connection. Populate the conntrack-related entries672          in the flow key.673      -674        name: trunc675        type: u32676        doc: struct ovs_action_trunc is a u32 max length677      -678        name: push-eth679        type: binary680        doc: struct ovs_action_push_eth681      -682        name: pop-eth683        type: flag684      -685        name: ct-clear686        type: flag687      -688        name: push-nsh689        type: nest690        nested-attributes: ovs-nsh-key-attrs691        doc: |692          Push NSH header to the packet.693      -694        name: pop-nsh695        type: flag696        doc: |697          Pop the outermost NSH header off the packet.698      -699        name: meter700        type: u32701        doc: |702          Run packet through a meter, which may drop the packet, or modify the703          packet (e.g., change the DSCP field)704      -705        name: clone706        type: nest707        nested-attributes: action-attrs708        doc: |709          Make a copy of the packet and execute a list of actions without710          affecting the original packet and key.711      -712        name: check-pkt-len713        type: nest714        nested-attributes: check-pkt-len-attrs715        doc: |716          Check the packet length and execute a set of actions if greater than717          the specified packet length, else execute another set of actions.718      -719        name: add-mpls720        type: binary721        struct: ovs-action-add-mpls722        doc: |723          Push a new MPLS label stack entry at the start of the packet or at the724          start of the l3 header depending on the value of l3 tunnel flag in the725          tun_flags field of this OVS_ACTION_ATTR_ADD_MPLS argument.726      -727        name: dec-ttl728        type: nest729        nested-attributes: dec-ttl-attrs730      -731        name: psample732        type: nest733        nested-attributes: psample-attrs734        doc: |735          Sends a packet sample to psample for external observation.736  -737    name: tunnel-key-attrs738    enum-name: ovs-tunnel-key-attr739    name-prefix: ovs-tunnel-key-attr-740    attributes:741      -742        name: id743        type: u64744        byte-order: big-endian745        value: 0746      -747        name: ipv4-src748        type: u32749        byte-order: big-endian750      -751        name: ipv4-dst752        type: u32753        byte-order: big-endian754      -755        name: tos756        type: u8757      -758        name: ttl759        type: u8760      -761        name: dont-fragment762        type: flag763      -764        name: csum765        type: flag766      -767        name: oam768        type: flag769      -770        name: geneve-opts771        type: binary772        sub-type: u32773      -774        name: tp-src775        type: u16776        byte-order: big-endian777      -778        name: tp-dst779        type: u16780        byte-order: big-endian781      -782        name: vxlan-opts783        type: nest784        nested-attributes: vxlan-ext-attrs785      -786        name: ipv6-src787        type: binary788        doc: |789          struct in6_addr source IPv6 address790      -791        name: ipv6-dst792        type: binary793        doc: |794          struct in6_addr destination IPv6 address795      -796        name: pad797        type: binary798      -799        name: erspan-opts800        type: binary801        doc: |802          struct erspan_metadata803      -804        name: ipv4-info-bridge805        type: flag806  -807    name: check-pkt-len-attrs808    enum-name: ovs-check-pkt-len-attr809    name-prefix: ovs-check-pkt-len-attr-810    attributes:811      -812        name: pkt-len813        type: u16814      -815        name: actions-if-greater816        type: nest817        nested-attributes: action-attrs818      -819        name: actions-if-less-equal820        type: nest821        nested-attributes: action-attrs822  -823    name: sample-attrs824    enum-name: ovs-sample-attr825    name-prefix: ovs-sample-attr-826    attributes:827      -828        name: probability829        type: u32830      -831        name: actions832        type: nest833        nested-attributes: action-attrs834  -835    name: userspace-attrs836    enum-name: ovs-userspace-attr837    name-prefix: ovs-userspace-attr-838    attributes:839      -840        name: pid841        type: u32842      -843        name: userdata844        type: binary845      -846        name: egress-tun-port847        type: u32848      -849        name: actions850        type: flag851  -852    name: ovs-nsh-key-attrs853    enum-name: ovs-nsh-key-attr854    name-prefix: ovs-nsh-key-attr-855    attributes:856      -857        name: base858        type: binary859      -860        name: md1861        type: binary862      -863        name: md2864        type: binary865  -866    name: ct-attrs867    enum-name: ovs-ct-attr868    name-prefix: ovs-ct-attr-869    attributes:870      -871        name: commit872        type: flag873      -874        name: zone875        type: u16876      -877        name: mark878        type: binary879      -880        name: labels881        type: binary882      -883        name: helper884        type: string885      -886        name: nat887        type: nest888        nested-attributes: nat-attrs889      -890        name: force-commit891        type: flag892      -893        name: eventmask894        type: u32895      -896        name: timeout897        type: string898  -899    name: nat-attrs900    enum-name: ovs-nat-attr901    name-prefix: ovs-nat-attr-902    attributes:903      -904        name: src905        type: flag906      -907        name: dst908        type: flag909      -910        name: ip-min911        type: binary912      -913        name: ip-max914        type: binary915      -916        name: proto-min917        type: u16918      -919        name: proto-max920        type: u16921      -922        name: persistent923        type: flag924      -925        name: proto-hash926        type: flag927      -928        name: proto-random929        type: flag930  -931    name: dec-ttl-attrs932    enum-name: ovs-dec-ttl-attr933    name-prefix: ovs-dec-ttl-attr-934    attributes:935      -936        name: action937        type: nest938        nested-attributes: action-attrs939  -940    name: vxlan-ext-attrs941    enum-name: ovs-vxlan-ext-942    name-prefix: ovs-vxlan-ext-943    attributes:944      -945        name: gbp946        type: u32947  -948    name: psample-attrs949    enum-name: ovs-psample-attr950    name-prefix: ovs-psample-attr-951    attributes:952      -953        name: group954        type: u32955      -956        name: cookie957        type: binary958 959operations:960  name-prefix: ovs-flow-cmd-961  fixed-header: ovs-header962  list:963    -964      name: get965      doc: Get / dump OVS flow configuration and state966      value: 3967      attribute-set: flow-attrs968      do: &flow-get-op969        request:970          attributes:971            - key972            - ufid973            - ufid-flags974        reply:975          attributes:976            - key977            - ufid978            - mask979            - stats980            - actions981      dump: *flow-get-op982    -983      name: new984      doc: Create OVS flow configuration in a data path985      value: 1986      attribute-set: flow-attrs987      do:988        request:989          attributes:990            - key991            - ufid992            - mask993            - actions994 995mcast-groups:996  list:997    -998      name: ovs_flow999