summaryrefslogtreecommitdiffstats
path: root/Documentation/netlink/specs/team.yaml
blob: c13529e011c90a2d5b410611d08017160148ca16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)

name: team

protocol: genetlink-legacy

doc: |
  Network team device driver.

c-family-name: team-genl-name
c-version-name: team-genl-version
kernel-policy: global
uapi-header: linux/if_team.h

definitions:
  -
    name: string-max-len
    type: const
    value: 32
  -
    name: genl-change-event-mc-grp-name
    type: const
    value: change_event

attribute-sets:
  -
    name: team
    doc:
      The team nested layout of get/set msg looks like
          [TEAM_ATTR_LIST_OPTION]
              [TEAM_ATTR_ITEM_OPTION]
                  [TEAM_ATTR_OPTION_*], ...
              [TEAM_ATTR_ITEM_OPTION]
                  [TEAM_ATTR_OPTION_*], ...
              ...
          [TEAM_ATTR_LIST_PORT]
              [TEAM_ATTR_ITEM_PORT]
                  [TEAM_ATTR_PORT_*], ...
              [TEAM_ATTR_ITEM_PORT]
                  [TEAM_ATTR_PORT_*], ...
              ...
    name-prefix: team-attr-
    attributes:
      -
        name: unspec
        type: unused
        value: 0
      -
        name: team-ifindex
        type: u32
      -
        name: list-option
        type: nest
        nested-attributes: item-option
      -
        name: list-port
        type: nest
        nested-attributes: item-port
  -
    name: item-option
    name-prefix: team-attr-item-
    attr-cnt-name: __team-attr-item-option-max
    attr-max-name: team-attr-item-option-max
    attributes:
      -
        name: option-unspec
        type: unused
        value: 0
      -
        name: option
        type: nest
        nested-attributes: attr-option
  -
    name: attr-option
    name-prefix: team-attr-option-
    attributes:
      -
        name: unspec
        type: unused
        value: 0
      -
        name: name
        type: string
        checks:
          max-len: string-max-len
          unterminated-ok: true
      -
        name: changed
        type: flag
      -
        name: type
        type: u8
      -
        name: data
        type: binary
      -
        name: removed
        type: flag
      -
        name: port-ifindex
        type: u32
        doc: for per-port options
      -
        name: array-index
        type: u32
        doc: for array options
  -
    name: item-port
    name-prefix: team-attr-item-
    attr-cnt-name: __team-attr-item-port-max
    attr-max-name: team-attr-item-port-max
    attributes:
      -
        name: port-unspec
        type: unused
        value: 0
      -
        name: port
        type: nest
        nested-attributes: attr-port
  -
    name: attr-port
    name-prefix: team-attr-port-
    attributes:
      -
        name: unspec
        type: unused
        value: 0
      -
        name: ifindex
        type: u32
      -
        name: changed
        type: flag
      -
        name: linkup
        type: flag
      -
        name: speed
        type: u32
      -
        name: duplex
        type: u8
      -
        name: removed
        type: flag

operations:
  list:
    -
      name: noop
      doc: No operation
      value: 0
      attribute-set: team
      dont-validate: [ strict ]

      do:
        # Actually it only reply the team netlink family
        reply:
          attributes:
            - team-ifindex

    -
      name: options-set
      doc: Set team options
      attribute-set: team
      dont-validate: [ strict ]
      flags: [ admin-perm ]

      do:
        request: &option_attrs
          attributes:
            - team-ifindex
            - list-option
        reply: *option_attrs

    -
      name: options-get
      doc: Get team options info
      attribute-set: team
      dont-validate: [ strict ]
      flags: [ admin-perm ]

      do:
        request:
          attributes:
            - team-ifindex
        reply: *option_attrs

    -
      name: port-list-get
      doc: Get team ports info
      attribute-set: team
      dont-validate: [ strict ]
      flags: [ admin-perm ]

      do:
        request:
          attributes:
            - team-ifindex
        reply: &port_attrs
          attributes:
            - team-ifindex
            - list-port