Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1507033
| From | Jakub Sitnicki <jkbs@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH net-next 1/5] ipv6: Fold rt6_info_hash_nhsfn() into its only caller |
| Date | 2016-10-24 11:40 +0200 |
| Message-ID | <svJTz-5GY-7@gated-at.bofh.it> (permalink) |
| References | <svJJT-5DE-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Commit 644d0e656958 ("ipv6 Use get_hash_from_flowi6 for rt6 hash") has
turned rt6_info_hash_nhsfn() into a one-liner, so it no longer makes
sense to keep it around.
Also the accompanying documentation comment has become outdated, so just
remove it altogether.
Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
net/ipv6/route.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index bdbc38e..0514b35 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -425,16 +425,6 @@ static bool rt6_check_expired(const struct rt6_info *rt)
return false;
}
-/* Multipath route selection:
- * Hash based function using packet header and flowlabel.
- * Adapted from fib_info_hashfn()
- */
-static int rt6_info_hash_nhsfn(unsigned int candidate_count,
- const struct flowi6 *fl6)
-{
- return get_hash_from_flowi6(fl6) % candidate_count;
-}
-
static struct rt6_info *rt6_multipath_select(struct rt6_info *match,
struct flowi6 *fl6, int oif,
int strict)
@@ -442,7 +432,7 @@ static struct rt6_info *rt6_multipath_select(struct rt6_info *match,
struct rt6_info *sibling, *next_sibling;
int route_choosen;
- route_choosen = rt6_info_hash_nhsfn(match->rt6i_nsiblings + 1, fl6);
+ route_choosen = get_hash_from_flowi6(fl6) % (match->rt6i_nsiblings + 1);
/* Don't change the route, if route_choosen == 0
* (siblings does not include ourself)
*/
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH net-next 0/5] Route ICMPv6 errors with the flow when ECMP in use Jakub Sitnicki <jkbs@redhat.com> - 2016-10-24 11:30 +0200
[PATCH net-next 3/5] ipv6: Use multipath hash from flow info if available Jakub Sitnicki <jkbs@redhat.com> - 2016-10-24 11:30 +0200
Re: [PATCH net-next 3/5] ipv6: Use multipath hash from flow info if available Hannes Frederic Sowa <hannes@stressinduktion.org> - 2016-10-24 11:50 +0200
[PATCH net-next 2/5] net: Extend struct flowi6 with multipath hash Jakub Sitnicki <jkbs@redhat.com> - 2016-10-24 11:30 +0200
Re: [PATCH net-next 2/5] net: Extend struct flowi6 with multipath hash Hannes Frederic Sowa <hannes@stressinduktion.org> - 2016-10-24 11:40 +0200
[PATCH net-next 1/5] ipv6: Fold rt6_info_hash_nhsfn() into its only caller Jakub Sitnicki <jkbs@redhat.com> - 2016-10-24 11:40 +0200
csiph-web