]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - include/net/fq_impl.h
net/mlx5e: Rx, Fix checksum calculation for new hardware
[mirror_ubuntu-bionic-kernel.git] / include / net / fq_impl.h
index be7c0fab34782ee5dce7166c55aa8430ecba3af3..89a012905ef0bf1084bb46815163d8d54f25b39c 100644 (file)
@@ -118,7 +118,7 @@ static struct fq_flow *fq_flow_classify(struct fq *fq,
 
        lockdep_assert_held(&fq->lock);
 
-       hash = skb_get_hash_perturb(skb, fq->perturbation);
+       hash = skb_get_hash_perturb(skb, &fq->perturbation);
        idx = reciprocal_scale(hash, fq->flows_cnt);
        flow = &fq->flows[idx];
 
@@ -307,7 +307,7 @@ 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);
-       fq->perturbation = prandom_u32();
+       get_random_bytes(&fq->perturbation, sizeof(fq->perturbation));
        fq->quantum = 300;
        fq->limit = 8192;
        fq->memory_limit = 16 << 20; /* 16 MBytes */