team.yaml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
  2. name: team
  3. protocol: genetlink-legacy
  4. doc: |
  5. Network team device driver.
  6. c-family-name: team-genl-name
  7. c-version-name: team-genl-version
  8. kernel-policy: global
  9. uapi-header: linux/if_team.h
  10. definitions:
  11. -
  12. name: string-max-len
  13. type: const
  14. value: 32
  15. -
  16. name: genl-change-event-mc-grp-name
  17. type: const
  18. value: change_event
  19. attribute-sets:
  20. -
  21. name: team
  22. doc:
  23. The team nested layout of get/set msg looks like
  24. [TEAM_ATTR_LIST_OPTION]
  25. [TEAM_ATTR_ITEM_OPTION]
  26. [TEAM_ATTR_OPTION_*], ...
  27. [TEAM_ATTR_ITEM_OPTION]
  28. [TEAM_ATTR_OPTION_*], ...
  29. ...
  30. [TEAM_ATTR_LIST_PORT]
  31. [TEAM_ATTR_ITEM_PORT]
  32. [TEAM_ATTR_PORT_*], ...
  33. [TEAM_ATTR_ITEM_PORT]
  34. [TEAM_ATTR_PORT_*], ...
  35. ...
  36. name-prefix: team-attr-
  37. attributes:
  38. -
  39. name: unspec
  40. type: unused
  41. value: 0
  42. -
  43. name: team-ifindex
  44. type: u32
  45. -
  46. name: list-option
  47. type: nest
  48. nested-attributes: item-option
  49. -
  50. name: list-port
  51. type: nest
  52. nested-attributes: item-port
  53. -
  54. name: item-option
  55. name-prefix: team-attr-item-
  56. attr-cnt-name: __team-attr-item-option-max
  57. attr-max-name: team-attr-item-option-max
  58. attributes:
  59. -
  60. name: option-unspec
  61. type: unused
  62. value: 0
  63. -
  64. name: option
  65. type: nest
  66. nested-attributes: attr-option
  67. -
  68. name: attr-option
  69. name-prefix: team-attr-option-
  70. attributes:
  71. -
  72. name: unspec
  73. type: unused
  74. value: 0
  75. -
  76. name: name
  77. type: string
  78. checks:
  79. max-len: string-max-len
  80. unterminated-ok: true
  81. -
  82. name: changed
  83. type: flag
  84. -
  85. name: type
  86. type: u8
  87. -
  88. name: data
  89. type: binary
  90. -
  91. name: removed
  92. type: flag
  93. -
  94. name: port-ifindex
  95. type: u32
  96. doc: for per-port options
  97. -
  98. name: array-index
  99. type: u32
  100. doc: for array options
  101. -
  102. name: item-port
  103. name-prefix: team-attr-item-
  104. attr-cnt-name: __team-attr-item-port-max
  105. attr-max-name: team-attr-item-port-max
  106. attributes:
  107. -
  108. name: port-unspec
  109. type: unused
  110. value: 0
  111. -
  112. name: port
  113. type: nest
  114. nested-attributes: attr-port
  115. -
  116. name: attr-port
  117. name-prefix: team-attr-port-
  118. attributes:
  119. -
  120. name: unspec
  121. type: unused
  122. value: 0
  123. -
  124. name: ifindex
  125. type: u32
  126. -
  127. name: changed
  128. type: flag
  129. -
  130. name: linkup
  131. type: flag
  132. -
  133. name: speed
  134. type: u32
  135. -
  136. name: duplex
  137. type: u8
  138. -
  139. name: removed
  140. type: flag
  141. operations:
  142. list:
  143. -
  144. name: noop
  145. doc: No operation
  146. value: 0
  147. attribute-set: team
  148. dont-validate: [ strict ]
  149. do:
  150. # Actually it only reply the team netlink family
  151. reply:
  152. attributes:
  153. - team-ifindex
  154. -
  155. name: options-set
  156. doc: Set team options
  157. attribute-set: team
  158. dont-validate: [ strict ]
  159. flags: [ admin-perm ]
  160. do:
  161. request: &option_attrs
  162. attributes:
  163. - team-ifindex
  164. - list-option
  165. reply: *option_attrs
  166. -
  167. name: options-get
  168. doc: Get team options info
  169. attribute-set: team
  170. dont-validate: [ strict ]
  171. flags: [ admin-perm ]
  172. do:
  173. request:
  174. attributes:
  175. - team-ifindex
  176. reply: *option_attrs
  177. -
  178. name: port-list-get
  179. doc: Get team ports info
  180. attribute-set: team
  181. dont-validate: [ strict ]
  182. flags: [ admin-perm ]
  183. do:
  184. request:
  185. attributes:
  186. - team-ifindex
  187. reply: &port_attrs
  188. attributes:
  189. - team-ifindex
  190. - list-port