1# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
2
3name: ovs_datapath
4version: 2
5protocol: genetlink-legacy
6uapi-header: linux/openvswitch.h
7
8doc:
9  OVS datapath 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: user-features
21    type: flags
22    name-prefix: ovs-dp-f-
23    entries:
24      -
25        name: unaligned
26        doc: Allow last Netlink attribute to be unaligned
27      -
28        name: vport-pids
29        doc: Allow datapath to associate multiple Netlink PIDs to each vport
30      -
31        name: tc-recirc-sharing
32        doc: Allow tc offload recirc sharing
33      -
34        name: dispatch-upcall-per-cpu
35        doc: Allow per-cpu dispatch of upcalls
36  -
37    name: datapath-stats
38    enum-name: ovs-dp-stats
39    type: struct
40    members:
41      -
42        name: n-hit
43        type: u64
44      -
45        name: n-missed
46        type: u64
47      -
48        name: n-lost
49        type: u64
50      -
51        name: n-flows
52        type: u64
53  -
54    name: megaflow-stats
55    enum-name: ovs-dp-megaflow-stats
56    type: struct
57    members:
58      -
59        name: n-mask-hit
60        type: u64
61      -
62        name: n-masks
63        type: u32
64      -
65        name: padding
66        type: u32
67      -
68        name: n-cache-hit
69        type: u64
70      -
71        name: pad1
72        type: u64
73
74attribute-sets:
75  -
76    name: datapath
77    name-prefix: ovs-dp-attr-
78    enum-name: ovs-datapath-attrs
79    attributes:
80      -
81        name: name
82        type: string
83      -
84        name: upcall-pid
85        doc: upcall pid
86        type: u32
87      -
88        name: stats
89        type: binary
90        struct: datapath-stats
91      -
92        name: megaflow-stats
93        type: binary
94        struct: megaflow-stats
95      -
96        name: user-features
97        type: u32
98        enum: user-features
99        enum-as-flags: true
100      -
101        name: pad
102        type: unused
103      -
104        name: masks-cache-size
105        type: u32
106      -
107        name: per-cpu-pids
108        type: binary
109        sub-type: u32
110      -
111        name: ifindex
112        type: u32
113
114operations:
115  fixed-header: ovs-header
116  name-prefix: ovs-dp-cmd-
117  list:
118    -
119      name: get
120      doc: Get / dump OVS data path configuration and state
121      value: 3
122      attribute-set: datapath
123      do: &dp-get-op
124        request:
125          attributes:
126            - name
127        reply:
128          attributes:
129            - name
130            - upcall-pid
131            - stats
132            - megaflow-stats
133            - user-features
134            - masks-cache-size
135            - per-cpu-pids
136      dump: *dp-get-op
137    -
138      name: new
139      doc: Create new OVS data path
140      value: 1
141      attribute-set: datapath
142      do:
143        request:
144          attributes:
145            - dp-ifindex
146            - name
147            - upcall-pid
148            - user-features
149    -
150      name: del
151      doc: Delete existing OVS data path
152      value: 2
153      attribute-set: datapath
154      do:
155        request:
156          attributes:
157            - dp-ifindex
158            - name
159
160mcast-groups:
161  list:
162    -
163      name: ovs_datapath
164