summaryrefslogtreecommitdiffstats
path: root/net/can
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@redhat.com>2015-01-22 15:51:26 -0800
committerDavid S. Miller <davem@davemloft.net>2015-01-25 14:47:16 -0800
commit95f60ea3e99aef5967d1566979f4ade7be386e34 (patch)
treee4e0bf113455421a25f11275f25a9bf0dda2aae8 /net/can
parenta80e89d4c650a7c3ab74f0b2d133cc2ce9738994 (diff)
downloadlinux-95f60ea3e99aef5967d1566979f4ade7be386e34.tar.bz2
fib_trie: Add collapse() and should_collapse() to resize
This patch really does two things. First it pulls the logic for determining if we should collapse one node out of the tree and the actual code doing the collapse into a separate pair of functions. This helps to make the changes to these areas more readable. Second it encodes the upper 32b of the empty_children value onto the full_children value in the case of bits == KEYLENGTH. By doing this we are able to handle the case of a 32b node where empty_children would appear to be 0 when it was actually 1ul << 32. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/can')
0 files changed, 0 insertions, 0 deletions