summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/list.h18
-rw-r--r--include/linux/pkt_cls.h21
-rw-r--r--include/linux/skbuff.h2
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,