summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorChangli Gao <xiaosuo@gmail.com>2010-08-21 06:23:15 +0000
committerDavid S. Miller <davem@davemloft.net>2010-08-21 23:40:14 -0700
commit739a91ef0625e0e4a40b835f4f891313c47915df (patch)
treebfcb025c8b446a81e82f0b57ad76168996ce49bc /net/sched
parent81ce790bd75d49a0d119f5d7b27405e1d9b1bd57 (diff)
downloadtalos-op-linux-739a91ef0625e0e4a40b835f4f891313c47915df.tar.gz
talos-op-linux-739a91ef0625e0e4a40b835f4f891313c47915df.zip
net_sched: cls_flow: add key rxhash
We can use rxhash to classify the traffic into flows. As rxhash maybe supplied by NIC or RPS, it is cheaper. Signed-off-by: Changli Gao <xiaosuo@gmail.com> Acked-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/cls_flow.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/sched/cls_flow.c b/net/sched/cls_flow.c
index cd709f1294df..5b271a18bc3a 100644
--- a/net/sched/cls_flow.c
+++ b/net/sched/cls_flow.c
@@ -306,6 +306,11 @@ static u32 flow_get_vlan_tag(const struct sk_buff *skb)
return tag & VLAN_VID_MASK;
}
+static u32 flow_get_rxhash(struct sk_buff *skb)
+{
+ return skb_get_rxhash(skb);
+}
+
static u32 flow_key_get(struct sk_buff *skb, int key)
{
switch (key) {
@@ -343,6 +348,8 @@ static u32 flow_key_get(struct sk_buff *skb, int key)
return flow_get_skgid(skb);
case FLOW_KEY_VLAN_TAG:
return flow_get_vlan_tag(skb);
+ case FLOW_KEY_RXHASH:
+ return flow_get_rxhash(skb);
default:
WARN_ON(1);
return 0;
OpenPOWER on IntegriCloud