diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2010-08-24 17:48:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-24 17:48:10 -0400 |
commit | c2e3143e3c46ede22336316b3ff4746727c0d93a (patch) | |
tree | 28fa33bc3ef923614066377e5a954b88cb87148a /net/sched/em_meta.c | |
parent | 5a46790ca4c40fdb6ed5336d7d6b593c96326b31 (diff) |
tc: add meta match on receive hash
Trivial extension to existing meta data match rules to allow
matching on skb receive hash value.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/em_meta.c')
-rw-r--r-- | net/sched/em_meta.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index 3bcac8aa333c..34da5e29ea1a 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c | |||
@@ -223,6 +223,11 @@ META_COLLECTOR(int_maclen) | |||
223 | dst->value = skb->mac_len; | 223 | dst->value = skb->mac_len; |
224 | } | 224 | } |
225 | 225 | ||
226 | META_COLLECTOR(int_rxhash) | ||
227 | { | ||
228 | dst->value = skb_get_rxhash(skb); | ||
229 | } | ||
230 | |||
226 | /************************************************************************** | 231 | /************************************************************************** |
227 | * Netfilter | 232 | * Netfilter |
228 | **************************************************************************/ | 233 | **************************************************************************/ |
@@ -541,6 +546,7 @@ static struct meta_ops __meta_ops[TCF_META_TYPE_MAX+1][TCF_META_ID_MAX+1] = { | |||
541 | [META_ID(SK_SENDMSG_OFF)] = META_FUNC(int_sk_sendmsg_off), | 546 | [META_ID(SK_SENDMSG_OFF)] = META_FUNC(int_sk_sendmsg_off), |
542 | [META_ID(SK_WRITE_PENDING)] = META_FUNC(int_sk_write_pend), | 547 | [META_ID(SK_WRITE_PENDING)] = META_FUNC(int_sk_write_pend), |
543 | [META_ID(VLAN_TAG)] = META_FUNC(int_vlan_tag), | 548 | [META_ID(VLAN_TAG)] = META_FUNC(int_vlan_tag), |
549 | [META_ID(RXHASH)] = META_FUNC(int_rxhash), | ||
544 | } | 550 | } |
545 | }; | 551 | }; |
546 | 552 | ||