Unverified Commit 748eeb7d authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!12127 sched: sch_cake: fix bulk flow accounting logic for host fairness

parents 43ba7c70 8b47504c
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -785,12 +785,15 @@ static u32 cake_hash(struct cake_tin_data *q, const struct sk_buff *skb,
		 * queue, accept the collision, update the host tags.
		 */
		q->way_collisions++;
		allocate_src = cake_dsrc(flow_mode);
		allocate_dst = cake_ddst(flow_mode);

		if (q->flows[outer_hash + k].set == CAKE_SET_BULK) {
			if (allocate_src)
				q->hosts[q->flows[reduced_hash].srchost].srchost_bulk_flow_count--;
			if (allocate_dst)
				q->hosts[q->flows[reduced_hash].dsthost].dsthost_bulk_flow_count--;
		}
		allocate_src = cake_dsrc(flow_mode);
		allocate_dst = cake_ddst(flow_mode);
found:
		/* reserve queue for future packets in same flow */
		reduced_hash = outer_hash + k;