All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch iproute2/net-next] devlink: use DEVLINK_CMD_ESWITCH_* instead of DEVLINK_CMD_ESWITCH_MODE_*
@ 2017-02-19 14:37 Jiri Pirko
  2017-02-19 19:57 ` Stephen Hemminger
  2017-02-19 20:01 ` Stephen Hemminger
  0 siblings, 2 replies; 4+ messages in thread
From: Jiri Pirko @ 2017-02-19 14:37 UTC (permalink / raw)
  To: netdev; +Cc: stephen, ogerlitz, mlxsw

From: Jiri Pirko <jiri@mellanox.com>

Sync with kernel and don't use the obsolete enum values.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
 devlink/devlink.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/devlink/devlink.c b/devlink/devlink.c
index 34a409f..c357580 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -1303,7 +1303,7 @@ static int cmd_dev_eswitch_show(struct dl *dl)
 	struct nlmsghdr *nlh;
 	int err;
 
-	nlh = mnlg_msg_prepare(dl->nlg, DEVLINK_CMD_ESWITCH_MODE_GET,
+	nlh = mnlg_msg_prepare(dl->nlg, DEVLINK_CMD_ESWITCH_GET,
 			       NLM_F_REQUEST | NLM_F_ACK);
 
 	err = dl_argv_parse_put(nlh, dl, DL_OPT_HANDLE, 0);
@@ -1321,7 +1321,7 @@ static int cmd_dev_eswitch_set(struct dl *dl)
 	struct nlmsghdr *nlh;
 	int err;
 
-	nlh = mnlg_msg_prepare(dl->nlg, DEVLINK_CMD_ESWITCH_MODE_SET,
+	nlh = mnlg_msg_prepare(dl->nlg, DEVLINK_CMD_ESWITCH_SET,
 			       NLM_F_REQUEST | NLM_F_ACK);
 
 	err = dl_argv_parse_put(nlh, dl, DL_OPT_HANDLE,
-- 
2.7.4

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

* Re: [patch iproute2/net-next] devlink: use DEVLINK_CMD_ESWITCH_* instead of DEVLINK_CMD_ESWITCH_MODE_*
  2017-02-19 14:37 [patch iproute2/net-next] devlink: use DEVLINK_CMD_ESWITCH_* instead of DEVLINK_CMD_ESWITCH_MODE_* Jiri Pirko
@ 2017-02-19 19:57 ` Stephen Hemminger
  2017-02-19 20:01 ` Stephen Hemminger
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2017-02-19 19:57 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: netdev, ogerlitz, mlxsw

On Sun, 19 Feb 2017 15:37:06 +0100
Jiri Pirko <jiri@resnulli.us> wrote:

> From: Jiri Pirko <jiri@mellanox.com>
> 
> Sync with kernel and don't use the obsolete enum values.
> 
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
> ---
>  devlink/devlink.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/devlink/devlink.c b/devlink/devlink.c
> index 34a409f..c357580 100644
> --- a/devlink/devlink.c
> +++ b/devlink/devlink.c
> @@ -1303,7 +1303,7 @@ static int cmd_dev_eswitch_show(struct dl *dl)
>  	struct nlmsghdr *nlh;
>  	int err;
>  
> -	nlh = mnlg_msg_prepare(dl->nlg, DEVLINK_CMD_ESWITCH_MODE_GET,
> +	nlh = mnlg_msg_prepare(dl->nlg, DEVLINK_CMD_ESWITCH_GET,
>  			       NLM_F_REQUEST | NLM_F_ACK);
>  
>  	err = dl_argv_parse_put(nlh, dl, DL_OPT_HANDLE, 0);
> @@ -1321,7 +1321,7 @@ static int cmd_dev_eswitch_set(struct dl *dl)
>  	struct nlmsghdr *nlh;
>  	int err;
>  
> -	nlh = mnlg_msg_prepare(dl->nlg, DEVLINK_CMD_ESWITCH_MODE_SET,
> +	nlh = mnlg_msg_prepare(dl->nlg, DEVLINK_CMD_ESWITCH_SET,
>  			       NLM_F_REQUEST | NLM_F_ACK);
>  
>  	err = dl_argv_parse_put(nlh, dl, DL_OPT_HANDLE,

I think you need go go back and reconsider the ABI change.
This patch would cause the net-next version of iproute2 devlink to not
work with older kernels.

The iproute2 toolset relies on the kernel ABI guarantees so that later
versions of iproute2 still interoperate with older kernels. It is possible
that new features get added but the old functionality will always work.

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

* Re: [patch iproute2/net-next] devlink: use DEVLINK_CMD_ESWITCH_* instead of DEVLINK_CMD_ESWITCH_MODE_*
  2017-02-19 14:37 [patch iproute2/net-next] devlink: use DEVLINK_CMD_ESWITCH_* instead of DEVLINK_CMD_ESWITCH_MODE_* Jiri Pirko
  2017-02-19 19:57 ` Stephen Hemminger
@ 2017-02-19 20:01 ` Stephen Hemminger
  2017-02-19 20:59   ` Jiri Pirko
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2017-02-19 20:01 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: netdev, ogerlitz, mlxsw

On Sun, 19 Feb 2017 15:37:06 +0100
Jiri Pirko <jiri@resnulli.us> wrote:

> From: Jiri Pirko <jiri@mellanox.com>
> 
> Sync with kernel and don't use the obsolete enum values.
> 
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
> ---
>  devlink/devlink.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/devlink/devlink.c b/devlink/devlink.c
> index 34a409f..c357580 100644
> --- a/devlink/devlink.c
> +++ b/devlink/devlink.c
> @@ -1303,7 +1303,7 @@ static int cmd_dev_eswitch_show(struct dl *dl)
>  	struct nlmsghdr *nlh;
>  	int err;
>  
> -	nlh = mnlg_msg_prepare(dl->nlg, DEVLINK_CMD_ESWITCH_MODE_GET,
> +	nlh = mnlg_msg_prepare(dl->nlg, DEVLINK_CMD_ESWITCH_GET,
>  			       NLM_F_REQUEST | NLM_F_ACK);
>  
>  	err = dl_argv_parse_put(nlh, dl, DL_OPT_HANDLE, 0);
> @@ -1321,7 +1321,7 @@ static int cmd_dev_eswitch_set(struct dl *dl)
>  	struct nlmsghdr *nlh;
>  	int err;
>  
> -	nlh = mnlg_msg_prepare(dl->nlg, DEVLINK_CMD_ESWITCH_MODE_SET,
> +	nlh = mnlg_msg_prepare(dl->nlg, DEVLINK_CMD_ESWITCH_SET,
>  			       NLM_F_REQUEST | NLM_F_ACK);
>  
>  	err = dl_argv_parse_put(nlh, dl, DL_OPT_HANDLE,

I went back and looked at the original commit.
    devlink: fix the name of eswitch commands
OK, so you only changed the name, not the value so it would be binary
compatible.

Applied.

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

* Re: [patch iproute2/net-next] devlink: use DEVLINK_CMD_ESWITCH_* instead of DEVLINK_CMD_ESWITCH_MODE_*
  2017-02-19 20:01 ` Stephen Hemminger
@ 2017-02-19 20:59   ` Jiri Pirko
  0 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2017-02-19 20:59 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, ogerlitz, mlxsw

Sun, Feb 19, 2017 at 09:01:15PM CET, stephen@networkplumber.org wrote:
>On Sun, 19 Feb 2017 15:37:06 +0100
>Jiri Pirko <jiri@resnulli.us> wrote:
>
>> From: Jiri Pirko <jiri@mellanox.com>
>> 
>> Sync with kernel and don't use the obsolete enum values.
>> 
>> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
>> ---
>>  devlink/devlink.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/devlink/devlink.c b/devlink/devlink.c
>> index 34a409f..c357580 100644
>> --- a/devlink/devlink.c
>> +++ b/devlink/devlink.c
>> @@ -1303,7 +1303,7 @@ static int cmd_dev_eswitch_show(struct dl *dl)
>>  	struct nlmsghdr *nlh;
>>  	int err;
>>  
>> -	nlh = mnlg_msg_prepare(dl->nlg, DEVLINK_CMD_ESWITCH_MODE_GET,
>> +	nlh = mnlg_msg_prepare(dl->nlg, DEVLINK_CMD_ESWITCH_GET,
>>  			       NLM_F_REQUEST | NLM_F_ACK);
>>  
>>  	err = dl_argv_parse_put(nlh, dl, DL_OPT_HANDLE, 0);
>> @@ -1321,7 +1321,7 @@ static int cmd_dev_eswitch_set(struct dl *dl)
>>  	struct nlmsghdr *nlh;
>>  	int err;
>>  
>> -	nlh = mnlg_msg_prepare(dl->nlg, DEVLINK_CMD_ESWITCH_MODE_SET,
>> +	nlh = mnlg_msg_prepare(dl->nlg, DEVLINK_CMD_ESWITCH_SET,
>>  			       NLM_F_REQUEST | NLM_F_ACK);
>>  
>>  	err = dl_argv_parse_put(nlh, dl, DL_OPT_HANDLE,
>
>I went back and looked at the original commit.
>    devlink: fix the name of eswitch commands
>OK, so you only changed the name, not the value so it would be binary
>compatible.

Yep.

>
>Applied.

Thanks.

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

end of thread, other threads:[~2017-02-19 21:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-19 14:37 [patch iproute2/net-next] devlink: use DEVLINK_CMD_ESWITCH_* instead of DEVLINK_CMD_ESWITCH_MODE_* Jiri Pirko
2017-02-19 19:57 ` Stephen Hemminger
2017-02-19 20:01 ` Stephen Hemminger
2017-02-19 20:59   ` Jiri Pirko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.