diff options
| author | David S. Miller <davem@davemloft.net> | 2015-05-04 07:09:09 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-05-04 07:09:09 +0300 |
| commit | 7c9a2eeac9b9caafb806e624fd2b75d30ecaee64 (patch) | |
| tree | 6a96e0a238759aa880c17b3efbe2ba616eaad86e /include/linux/skbuff.h | |
| parent | 6a21165480a066a27c1f1dbd32aec581c612ba23 (diff) | |
| parent | 2e99403d28c182aa7ffb2d4ef34472df4873a4dd (diff) | |
| download | linux-7c9a2eeac9b9caafb806e624fd2b75d30ecaee64.tar.xz | |
Merge branch 'flow_keys_digest'
Tom Herbert says:
====================
net: Eliminate calls to flow_dissector and introduce flow_keys_digest
In this patch set we add skb_get_hash_perturb which gets the skbuff
hash for a packet and perturbs it using a provided key and jhash1.
This function is used in serveral qdiscs and eliminates many calls
to flow_dissector and jhash3 to get a perturbed hash for a packet.
To handle the sch_choke issue (passes flow_keys in skbuff cb) we
add flow_keys_digest which is a digest of a flow constructed
from a flow_keys structure.
This is the second version of these patches I posted a while ago,
and is prerequisite work to increasing the size of the flow_keys
structure and hashing over it (full IPv6 address, flow label, VLAN ID,
etc.).
Version 2:
- Add keyval parameter to __flow_hash_from_keys which allows caller to
set the initval for jhash
- Perturb always does flow dissection and creates hash based on
input perturb value which acts as the keyval to __flow_hash_from_keys
- Added a _flow_keys_digest_data which is used in make_flow_keys_digest.
This fills out the digest by populating individual fields instead
of copying the whole structure.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
| -rw-r--r-- | include/linux/skbuff.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 66e374d62f64..acb83e249e3f 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -927,6 +927,8 @@ static inline __u32 skb_get_hash(struct sk_buff *skb) return skb->hash; } +__u32 skb_get_hash_perturb(const struct sk_buff *skb, u32 perturb); + static inline __u32 skb_get_hash_raw(const struct sk_buff *skb) { return skb->hash; |
