From mboxrd@z Thu Jan 1 00:00:00 1970 From: roopa Subject: Re: [PATCH net-next 6/8] iproute2: Add support for the RTA_VIA attribute Date: Tue, 07 Apr 2015 07:55:39 -0700 Message-ID: <5523EFEB.1030205@cumulusnetworks.com> References: <87bnjwspek.fsf@x220.int.ebiederm.org> <20150315123337.2694183a@urahara> <87lhiyoxnw.fsf@x220.int.ebiederm.org> <87bnjuoxe8.fsf_-_@x220.int.ebiederm.org> <87d24animx.fsf_-_@x220.int.ebiederm.org> <552310E6.5060503@cumulusnetworks.com> <20150406232713.GR1051@gospo> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Eric W. Biederman" , Stephen Hemminger , "netdev@vger.kernel.org" , Vivek Venkatraman , rshearma@brocade.com To: Andy Gospodarek Return-path: Received: from mail-pa0-f48.google.com ([209.85.220.48]:34789 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752710AbbDGOzl (ORCPT ); Tue, 7 Apr 2015 10:55:41 -0400 Received: by pacyx8 with SMTP id yx8so80950165pac.1 for ; Tue, 07 Apr 2015 07:55:40 -0700 (PDT) In-Reply-To: <20150406232713.GR1051@gospo> Sender: netdev-owner@vger.kernel.org List-ID: On 4/6/15, 4:27 PM, Andy Gospodarek wrote: > On Mon, Apr 06, 2015 at 04:04:06PM -0700, roopa wrote: >> On 3/15/15, 12:52 PM, Eric W. Biederman wrote: >>> Add support for the RTA_VIA attribute that specifies an address family >>> as well as an address for the next hop gateway. >>> >>> To make it easy to pass this reorder inet_prefix so that it's tail >>> is a proper RTA_VIA attribute. >>> >>> Signed-off-by: "Eric W. Biederman" >>> --- >>> include/linux/rtnetlink.h | 7 +++++ >>> include/utils.h | 7 +++-- >>> ip/iproute.c | 76 +++++++++++++++++++++++++++++++++++++++++------ >>> man/man8/ip-route.8.in | 18 +++++++---- >>> 4 files changed, 90 insertions(+), 18 deletions(-) >>> >>> diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h >>> index 3eb78105399b..03e4c8df8e60 100644 >>> --- a/include/linux/rtnetlink.h >>> +++ b/include/linux/rtnetlink.h >>> @@ -303,6 +303,7 @@ enum rtattr_type_t { >>> RTA_TABLE, >>> RTA_MARK, >>> RTA_MFC_STATS, >>> + RTA_VIA, >> eric, if its not too late, what do you think about renaming RTA_VIA >> attribute to >> RTA_NEWGATEWAY (similar to your new RTA_NEWDST attribute to specify a label >> dst) ?. RTA_VIA is fine too. >> This is indeed a new way to specify a gateway (and can/will be used by RFC >> 5549 in the future). >> >> If there is interest in renaming it to RTA_NEWGATEWAY (or any other name, >> cant think of anything better right now), >> I will be happy to submit a follow-on patch. > FWIW, I actually do not mind the name RTA_VIA. I was planning to > replace use of RTA_GATEWAY in iproute2 and just usa RTA_VIA for all > nexthops regardless of the address family of the dest route or nexthop > and would allow easy creation of the infrastructure needed to support > RFC5549 -- obviously while keeping backwards compatibility in the > kernel. ok, good to know. > > This was what my orignal set did (not submitted to netdev, but discussed > with others at netconf) and it was much cleaner code-wise (but not ideal > as I overloaded the use of RTA_GATEWAY and that was not pleasing to me > or others). ok, yeah i remember you had RTA_GATEWAY6 or something like that. just to clarify, i was not suggesting overloading. eric introduced cleaner abstracted attributes for RTA_DST and RTA_GATEWAY. One is called RTA_NEWDST and I was thinking if changing RTA_GATEWAY to RTA_NEWGATEWAY would be less confusing (because, the rest of the structures (ipv4/ipv6) where you will put the RTA_VIA information is still called gw). No worries, RTA_VIA can stay if more people prefer that. Thanks!.