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