[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20161112101233.0d0369ea@samsung9>
Date: Sat, 12 Nov 2016 10:12:33 +0300
From: Stephen Hemminger <stephen@...workplumber.org>
To: Michael Braun <michael-dev@...i-braun.de>
Cc: netdev@...r.kernel.org, projekt-wlan@....tu-ilmenau.de,
steweg@...il.com
Subject: Re: [PATCH v4] iproute2: macvlan: add "source" mode
On Thu, 27 Oct 2016 12:44:36 +0200
Michael Braun <michael-dev@...i-braun.de> wrote:
> Adjusting iproute2 utility to support new macvlan link type mode called
> "source".
>
> Example of commands that can be applied:
> ip link add link eth0 name macvlan0 type macvlan mode source
> ip link set link dev macvlan0 type macvlan macaddr add 00:11:11:11:11:11
> ip link set link dev macvlan0 type macvlan macaddr del 00:11:11:11:11:11
> ip link set link dev macvlan0 type macvlan macaddr flush
> ip -details link show dev macvlan0
>
> Based on previous work of Stefan Gula <steweg@...il.com>
>
> Signed-off-by: Michael Braun <michael-dev@...i-braun.de>
>
> Cc: steweg@...il.com
>
> v4:
> - add MACADDR_SET support
> - skip FLAG_UNICAST / FLAG_UNICAST_ALL as this is not upstream
> - fix man page
The patch looks good, but needs to be cleaned up.
Does not apply to current iproute2 git, and also has minor checkpatch issue.
--- ip/iplink_macvlan.c
+++ ip/iplink_macvlan.c
@@ -46,7 +51,14 @@ static void explain(struct link_util *lu)
static int mode_arg(const char *arg)
{
- fprintf(stderr, "Error: argument of \"mode\" must be \"private\", \"vepa\", \"bridge\" or \"passthru\", not \"%s\"\n",
+ fprintf(stderr, "Error: argument of \"mode\" must be \"private\", \"vepa\", \"bridge\", \"passthru\" or \"source\", not \"%s\"\n",
+ arg);
+ return -1;
+}
+
+static int flag_arg(const char *arg)
+{
+ fprintf(stderr, "Error: argument of \"flag\" must be \"nopromisc\" or \"null\", not \"%s\"\n",
arg);
return -1;
}
WARNING: unnecessary whitespace before a quoted newline
#59: FILE: ip/iplink_macvlan.c:35:
+ "MODE_FLAG: null | nopromisc \n"
Powered by blists - more mailing lists