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: unspec
86        type: unused
87        value: 0
88      -
89        name: port-no
90        type: u32
91      -
92        name: type
93        type: u32
94        enum: vport-type
95      -
96        name: name
97        type: string
98      -
99        name: options
100        type: nest
101        nested-attributes: vport-options
102      -
103        name: upcall-pid
104        type: binary
105        sub-type: u32
106      -
107        name: stats
108        type: binary
109        struct: vport-stats
110      -
111        name: pad
112        type: unused
113      -
114        name: ifindex
115        type: u32
116      -
117        name: netnsid
118        type: u32
119      -
120        name: upcall-stats
121        type: nest
122        nested-attributes: upcall-stats
123
124operations:
125  name-prefix: ovs-vport-cmd-
126  fixed-header: ovs-header
127  list:
128    -
129      name: new
130      doc: Create a new OVS vport
131      attribute-set: vport
132      do:
133        request:
134          attributes:
135            - name
136            - type
137            - upcall-pid
138            - ifindex
139            - options
140    -
141      name: del
142      doc: Delete existing OVS vport from a data path
143      attribute-set: vport
144      do:
145        request:
146          attributes:
147            - port-no
148            - type
149            - name
150    -
151      name: get
152      doc: Get / dump OVS vport configuration and state
153      attribute-set: vport
154      do: &vport-get-op
155        request:
156          attributes:
157            - name
158        reply: &dev-all
159          attributes:
160            - port-no
161            - type
162            - name
163            - upcall-pid
164            - stats
165            - ifindex
166            - netnsid
167            - upcall-stats
168      dump: *vport-get-op
169
170mcast-groups:
171  list:
172    -
173      name: ovs_vport
174