From mboxrd@z Thu Jan 1 00:00:00 1970 From: Serhey Popovych Subject: Re: [PATCH iproute2 1/3] vxcan,veth: Forbid "type" for peer device Date: Thu, 28 Dec 2017 12:54:54 +0200 Message-ID: References: <1513755451-9800-1-git-send-email-serhe.popovych@gmail.com> <1513755451-9800-2-git-send-email-serhe.popovych@gmail.com> <20171226090535.51ac43ef@xeon-e3> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5akZ1YkQXBA1VY5oBbyOHcEN1gq2vJkr9" Cc: netdev@vger.kernel.org To: Stephen Hemminger Return-path: Received: from mail-lf0-f54.google.com ([209.85.215.54]:32961 "EHLO mail-lf0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752905AbdL1KzE (ORCPT ); Thu, 28 Dec 2017 05:55:04 -0500 Received: by mail-lf0-f54.google.com with SMTP id b195so4427167lfg.0 for ; Thu, 28 Dec 2017 02:55:03 -0800 (PST) In-Reply-To: <20171226090535.51ac43ef@xeon-e3> Sender: netdev-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --5akZ1YkQXBA1VY5oBbyOHcEN1gq2vJkr9 Content-Type: multipart/mixed; boundary="egXN9218qftUnd9jPWr10njR1iTkgJpFJ"; protected-headers="v1" From: Serhey Popovych To: Stephen Hemminger Cc: netdev@vger.kernel.org Message-ID: Subject: Re: [PATCH iproute2 1/3] vxcan,veth: Forbid "type" for peer device References: <1513755451-9800-1-git-send-email-serhe.popovych@gmail.com> <1513755451-9800-2-git-send-email-serhe.popovych@gmail.com> <20171226090535.51ac43ef@xeon-e3> In-Reply-To: <20171226090535.51ac43ef@xeon-e3> --egXN9218qftUnd9jPWr10njR1iTkgJpFJ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Stephen Hemminger wrote: > On Wed, 20 Dec 2017 09:37:29 +0200 > Serhey Popovych wrote: >=20 >> It is already given for original device we configure this >> peer for. >> >> Results from following command before/after change applied >> are shown below: >> >> $ ip link add dev veth1a type veth peer name veth1b \ >> type veth peer name veth1c >> >> Before: >> ------- >> >> >> >> After: >> ------ >> >> Error: argument "type" is wrong: not supported for peer >> >> Signed-off-by: Serhey Popovych >=20 > This makes a lot of sense. > Maybe the better error message would be to use duparg() since > that is the most likely cause of the user error. Not sure Stephen. With duparg() I get following error message for test case described in above. Error: duplicate "type": "veth" is the second value. It looks good for me, but we have two "type veth" in command and which one is wrong might not be very clear to user. Anyway I send v2 for this particular change to get and option to pick the best one. Thanks. >=20 --egXN9218qftUnd9jPWr10njR1iTkgJpFJ-- --5akZ1YkQXBA1VY5oBbyOHcEN1gq2vJkr9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQEcBAEBAgAGBQJaRM2DAAoJEBTawMmQ61bBz6gH/10JfbTgg4V7Hh1ASSw+FjgG wcJNfj/1xsFd5x3NiMipNfMiVnQDP+1OQyGefvvJJ6nu9/jrxhHt0pHzFgypcYM1 KoHNftyPbBSqwgbaz10+yEnS/bDRJ/wSXrMobMxRPMonL6e1d9Fu5vj+H1QgJvg4 H2UmCzBFGfneEMT9epOU6EhnXWwU2qWvSCFMwYJlx/JLg2RGiTTVN+QAvA0dXpWL Cz7CBwP1LmoV2vclXpEFktMDByhuqTrglhwMMcVeC/6XqynhTuF4Qcdzz0jz/IDy UxiFj668R972fbOev2uUw8q7WVyweVKsWR3HQAQ3RKe6IY/Q/Kt0rJ0sulMiFro= =BEPg -----END PGP SIGNATURE----- --5akZ1YkQXBA1VY5oBbyOHcEN1gq2vJkr9--