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