From: David Ahern <dsahern@gmail.com>
To: Ido Schimmel <idosch@mellanox.com>, netdev@vger.kernel.org
Cc: davem@davemloft.net, roopa@cumulusnetworks.com,
nikolay@cumulusnetworks.com, pch@ordbogen.com, jkbs@redhat.com,
yoshfuji@linux-ipv6.org, mlxsw@mellanox.com
Subject: Re: [PATCH net-next 4/4] ipv6: Add support for non-equal-cost multipath
Date: Tue, 9 Jan 2018 20:48:37 -0700 [thread overview]
Message-ID: <1dedd203-78ad-5290-fe27-9a8d376a991a@gmail.com> (raw)
In-Reply-To: <20180109144028.30133-5-idosch@mellanox.com>
On 1/9/18 7:40 AM, Ido Schimmel wrote:
> The use of hash-threshold instead of modulo-N makes it trivial to add
> support for non-equal-cost multipath.
>
> Instead of dividing the multipath hash function's output space equally
> between the nexthops, each nexthop is assigned a region size which is
> proportional to its weight.
>
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> ---
> include/net/ip6_fib.h | 1 +
> net/ipv6/route.c | 11 +++++++----
> 2 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
> index 97cd05d87780..34ec321d6a03 100644
> --- a/include/net/ip6_fib.h
> +++ b/include/net/ip6_fib.h
> @@ -171,6 +171,7 @@ struct rt6_info {
> u32 rt6i_metric;
> u32 rt6i_pmtu;
> /* more non-fragment space at head required */
> + int rt6i_nh_weight;
> unsigned short rt6i_nfheader_len;
> u8 rt6i_protocol;
> u8 exception_bucket_flushed:1,
Since dst is cacheline aligned there is a hole after rt6i_nh_flags. In
patch 1 you put rt6i_nh_upper_bound in that hole. Putting the weight
there too keeps those variables together as well as using the open space.
next prev parent reply other threads:[~2018-01-10 3:48 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 14:40 [PATCH net-next 0/4] ipv6: Add support for non-equal-cost multipath Ido Schimmel
2018-01-09 14:40 ` [PATCH net-next 1/4] ipv6: Calculate hash thresholds for IPv6 nexthops Ido Schimmel
2018-01-10 3:43 ` David Ahern
2018-05-02 16:43 ` Eric Dumazet
2018-05-02 17:21 ` Ido Schimmel
2018-05-02 17:52 ` Ido Schimmel
2018-05-02 18:53 ` Ido Schimmel
2018-05-02 18:58 ` David Ahern
2018-05-02 19:04 ` Ido Schimmel
2018-05-02 20:48 ` Thomas Winter
2018-05-02 20:56 ` David Ahern
2018-05-04 1:13 ` David Ahern
2018-01-09 14:40 ` [PATCH net-next 2/4] ipv6: Use a 31-bit multipath hash Ido Schimmel
2018-01-10 3:43 ` David Ahern
2018-01-09 14:40 ` [PATCH net-next 3/4] ipv6: Use hash-threshold instead of modulo-N Ido Schimmel
2018-01-10 3:54 ` David Ahern
2018-01-10 12:02 ` Ido Schimmel
2018-01-09 14:40 ` [PATCH net-next 4/4] ipv6: Add support for non-equal-cost multipath Ido Schimmel
2018-01-10 3:48 ` David Ahern [this message]
2018-01-10 11:47 ` Ido Schimmel
2018-01-10 15:53 ` David Ahern
2018-01-10 4:38 ` [PATCH net-next 0/4] " David Ahern
2018-01-10 12:31 ` Ido Schimmel
2018-01-10 20:15 ` 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=1dedd203-78ad-5290-fe27-9a8d376a991a@gmail.com \
--to=dsahern@gmail.com \
--cc=davem@davemloft.net \
--cc=idosch@mellanox.com \
--cc=jkbs@redhat.com \
--cc=mlxsw@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=pch@ordbogen.com \
--cc=roopa@cumulusnetworks.com \
--cc=yoshfuji@linux-ipv6.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).