All of lore.kernel.org
 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 v4 net-next 0/5] net: More movement to fib_nh_common
Date: Wed, 3 Apr 2019 12:59:50 -0600	[thread overview]
Message-ID: <28875329-5777-f097-d627-7d1c8eafa475@gmail.com> (raw)
In-Reply-To: <20190403052654.hiv4ssxl7cxkzaao@kafai-mbp.dhcp.thefacebook.com>

On 4/2/19 11:27 PM, Martin Lau wrote:
> On Tue, Apr 02, 2019 at 02:11:53PM -0700, David Ahern wrote:
>> From: David Ahern <dsahern@gmail.com>
>>
>> Second set of three with the end goal of enabling IPv6 gateways with IPv4
>> routes.
> I am still not completely convinced on the new "*nhc" in patch 2 without
> seeing a patch showing why nh_sel is not enough.

fib_table_lookup and fib_select_path have determined the address of the
preferred fib_nh struct. To look it up again will get costly for nexthop
groups: dereference the nexthop pointer, see that it is a group, get the
pointer to the group data, find the Nth (nh_sel) entry and return it.
Since we already have the end pointer, avoid repeated lookups which
nh_sel requires and save the fib_nh to fib_result. That's what patch 2
is doing and the updated commit message shows that.

  reply	other threads:[~2019-04-03 18:59 UTC|newest]

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

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=28875329-5777-f097-d627-7d1c8eafa475@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.