lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231213084502.4042718-1-liuhangbin@gmail.com>
Date: Wed, 13 Dec 2023 16:44:59 +0800
From: Hangbin Liu <liuhangbin@...il.com>
To: netdev@...r.kernel.org
Cc: Jiri Pirko <jiri@...nulli.us>,
	Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>,
	Hangbin Liu <liuhangbin@...il.com>
Subject: [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

-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ