All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2] Revert "ip: check for missing dev arg when doing VF rate"
@ 2014-09-05  9:37 Nicolas Dichtel
  2014-09-05 10:00 ` [PATCH v2 iproute2] ip link: restore backward compatibility with 'ip link add ifname' Nicolas Dichtel
  2014-09-05 10:11 ` [PATCH iproute2] Revert "ip: check for missing dev arg when doing VF rate" Vadim Kochan
  0 siblings, 2 replies; 4+ messages in thread
From: Nicolas Dichtel @ 2014-09-05  9:37 UTC (permalink / raw)
  To: shemminger; +Cc: netdev, Nicolas Dichtel

This reverts commit 9a02651a87d0fd56e2e7eedd63921a050a42b3ec.

This commit breaks backward compatibility. Before the commit, this kind of
command was allowed:
ip link add myiface type ...
Now, it returns an error, we should add the arg 'name':
ip link add name myiface type ...

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 ip/iplink.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/ip/iplink.c b/ip/iplink.c
index 1a907d998a87..bbcdc83d4c91 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -349,7 +349,6 @@ static int iplink_parse_vf(int vf, int *argcp, char ***argvp,
 
 	if (new_rate_api) {
 		int tmin, tmax;
-
 		if (tivt.min_tx_rate == -1 || tivt.max_tx_rate == -1) {
 			ipaddr_get_vf_rate(tivt.vf, &tmin, &tmax, dev_index);
 			if (tivt.min_tx_rate == -1)
@@ -382,7 +381,7 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
 	int vf = -1;
 	int numtxqueues = -1;
 	int numrxqueues = -1;
-	int dev_index = 0;
+	int dev_index;
 
 	*group = -1;
 	ret = argc;
@@ -495,9 +494,6 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
 			}
 			vflist = addattr_nest(&req->n, sizeof(*req),
 					      IFLA_VFINFO_LIST);
-			if (dev_index == 0)
-				missarg("dev");
-
 			len = iplink_parse_vf(vf, &argc, &argv, req, dev_index);
 			if (len < 0)
 				return -1;
@@ -593,8 +589,6 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
 				duparg2("dev", *argv);
 			*dev = *argv;
 			dev_index = ll_name_to_index(*dev);
-			if (dev_index == 0)
-				invarg("Unknown device", *argv);
 		}
 		argc--; argv++;
 	}
-- 
1.9.0

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

* [PATCH v2 iproute2] ip link: restore backward compatibility with 'ip link add ifname'
  2014-09-05  9:37 [PATCH iproute2] Revert "ip: check for missing dev arg when doing VF rate" Nicolas Dichtel
@ 2014-09-05 10:00 ` Nicolas Dichtel
  2014-09-05 10:11 ` [PATCH iproute2] Revert "ip: check for missing dev arg when doing VF rate" Vadim Kochan
  1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Dichtel @ 2014-09-05 10:00 UTC (permalink / raw)
  To: shemminger; +Cc: netdev, Nicolas Dichtel

Commit 9a02651a87d0 ("ip: check for missing dev arg when doing VF rate"),
breaks backward compatibility. Before the commit, this kind of
command was allowed:
ip link add myiface type ...
Now, it returns an error, we should add the arg 'name':
ip link add name myiface type ...

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 ip/iplink.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/ip/iplink.c b/ip/iplink.c
index 1a907d998a87..ea06871b7c81 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -593,8 +593,6 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
 				duparg2("dev", *argv);
 			*dev = *argv;
 			dev_index = ll_name_to_index(*dev);
-			if (dev_index == 0)
-				invarg("Unknown device", *argv);
 		}
 		argc--; argv++;
 	}
-- 
1.9.0

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

* Re: [PATCH iproute2] Revert "ip: check for missing dev arg when doing VF rate"
  2014-09-05  9:37 [PATCH iproute2] Revert "ip: check for missing dev arg when doing VF rate" Nicolas Dichtel
  2014-09-05 10:00 ` [PATCH v2 iproute2] ip link: restore backward compatibility with 'ip link add ifname' Nicolas Dichtel
@ 2014-09-05 10:11 ` Vadim Kochan
  2014-09-05 11:45   ` Nicolas Dichtel
  1 sibling, 1 reply; 4+ messages in thread
From: Vadim Kochan @ 2014-09-05 10:11 UTC (permalink / raw)
  To: Nicolas Dichtel; +Cc: shemminger, netdev

Was it not fixed by f1b66ff83a0 in master branch ?

On Fri, Sep 5, 2014 at 12:37 PM, Nicolas Dichtel
<nicolas.dichtel@6wind.com> wrote:
> This reverts commit 9a02651a87d0fd56e2e7eedd63921a050a42b3ec.
>
> This commit breaks backward compatibility. Before the commit, this kind of
> command was allowed:
> ip link add myiface type ...
> Now, it returns an error, we should add the arg 'name':
> ip link add name myiface type ...
>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
>  ip/iplink.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/ip/iplink.c b/ip/iplink.c
> index 1a907d998a87..bbcdc83d4c91 100644
> --- a/ip/iplink.c
> +++ b/ip/iplink.c
> @@ -349,7 +349,6 @@ static int iplink_parse_vf(int vf, int *argcp, char ***argvp,
>
>         if (new_rate_api) {
>                 int tmin, tmax;
> -
>                 if (tivt.min_tx_rate == -1 || tivt.max_tx_rate == -1) {
>                         ipaddr_get_vf_rate(tivt.vf, &tmin, &tmax, dev_index);
>                         if (tivt.min_tx_rate == -1)
> @@ -382,7 +381,7 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
>         int vf = -1;
>         int numtxqueues = -1;
>         int numrxqueues = -1;
> -       int dev_index = 0;
> +       int dev_index;
>
>         *group = -1;
>         ret = argc;
> @@ -495,9 +494,6 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
>                         }
>                         vflist = addattr_nest(&req->n, sizeof(*req),
>                                               IFLA_VFINFO_LIST);
> -                       if (dev_index == 0)
> -                               missarg("dev");
> -
>                         len = iplink_parse_vf(vf, &argc, &argv, req, dev_index);
>                         if (len < 0)
>                                 return -1;
> @@ -593,8 +589,6 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
>                                 duparg2("dev", *argv);
>                         *dev = *argv;
>                         dev_index = ll_name_to_index(*dev);
> -                       if (dev_index == 0)
> -                               invarg("Unknown device", *argv);
>                 }
>                 argc--; argv++;
>         }
> --
> 1.9.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH iproute2] Revert "ip: check for missing dev arg when doing VF rate"
  2014-09-05 10:11 ` [PATCH iproute2] Revert "ip: check for missing dev arg when doing VF rate" Vadim Kochan
@ 2014-09-05 11:45   ` Nicolas Dichtel
  0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Dichtel @ 2014-09-05 11:45 UTC (permalink / raw)
  To: Vadim Kochan; +Cc: shemminger, netdev

Le 05/09/2014 12:11, Vadim Kochan a écrit :
> Was it not fixed by f1b66ff83a0 in master branch ?
You're right. I've missed it, sorry for the noise.


Regards,
Nicolas

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

end of thread, other threads:[~2014-09-05 11:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-05  9:37 [PATCH iproute2] Revert "ip: check for missing dev arg when doing VF rate" Nicolas Dichtel
2014-09-05 10:00 ` [PATCH v2 iproute2] ip link: restore backward compatibility with 'ip link add ifname' Nicolas Dichtel
2014-09-05 10:11 ` [PATCH iproute2] Revert "ip: check for missing dev arg when doing VF rate" Vadim Kochan
2014-09-05 11:45   ` Nicolas Dichtel

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.