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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6fcff035-ef18-b8ef-3424-fcb30ad4511e@intel.com>
Date:   Tue, 31 Jan 2023 10:31:08 -0800
From:   Jacob Keller <jacob.e.keller@...el.com>
To:     Jiri Pirko <jiri@...nulli.us>, <netdev@...r.kernel.org>
CC:     <davem@...emloft.net>, <kuba@...nel.org>, <pabeni@...hat.com>,
        <edumazet@...gle.com>
Subject: Re: [patch net-next 1/3] devlink: rename
 devlink_nl_instance_iter_dump() to "dumpit"



On 1/31/2023 1:06 AM, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@...dia.com>
> 
> To have the name of the function consistent with the struct cb name,
> rename devlink_nl_instance_iter_dump() to
> devlink_nl_instance_iter_dumpit().
> 
> Signed-off-by: Jiri Pirko <jiri@...dia.com>
> ---

It's a few extra characters, but I think i prefer seeing dumpit in the
name vs dump. I understand that the use of "it" comes from the fact that
.do is invalid. However, being consistent seems better to me here.
Easier to search for dumpit as well vs dump.

Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>

Thanks,
Jake

>  net/devlink/devl_internal.h |  4 ++--
>  net/devlink/leftover.c      | 32 ++++++++++++++++----------------
>  net/devlink/netlink.c       |  4 ++--
>  3 files changed, 20 insertions(+), 20 deletions(-)
> 
> diff --git a/net/devlink/devl_internal.h b/net/devlink/devl_internal.h
> index ba161de4120e..dd4366c68b96 100644
> --- a/net/devlink/devl_internal.h
> +++ b/net/devlink/devl_internal.h
> @@ -128,8 +128,8 @@ devlink_get_from_attrs_lock(struct net *net, struct nlattr **attrs);
>  void devlink_notify_unregister(struct devlink *devlink);
>  void devlink_notify_register(struct devlink *devlink);
>  
> -int devlink_nl_instance_iter_dump(struct sk_buff *msg,
> -				  struct netlink_callback *cb);
> +int devlink_nl_instance_iter_dumpit(struct sk_buff *msg,
> +				    struct netlink_callback *cb);
>  
>  static inline struct devlink_nl_dump_state *
>  devlink_dump_state(struct netlink_callback *cb)
> diff --git a/net/devlink/leftover.c b/net/devlink/leftover.c
> index 92210587d349..1461eec423ff 100644
> --- a/net/devlink/leftover.c
> +++ b/net/devlink/leftover.c
> @@ -8898,14 +8898,14 @@ const struct genl_small_ops devlink_nl_ops[56] = {
>  		.cmd = DEVLINK_CMD_GET,
>  		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
>  		.doit = devlink_nl_cmd_get_doit,
> -		.dumpit = devlink_nl_instance_iter_dump,
> +		.dumpit = devlink_nl_instance_iter_dumpit,
>  		/* can be retrieved by unprivileged users */
>  	},
>  	{
>  		.cmd = DEVLINK_CMD_PORT_GET,
>  		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
>  		.doit = devlink_nl_cmd_port_get_doit,
> -		.dumpit = devlink_nl_instance_iter_dump,
> +		.dumpit = devlink_nl_instance_iter_dumpit,
>  		.internal_flags = DEVLINK_NL_FLAG_NEED_PORT,
>  		/* can be retrieved by unprivileged users */
>  	},
> @@ -8919,7 +8919,7 @@ const struct genl_small_ops devlink_nl_ops[56] = {
>  	{
>  		.cmd = DEVLINK_CMD_RATE_GET,
>  		.doit = devlink_nl_cmd_rate_get_doit,
> -		.dumpit = devlink_nl_instance_iter_dump,
> +		.dumpit = devlink_nl_instance_iter_dumpit,
>  		.internal_flags = DEVLINK_NL_FLAG_NEED_RATE,
>  		/* can be retrieved by unprivileged users */
>  	},
> @@ -8967,7 +8967,7 @@ const struct genl_small_ops devlink_nl_ops[56] = {
>  	{
>  		.cmd = DEVLINK_CMD_LINECARD_GET,
>  		.doit = devlink_nl_cmd_linecard_get_doit,
> -		.dumpit = devlink_nl_instance_iter_dump,
> +		.dumpit = devlink_nl_instance_iter_dumpit,
>  		.internal_flags = DEVLINK_NL_FLAG_NEED_LINECARD,
>  		/* can be retrieved by unprivileged users */
>  	},
> @@ -8981,14 +8981,14 @@ const struct genl_small_ops devlink_nl_ops[56] = {
>  		.cmd = DEVLINK_CMD_SB_GET,
>  		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
>  		.doit = devlink_nl_cmd_sb_get_doit,
> -		.dumpit = devlink_nl_instance_iter_dump,
> +		.dumpit = devlink_nl_instance_iter_dumpit,
>  		/* can be retrieved by unprivileged users */
>  	},
>  	{
>  		.cmd = DEVLINK_CMD_SB_POOL_GET,
>  		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
>  		.doit = devlink_nl_cmd_sb_pool_get_doit,
> -		.dumpit = devlink_nl_instance_iter_dump,
> +		.dumpit = devlink_nl_instance_iter_dumpit,
>  		/* can be retrieved by unprivileged users */
>  	},
>  	{
> @@ -9001,7 +9001,7 @@ const struct genl_small_ops devlink_nl_ops[56] = {
>  		.cmd = DEVLINK_CMD_SB_PORT_POOL_GET,
>  		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
>  		.doit = devlink_nl_cmd_sb_port_pool_get_doit,
> -		.dumpit = devlink_nl_instance_iter_dump,
> +		.dumpit = devlink_nl_instance_iter_dumpit,
>  		.internal_flags = DEVLINK_NL_FLAG_NEED_PORT,
>  		/* can be retrieved by unprivileged users */
>  	},
> @@ -9016,7 +9016,7 @@ const struct genl_small_ops devlink_nl_ops[56] = {
>  		.cmd = DEVLINK_CMD_SB_TC_POOL_BIND_GET,
>  		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
>  		.doit = devlink_nl_cmd_sb_tc_pool_bind_get_doit,
> -		.dumpit = devlink_nl_instance_iter_dump,
> +		.dumpit = devlink_nl_instance_iter_dumpit,
>  		.internal_flags = DEVLINK_NL_FLAG_NEED_PORT,
>  		/* can be retrieved by unprivileged users */
>  	},
> @@ -9097,7 +9097,7 @@ const struct genl_small_ops devlink_nl_ops[56] = {
>  		.cmd = DEVLINK_CMD_PARAM_GET,
>  		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
>  		.doit = devlink_nl_cmd_param_get_doit,
> -		.dumpit = devlink_nl_instance_iter_dump,
> +		.dumpit = devlink_nl_instance_iter_dumpit,
>  		/* can be retrieved by unprivileged users */
>  	},
>  	{
> @@ -9125,7 +9125,7 @@ const struct genl_small_ops devlink_nl_ops[56] = {
>  		.cmd = DEVLINK_CMD_REGION_GET,
>  		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
>  		.doit = devlink_nl_cmd_region_get_doit,
> -		.dumpit = devlink_nl_instance_iter_dump,
> +		.dumpit = devlink_nl_instance_iter_dumpit,
>  		.flags = GENL_ADMIN_PERM,
>  	},
>  	{
> @@ -9151,14 +9151,14 @@ const struct genl_small_ops devlink_nl_ops[56] = {
>  		.cmd = DEVLINK_CMD_INFO_GET,
>  		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
>  		.doit = devlink_nl_cmd_info_get_doit,
> -		.dumpit = devlink_nl_instance_iter_dump,
> +		.dumpit = devlink_nl_instance_iter_dumpit,
>  		/* can be retrieved by unprivileged users */
>  	},
>  	{
>  		.cmd = DEVLINK_CMD_HEALTH_REPORTER_GET,
>  		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
>  		.doit = devlink_nl_cmd_health_reporter_get_doit,
> -		.dumpit = devlink_nl_instance_iter_dump,
> +		.dumpit = devlink_nl_instance_iter_dumpit,
>  		.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK_OR_PORT,
>  		/* can be retrieved by unprivileged users */
>  	},
> @@ -9213,7 +9213,7 @@ const struct genl_small_ops devlink_nl_ops[56] = {
>  	{
>  		.cmd = DEVLINK_CMD_TRAP_GET,
>  		.doit = devlink_nl_cmd_trap_get_doit,
> -		.dumpit = devlink_nl_instance_iter_dump,
> +		.dumpit = devlink_nl_instance_iter_dumpit,
>  		/* can be retrieved by unprivileged users */
>  	},
>  	{
> @@ -9224,7 +9224,7 @@ const struct genl_small_ops devlink_nl_ops[56] = {
>  	{
>  		.cmd = DEVLINK_CMD_TRAP_GROUP_GET,
>  		.doit = devlink_nl_cmd_trap_group_get_doit,
> -		.dumpit = devlink_nl_instance_iter_dump,
> +		.dumpit = devlink_nl_instance_iter_dumpit,
>  		/* can be retrieved by unprivileged users */
>  	},
>  	{
> @@ -9235,7 +9235,7 @@ const struct genl_small_ops devlink_nl_ops[56] = {
>  	{
>  		.cmd = DEVLINK_CMD_TRAP_POLICER_GET,
>  		.doit = devlink_nl_cmd_trap_policer_get_doit,
> -		.dumpit = devlink_nl_instance_iter_dump,
> +		.dumpit = devlink_nl_instance_iter_dumpit,
>  		/* can be retrieved by unprivileged users */
>  	},
>  	{
> @@ -9246,7 +9246,7 @@ const struct genl_small_ops devlink_nl_ops[56] = {
>  	{
>  		.cmd = DEVLINK_CMD_SELFTESTS_GET,
>  		.doit = devlink_nl_cmd_selftests_get_doit,
> -		.dumpit = devlink_nl_instance_iter_dump,
> +		.dumpit = devlink_nl_instance_iter_dumpit,
>  		/* can be retrieved by unprivileged users */
>  	},
>  	{
> diff --git a/net/devlink/netlink.c b/net/devlink/netlink.c
> index 3f44633af01c..11666edf5cd2 100644
> --- a/net/devlink/netlink.c
> +++ b/net/devlink/netlink.c
> @@ -196,8 +196,8 @@ static const struct devlink_gen_cmd *devl_gen_cmds[] = {
>  	[DEVLINK_CMD_SELFTESTS_GET]	= &devl_gen_selftests,
>  };
>  
> -int devlink_nl_instance_iter_dump(struct sk_buff *msg,
> -				  struct netlink_callback *cb)
> +int devlink_nl_instance_iter_dumpit(struct sk_buff *msg,
> +				    struct netlink_callback *cb)
>  {
>  	const struct genl_dumpit_info *info = genl_dumpit_info(cb);
>  	struct devlink_nl_dump_state *state = devlink_dump_state(cb);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ