diff options
| author | David S. Miller <davem@nuts.davemloft.net> | 2004-07-29 23:00:42 -0700 |
|---|---|---|
| committer | David S. Miller <davem@nuts.davemloft.net> | 2004-07-29 23:00:42 -0700 |
| commit | e71f71031d296e866086e574bd9448e1f496149f (patch) | |
| tree | 07b82239d39c26edb7e74a1b6d96c5ccdcef746e /include/linux | |
| parent | 99202312a6e44bbe29355c5706064fb71dd33db9 (diff) | |
| parent | bb9a9e6e2e102ee416da9383b24024b3ed23ca94 (diff) | |
Merge nuts.davemloft.net:/disk1/BK/network-2.6
into nuts.davemloft.net:/disk1/BK/net-2.6
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/list.h | 18 | ||||
| -rw-r--r-- | include/linux/pkt_cls.h | 21 | ||||
| -rw-r--r-- | include/linux/skbuff.h | 2 |
3 files changed, 33 insertions, 8 deletions
diff --git a/include/linux/list.h b/include/linux/list.h index 92127ae0e995..33b863bcb7b9 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -677,6 +677,24 @@ static inline void hlist_add_after(struct hlist_node *n, pos && ({ n = pos->next; 1; }) && \ ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ pos = n) + +/** + * hlist_for_each_entry_rcu - iterate over rcu list of given type + * @pos: the type * to use as a loop counter. + * @pos: the &struct hlist_node to use as a loop counter. + * @head: the head for your list. + * @member: the name of the hlist_node within the struct. + * + * This list-traversal primitive may safely run concurrently with + * the _rcu list-mutation primitives such as hlist_add_rcu() + * as long as the traversal is guarded by rcu_read_lock(). + */ +#define hlist_for_each_entry_rcu(tpos, pos, head, member) \ + for (pos = (head)->first; \ + pos && ({ prefetch(pos->next); 1;}) && \ + ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ + pos = pos->next, ({ smp_read_barrier_depends(); 0; }) ) + #else #warning "don't include kernel headers in userspace" #endif /* __KERNEL__ */ diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h index 60dd7903284e..9abc5b5a925c 100644 --- a/include/linux/pkt_cls.h +++ b/include/linux/pkt_cls.h @@ -117,8 +117,6 @@ enum struct tc_police { __u32 index; - int refcnt; - int bindcnt; int action; #define TC_POLICE_UNSPEC TC_ACT_UNSPEC #define TC_POLICE_OK TC_ACT_OK @@ -131,6 +129,9 @@ struct tc_police __u32 mtu; struct tc_ratespec rate; struct tc_ratespec peakrate; + int refcnt; + int bindcnt; + __u32 capab; }; struct tcf_t @@ -188,6 +189,7 @@ enum TCA_U32_POLICE, TCA_U32_ACT, TCA_U32_INDEV, + TCA_U32_PCNT, __TCA_U32_MAX }; @@ -199,7 +201,6 @@ struct tc_u32_key __u32 val; int off; int offmask; - __u32 kcnt; }; struct tc_u32_sel @@ -215,10 +216,16 @@ struct tc_u32_sel short hoff; __u32 hmask; struct tc_u32_key keys[0]; - unsigned long rcnt; - unsigned long rhit; }; +#ifdef CONFIG_CLS_U32_PERF +struct tc_u32_pcnt +{ + __u64 rcnt; + __u64 rhit; + __u64 kcnts[0]; +}; +#endif /* Flags */ #define TC_U32_TERMINAL 1 @@ -283,8 +290,8 @@ enum TCA_FW_UNSPEC, TCA_FW_CLASSID, TCA_FW_POLICE, - TCA_FW_INDEV, - TCA_FW_ACT, + TCA_FW_INDEV, /* used by CONFIG_NET_CLS_IND */ + TCA_FW_ACT, /* used by CONFIG_NET_CLS_ACT */ __TCA_FW_MAX }; diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 3d0ba45fa88d..11f514844817 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -233,7 +233,7 @@ struct sk_buff { * want to keep them across layers you have to do a skb_clone() * first. This is owned by whoever has the skb queued ATM. */ - char cb[48]; + char cb[40]; unsigned int len, data_len, |
