Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121868
b: refs/heads/master
c: 5635c10
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 17, 2008
1 parent 0ea3612 commit 268f220
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 536533e69e3e4a9f0174509813f8df28970d6ebe
refs/heads/master: 5635c10d976716ef47ae441998aeae144c7e7387
19 changes: 19 additions & 0 deletions trunk/include/net/dst.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ struct dst_entry
struct hh_cache *hh;
#ifdef CONFIG_XFRM
struct xfrm_state *xfrm;
#else
void *__pad1;
#endif
int (*input)(struct sk_buff*);
int (*output)(struct sk_buff*);
Expand All @@ -71,8 +73,20 @@ struct dst_entry

#ifdef CONFIG_NET_CLS_ROUTE
__u32 tclassid;
#else
__u32 __pad2;
#endif


/*
* Align __refcnt to a 64 bytes alignment
* (L1_CACHE_SIZE would be too much)
*/
#ifdef CONFIG_64BIT
long __pad_to_align_refcnt[2];
#else
long __pad_to_align_refcnt[1];
#endif
/*
* __refcnt wants to be on a different cache line from
* input/output/ops or performance tanks badly
Expand Down Expand Up @@ -157,6 +171,11 @@ dst_metric_locked(struct dst_entry *dst, int metric)

static inline void dst_hold(struct dst_entry * dst)
{
/*
* If your kernel compilation stops here, please check
* __pad_to_align_refcnt declaration in struct dst_entry
*/
BUILD_BUG_ON(offsetof(struct dst_entry, __refcnt) & 63);
atomic_inc(&dst->__refcnt);
}

Expand Down

0 comments on commit 268f220

Please sign in to comment.