1# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
2
3name: ovs_vport
4version: 2
5protocol: genetlink-legacy
6uapi-header: linux/openvswitch.h
7
8doc:
9  OVS vport configuration over generic netlink.
10
11definitions:
12  -
13    name: ovs-header
14    type: struct
15    members:
16      -
17        name: dp-ifindex
18        type: u32
19  -
20    name: vport-type
21    type: enum
22    enum-name: ovs-vport-type
23    name-prefix: ovs-vport-type-
24    entries: [ unspec, netdev, internal, gre, vxlan, geneve ]
25  -
26    name: vport-stats
27    type: struct
28    enum-name: ovs-vport-stats
29    members:
30      -
31        name: rx-packets
32        type: u64
33      -
34        name: tx-packets
35        type: u64
36      -
37        name: rx-bytes
38        type: u64
39      -
40        name: tx-bytes
41        type: u64
42      -
43        name: rx-errors
44        type: u64
45      -
46        name: tx-errors
47        type: u64
48      -
49        name: rx-dropped
50        type: u64
51      -
52        name: tx-dropped
53        type: u64
54
55attribute-sets:
56  -
57    name: vport-options
58    enum-name: ovs-vport-options
59    name-prefix: ovs-tunnel-attr-
60    attributes:
61      -
62        name: dst-port
63        type: u32
64      -
65        name: extension
66        type: u32
67  -
68    name: upcall-stats
69    enum-name: ovs-vport-upcall-attr
70    name-prefix: ovs-vport-upcall-attr-
71    attributes:
72      -
73        name: success
74        type: u64
75        value: 0
76      -
77        name: fail
78        type: u64
79  -
80    name: vport
81    name-prefix: ovs-vport-attr-
82    enum-name: ovs-vport-attr
83    attributes:
84      -
85        name: port-no
86        type: u32
87      -
88        name: type
89        type: u32
90        enum: vport-type
91      -
92        name: name
93        type: string
94      -
95        name: options
96        type: nest
97        nested-attributes: vport-options
98      -
99        name: upcall-pid
100        type: binary
101        sub-type: u32
102      -
103        name: stats
104        type: binary
105        struct: vport-stats
106      -
107        name: pad
108        type: unused
109      -
110        name: ifindex
111        type: u32
112      -
113        name: netnsid
114        type: u32
115      -
116        name: upcall-stats
117        type: nest
118        nested-attributes: upcall-stats
119
120operations:
121  name-prefix: ovs-vport-cmd-
122  list:
123    -
124      name: get
125      doc: Get / dump OVS vport configuration and state
126      value: 3
127      attribute-set: vport
128      fixed-header: ovs-header
129      do: &vport-get-op
130        request:
131          attributes:
132            - dp-ifindex
133            - name
134        reply: &dev-all
135          attributes:
136            - dp-ifindex
137            - port-no
138            - type
139            - name
140            - upcall-pid
141            - stats
142            - ifindex
143            - netnsid
144            - upcall-stats
145      dump: *vport-get-op
146
147mcast-groups:
148  list:
149    -
150      name: ovs_vport
151