Skip to content

add YAML spec for team

Hangbin Liu netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Documentation: netlink: add a YAML spec for teamDocumentation/netlink/specs/team.yaml MAINTAINERS+206 -06 replies
2/3net: team: use policy generated by YAML specdrivers/net/team/Makefile drivers/net/team/team.c drivers/net/team/team_nl.c +1 more+96 -531 reply
3/3uapi: team: use header file generated from YAML specinclude/uapi/linux/if_team.h+43 -731 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Draft PATCH net-next 0/3] add YAML spec for team

Hi Jakub,

You suggested me to add yaml spec for bridge. Since I'm not familiar with writing the spec file, I choose to convert team as a start.

There are still some questions I got during convertion.

1. Is there a preference to use "-" instead of "_" for the names in spec file? e.g. the attr-cnt-name in team.spec, should I use __team-attr-item-port-max or --team-attr-item-port-max, or __team_attr_item_port_max?
2. I saw ynl-gen-c.py deals with unterminated-ok. But this policy is not shown in the schemas. Is it a new feature that still working on?
3. Do we have to hard code the string max-len? Is there a way to use
the name in definitions? e.g.
name: name
type: string
checks:
max-len: string-max-len
4. The doc will be generate to rst file in future, so there will not have other comments in the _nl.c or _nl.h files, right?
5. the genl_multicast_group is forced to use list. But the team use format like { .name = TEAM_GENL_CHANGE_EVENT_MC_GRP_NAME, }. Should we support this legacy format?
6. The _UAPI_LINUX_IF_TEAM_H_ is rename to _UAPI_LINUX_IF_TEAM_H in uapi header. Does that affects?
7. When build, I got error modpost: missing MODULE_LICENSE() in drivers/net/team/team_nl.o. Should we add the MODULE_LICENSE support in ynl-gen-c.py?
8. When build, I also got errors like
ERROR: modpost: "team_nl_policy" [drivers/net/team/team.ko] undefined!
ERROR: modpost: "team_nl_ops" [drivers/net/team/team.ko] undefined!
ERROR: modpost: "team_nl_noop_doit" [drivers/net/team/team_nl.ko] undefined!
ERROR: modpost: "team_nl_options_set_doit" [drivers/net/team/team_nl.ko] undefined!
ERROR: modpost: "team_nl_options_get_doit" [drivers/net/team/team_nl.ko] undefined!
ERROR: modpost: "team_nl_port_list_get_doit" [drivers/net/team/team_nl.ko] undefined!
ERROR: modpost: "team_attr_option_nl_policy" [drivers/net/team/team.ko] undefined!
Do you know why include "team_nl.h" doesn't help?

Thanks
Hangbin

Hangbin Liu (3):
Documentation: netlink: add a YAML spec for team
net: team: use policy generated by YAML spec
uapi: team: use header file generated from YAML spec

 Documentation/netlink/specs/team.yaml | 205 ++++++++++++++++++++++++++
 MAINTAINERS                           |   1 +
 drivers/net/team/Makefile             |   2 +-
 drivers/net/team/team.c               |  59 +-------
 drivers/net/team/team_nl.c            |  59 ++++++++
 drivers/net/team/team_nl.h            |  29 ++++
 include/uapi/linux/if_team.h          | 116 ++++++---------
 7 files changed, 345 insertions(+), 126 deletions(-)
 create mode 100644 Documentation/netlink/specs/team.yaml
 create mode 100644 drivers/net/team/team_nl.c
 create mode 100644 drivers/net/team/team_nl.h
Signature · 1 line
2.43.0