netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Draft PATCH net-next 0/3] add YAML spec for team
@ 2023-12-13  8:44 Hangbin Liu
  2023-12-13  8:45 ` [Draft PATCH net-next 1/3] Documentation: netlink: add a " Hangbin Liu
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Hangbin Liu @ 2023-12-13  8:44 UTC (permalink / raw)
  To: netdev; +Cc: Jiri Pirko, Jakub Kicinski, Paolo Abeni, Hangbin Liu

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

-- 
2.43.0


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-12-14 19:17 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-13  8:44 [Draft PATCH net-next 0/3] add YAML spec for team Hangbin Liu
2023-12-13  8:45 ` [Draft PATCH net-next 1/3] Documentation: netlink: add a " Hangbin Liu
2023-12-13 15:36   ` Jiri Pirko
2023-12-14  3:44     ` Hangbin Liu
2023-12-14  8:25       ` Jiri Pirko
2023-12-13 16:18   ` Jakub Kicinski
2023-12-14  3:52     ` Hangbin Liu
2023-12-14 19:14       ` Jakub Kicinski
2023-12-13  8:45 ` [Draft PATCH net-next 2/3] net: team: use policy generated by YAML spec Hangbin Liu
2023-12-13 15:44   ` Jiri Pirko
2023-12-13  8:45 ` [Draft PATCH net-next 3/3] uapi: team: use header file generated from " Hangbin Liu
2023-12-13 15:39   ` Jiri Pirko
2023-12-13 16:36 ` [Draft PATCH net-next 0/3] add YAML spec for team Jakub Kicinski
2023-12-14  4:15   ` Hangbin Liu
2023-12-14 19:17     ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).