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