diff options
author | 2020-07-26 15:09:46 +0200 | |
---|---|---|
committer | 2020-07-31 09:24:24 +0200 | |
commit | 48a54f6bc456859dabbd1fbd805e233d260754cf (patch) | |
tree | 5b4b89380a37fabd300e5e1dfaa83aae743dab27 /include/net | |
parent | mac80211: improve AQL tx airtime estimation (diff) | |
download | wireguard-linux-48a54f6bc456859dabbd1fbd805e233d260754cf.tar.xz wireguard-linux-48a54f6bc456859dabbd1fbd805e233d260754cf.zip |
net/fq_impl: use skb_get_hash instead of skb_get_hash_perturb
This avoids unnecessarily regenerating the skb flow hash
Signed-off-by: Felix Fietkau <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[small commit message fixup]
Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/fq.h | 1 | ||||
-rw-r--r-- | include/net/fq_impl.h | 3 |
2 files changed, 1 insertions, 3 deletions
diff --git a/include/net/fq.h b/include/net/fq.h index 2ad85e683041..e39f3f8d5f8a 100644 --- a/include/net/fq.h +++ b/include/net/fq.h @@ -69,7 +69,6 @@ struct fq { struct list_head backlogs; spinlock_t lock; u32 flows_cnt; - siphash_key_t perturbation; u32 limit; u32 memory_limit; u32 memory_usage; diff --git a/include/net/fq_impl.h b/include/net/fq_impl.h index 38a9a3d1222b..e73d74d2fabf 100644 --- a/include/net/fq_impl.h +++ b/include/net/fq_impl.h @@ -108,7 +108,7 @@ begin: static u32 fq_flow_idx(struct fq *fq, struct sk_buff *skb) { - u32 hash = skb_get_hash_perturb(skb, &fq->perturbation); + u32 hash = skb_get_hash(skb); return reciprocal_scale(hash, fq->flows_cnt); } @@ -308,7 +308,6 @@ static int fq_init(struct fq *fq, int flows_cnt) INIT_LIST_HEAD(&fq->backlogs); spin_lock_init(&fq->lock); fq->flows_cnt = max_t(u32, flows_cnt, 1); - get_random_bytes(&fq->perturbation, sizeof(fq->perturbation)); fq->quantum = 300; fq->limit = 8192; fq->memory_limit = 16 << 20; /* 16 MBytes */ |