u32 dz_hashmask;
#define DZ_HASHMASK(dz) ((dz)->dz_hashmask)
int dz_order;
- __le16 dz_mask;
+ u16 dz_mask;
#define DZ_MASK(dz) ((dz)->dz_mask)
};
static inline dn_fib_idx_t dn_hash(dn_fib_key_t key, struct dn_zone *dz)
{
- u16 h = dn_ntohs(key.datum)>>(16 - dz->dz_order);
+ u16 h = ntohs(key.datum)>>(16 - dz->dz_order);
h ^= (h >> 10);
h ^= (h >> 6);
h &= DZ_HASHMASK(dz);
return *(dn_fib_idx_t *)&h;
}
-static inline dn_fib_key_t dz_key(__le16 dst, struct dn_zone *dz)
+static inline dn_fib_key_t dz_key(u16 dst, struct dn_zone *dz)
{
dn_fib_key_t k;
k.datum = dst & DZ_MASK(dz);
for_nexthops(fi) {
int attrlen = nhlen - sizeof(struct rtnexthop);
- __le16 gw;
+ dn_address gw;
if (attrlen < 0 || (nhlen -= nhp->rtnh_len) < 0)
return -EINVAL;
dz_key_0(key);
if (rta->rta_dst) {
- __le16 dst;
+ dn_address dst;
memcpy(&dst, rta->rta_dst, 2);
if (dst & ~DZ_MASK(dz))
return -EINVAL;
dz_key_0(key);
if (rta->rta_dst) {
- __le16 dst;
+ dn_address dst;
memcpy(&dst, rta->rta_dst, 2);
if (dst & ~DZ_MASK(dz))
return -EINVAL;