netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Martin Lau <kafai@fb.com>, David Ahern <dsahern@kernel.org>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"idosch@mellanox.com" <idosch@mellanox.com>
Subject: Re: [PATCH v3 net-next 2/5] ipv4: Add fib_nh_common to fib_result
Date: Tue, 2 Apr 2019 11:18:16 -0600	[thread overview]
Message-ID: <b8610778-a933-9a48-1499-513f07a84f22@gmail.com> (raw)
In-Reply-To: <20190402171012.5p2hbd377cidkjff@kafai-mbp.dhcp.thefacebook.com>

On 4/2/19 11:10 AM, Martin Lau wrote:
>> @@ -182,11 +183,10 @@ struct fib_result_nl {
>>  	int             err;
>>  };
>>  
>> -#ifdef CONFIG_IP_ROUTE_MULTIPATH
>> -#define FIB_RES_NH(res)		((res).fi->fib_nh[(res).nh_sel])
> If nh_sel is still needed, I am likely missing something to understand why

It is part of the uapi, so I can not delete it.

> a new '*nhc' pointer is needed.  Is nhc always pointing to the "nh_sel"-ed nh,
> like the current FIB_RES_NH() does?

Right now, yes. In the future, no.

> 
> Can you explain more on the commit message:
> "Later, fib_nh can point to data with a nexthop struct."

Today:

fib_info  --> fib_nh
              fib_nh
              ...
              fib_nh

With nexthops as a separate object

fib_info --> nexthop --> fib_nh


or with a nexthop group:

fib_info --> nexthop --> nexthop --> fib_nh
                         nexthop --> fib_nh
                         ...
                         nexthop --> fib_nh

I outlined this here:
    https://www.mail-archive.com/netdev@vger.kernel.org/msg290606.html

Now, the UAPI that uses nhsel still works in the sense that it tells
which fib_nh is used for a lookup even though internally it is part of a
different struct.

  reply	other threads:[~2019-04-02 17:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02  3:02 [PATCH v3 net-next 0/5] net: More movement to fib_nh_common David Ahern
2019-04-02  3:02 ` [PATCH v3 net-next 1/5] ipv4: Update fib_table_lookup tracepoint to take common nexthop David Ahern
2019-04-02 16:01   ` Martin Lau
2019-04-02 16:03     ` David Ahern
2019-04-02 17:06       ` Martin Lau
2019-04-02 17:41         ` David Miller
2019-04-02  3:02 ` [PATCH v3 net-next 2/5] ipv4: Add fib_nh_common to fib_result David Ahern
2019-04-02 17:10   ` Martin Lau
2019-04-02 17:18     ` David Ahern [this message]
2019-04-02  3:02 ` [PATCH v3 net-next 3/5] ipv4: Refactor nexthop attributes in fib_dump_info David Ahern
2019-04-02 17:10   ` Martin Lau
2019-04-02  3:02 ` [PATCH v3 net-next 4/5] ipv4: Change fib_nexthop_info and fib_add_nexthop to take fib_nh_common David Ahern
2019-04-02 17:11   ` Martin Lau
2019-04-02  3:02 ` [PATCH v3 net-next 5/5] ipv6: Flip to fib_nexthop_info David Ahern
2019-04-02 17:13   ` Martin Lau

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=b8610778-a933-9a48-1499-513f07a84f22@gmail.com \
    --to=dsahern@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=idosch@mellanox.com \
    --cc=kafai@fb.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).