public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: roopa <roopa@cumulusnetworks•com>
To: "Eric W. Biederman" <ebiederm@xmission•com>
Cc: Andy Gospodarek <gospo@cumulusnetworks•com>,
	Stephen Hemminger <shemming@brocade•com>,
	"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
	Vivek Venkatraman <vivek@cumulusnetworks•com>,
	rshearma@brocade•com
Subject: Re: [PATCH net-next 6/8] iproute2: Add support for the RTA_VIA attribute
Date: Tue, 07 Apr 2015 11:15:04 -0700	[thread overview]
Message-ID: <55241EA8.9000909@cumulusnetworks.com> (raw)
In-Reply-To: <87pp7for7v.fsf@x220.int.ebiederm.org>

On 4/7/15, 9:09 AM, Eric W. Biederman wrote:
> roopa <roopa@cumulusnetworks•com> writes:
>
>> 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" <ebiederm@xmission•com>
>>>>> ---
>>>>>    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.
> To answer the original question.  The new in RTA_NEWDST is not new as in
> a new attribute it is new as in replace the destination address with a
> new destination address.  NAT in other words.  Which is how mpls routing
> works.  Each hop NATs the address before sending the packet on.
thanks for the clarifying this.
>
>>> 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.
> As long as the number and the semantics don't change I don't much care.
>
> However I think via is probably what we should have called the concept
> and the field in the first place, and certainly there are corner cases
> where the machine where we are going via is not actually a gateway but
> the final destination, when you are talking about multiple protocols.
agreed.

>
> Regardless the name RTA_VIA is my best attempt in that direction.
ack
>
> All of my added support in iproute2 should work for RFC5549.  As well as
> for mpls.
>
>
agreed.

and thanks.

  parent reply	other threads:[~2015-04-07 18:15 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-13 18:50 [PATCH net-next] iproute2: MPLS support Eric W. Biederman
2015-03-13 18:52 ` [PATCH net-next 1/8] iproute2: Add a source addres length parameter to rt_addr_n2a Eric W. Biederman
2015-03-13 18:52 ` [PATCH net-next 2/8] iproute2: Make the addr argument of ll_addr_n2a const Eric W. Biederman
2015-03-13 18:54 ` [PATCH net-next 3/8] iproute2: Add support for printing AF_PACKET addresses Eric W. Biederman
2015-03-13 18:55 ` [PATCH net-next 4/8] iproute2: Add address family to/from string helper functions Eric W. Biederman
2015-03-13 18:56 ` [PATCH net-next 5/8] iproute2: misc whitespace cleanup Eric W. Biederman
2015-03-13 18:57 ` [PATCH net-next 6/8] iproute2: Add support for RTA_VIA attributes Eric W. Biederman
2015-03-13 18:58 ` [PATCH net-next 7/8] iproute2: Add support for the RTA_NEWDST attribute Eric W. Biederman
2015-03-13 18:59 ` [PATCH net-next 8/8] iproute2: Add basic mpls support to iproute Eric W. Biederman
     [not found] ` <c3ad7d77783046d38e5b23b5e1fe0f71@BRMWP-EXMB11.corp.brocade.com>
2015-03-15 19:33   ` [PATCH net-next 1/8] iproute2: Add a source addres length parameter to rt_addr_n2a Stephen Hemminger
2015-03-15 19:42     ` Eric W. Biederman
2015-03-15 19:47       ` [PATCH net-next 0/8] iproute2: MPLS support (now with af_bit_len) Eric W. Biederman
2015-03-15 19:48         ` [PATCH net-next 1/8] iproute2: Add a source addres length parameter to rt_addr_n2a Eric W. Biederman
2015-03-15 19:49         ` [PATCH net-next 2/8] iproute2: Make the addr argument of ll_addr_n2a const Eric W. Biederman
2015-03-15 19:49         ` [PATCH net-next 3/8] iproute2: Add support for printing AF_PACKET addresses Eric W. Biederman
2015-03-15 19:50         ` [PATCH net-next 4/8] iproute2: Add address family to/from string helper functions Eric W. Biederman
2015-03-15 19:51         ` [PATCH net-next 5/8] iproute2: misc whitespace cleanup Eric W. Biederman
2015-03-15 19:52         ` [PATCH net-next 6/8] iproute2: Add support for the RTA_VIA attribute Eric W. Biederman
2015-04-06 23:04           ` roopa
2015-04-06 23:27             ` Andy Gospodarek
2015-04-07 14:55               ` roopa
2015-04-07 16:09                 ` Eric W. Biederman
2015-04-07 16:58                   ` Vivek Venkatraman
2015-04-07 19:38                     ` Eric W. Biederman
2015-04-07 21:12                       ` Vivek Venkatraman
2015-04-07 18:15                   ` roopa [this message]
2015-03-15 19:53         ` [PATCH net-next 7/8] iproute2: Add support for the RTA_NEWDST attribute Eric W. Biederman
2015-03-15 19:53         ` [PATCH net-next 8/8] iproute2: Add basic mpls support to iproute Eric W. Biederman
2015-03-24 22:36 ` [PATCH net-next] iproute2: MPLS support Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55241EA8.9000909@cumulusnetworks.com \
    --to=roopa@cumulusnetworks$(echo .)com \
    --cc=ebiederm@xmission$(echo .)com \
    --cc=gospo@cumulusnetworks$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=rshearma@brocade$(echo .)com \
    --cc=shemming@brocade$(echo .)com \
    --cc=vivek@cumulusnetworks$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox