[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3ff0a823-4a41-14a0-bc34-7c19eb0103cd@cumulusnetworks.com>
Date: Sat, 18 Nov 2017 12:06:54 -0700
From: David Ahern <dsa@...ulusnetworks.com>
To: Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org
Cc: davem@...emloft.net, mlxsw@...lanox.com, andrew@...n.ch,
vivien.didelot@...oirfairelinux.com, f.fainelli@...il.com,
michael.chan@...adcom.com, ganeshgr@...lsio.com,
saeedm@...lanox.com, matanb@...lanox.com, leonro@...lanox.com,
idosch@...lanox.com, jakub.kicinski@...ronome.com, ast@...nel.org,
daniel@...earbox.net, simon.horman@...ronome.com,
pieter.jansenvanvuuren@...ronome.com, john.hurley@...ronome.com,
alexander.h.duyck@...el.com, linville@...driver.com,
gospo@...adcom.com, steven.lin1@...adcom.com, yuvalm@...lanox.com,
ogerlitz@...lanox.com, roopa@...ulusnetworks.com
Subject: Re: [patch net-next RFC v2 04/11] devlink: Add relation between dpipe
and resource
On 11/14/17 9:18 AM, Jiri Pirko wrote:
> @@ -192,6 +194,8 @@ struct devlink_dpipe_table {
> const char *name;
> bool counters_enabled;
> bool counter_control_extern;
> + u64 resource_id;
> + bool resource_valid;
from a space perspective, please reverse the order
> struct devlink_dpipe_table_ops *table_ops;
> struct rcu_head rcu;
> };
> @@ -387,6 +391,8 @@ void devlink_resources_unregister(struct devlink *devlink,
> int devlink_resource_size_get(struct devlink *devlink,
> u64 resource_id,
> u64 *p_resource_size);
> +int devlink_dpipe_table_resource_set(struct devlink *devlink,
> + const char *table_name, u64 resource_id);
>
> #else
>
> @@ -550,6 +556,13 @@ devlink_resource_size_get(struct devlink *devlink, u64 resource_id,
> return -EINVAL;
> }
>
> +static inline int
> +devlink_dpipe_table_resource_set(struct devlink *devlink,
> + const char *table_name, u64 resource_id)
> +{
> + return -EINVAL;
It's compiled out so -EOPNOTSUPP seems more appropriate.
Powered by blists - more mailing lists