]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ipv4: Drop leaf from suffix pull/push functions
authorAlexander Duyck <alexander.h.duyck@intel.com>
Thu, 1 Dec 2016 12:27:52 +0000 (07:27 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 10 Dec 2016 18:09:42 +0000 (19:09 +0100)
commit0b1c601d367f7316470bcad95fcb8185ac53111a
tree5d5652e071b7eda8a9d3abe02d0d17c3292573a5
parentcd8a6c0e95bf59003c131f442e7eafded396627e
ipv4: Drop leaf from suffix pull/push functions

[ Upstream commit 1a239173cccff726b60ac6a9c79ae4a1e26cfa49 ]

It wasn't necessary to pass a leaf in when doing the suffix updates so just
drop it.  Instead just pass the suffix and work with that.

Since we dropped the leaf there is no need to include that in the name so
the names are updated to node_push_suffix and node_pull_suffix.

Finally I noticed that the logic for pulling the suffix length back
actually had some issues.  Specifically it would stop prematurely if there
was a longer suffix, but it was not as long as the original suffix.  I
updated the code to address that in node_pull_suffix.

Fixes: 5405afd1a306 ("fib_trie: Add tracking value for suffix length")
Suggested-by: Robert Shearman <rshearma@brocade.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Reviewed-by: Robert Shearman <rshearma@brocade.com>
Tested-by: Robert Shearman <rshearma@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/fib_trie.c