Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193895
b: refs/heads/master
c: 02cdce5
h: refs/heads/master
i:
  193893: 02eba19
  193891: 41f7cbe
  193887: e5c0742
v: v3
  • Loading branch information
YOSHIFUJI Hideaki / 吉藤英明 authored and David S. Miller committed Mar 31, 2010
1 parent c955b1c commit 31047d6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: de7737e056d65ad6b0f135f7bb24d86458af0d47
refs/heads/master: 02cdce53f3d0d3eee8188944c96150ee8c97100d
15 changes: 13 additions & 2 deletions trunk/net/ipv6/ip6_fib.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,23 @@ static __inline__ u32 fib6_new_sernum(void)
/*
* test bit
*/
#if defined(__LITTLE_ENDIAN)
# define BITOP_BE32_SWIZZLE (0x1F & ~7)
#else
# define BITOP_BE32_SWIZZLE 0
#endif

static __inline__ __be32 addr_bit_set(void *token, int fn_bit)
{
__be32 *addr = token;

return htonl(1 << ((~fn_bit)&0x1F)) & addr[fn_bit>>5];
/*
* Here,
* 1 << ((~fn_bit ^ BITOP_BE32_SWIZZLE) & 0x1f)
* is optimized version of
* htonl(1 << ((~fn_bit)&0x1F))
* See include/asm-generic/bitops/le.h.
*/
return (1 << ((~fn_bit ^ BITOP_BE32_SWIZZLE) & 0x1f)) & addr[fn_bit >> 5];
}

static __inline__ struct fib6_node * node_alloc(void)
Expand Down

0 comments on commit 31047d6

Please sign in to comment.