From: John Fastabend Date: Wed, 9 Mar 2011 04:46:16 +0000 (+0000) Subject: ixgbe: DCB, set minimum bandwidth per traffic class X-Git-Tag: v2.6.39-rc1~468^2~87^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1390a59452a0895d3fea5b5504fa75ba36c13a74;p=platform%2Fkernel%2Flinux-exynos.git ixgbe: DCB, set minimum bandwidth per traffic class DCB provides a guaranteed bandwidth in the case with 0% bandwidth then no bandwidth is guaranteed. However the traffic class should still be able to transmit traffic. For this to work the traffic class must be given the minimum credits required to send a frame. Signed-off-by: John Fastabend Tested-by: Ross Brattain Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ixgbe/ixgbe_dcb.c b/drivers/net/ixgbe/ixgbe_dcb.c index e7b551a..41c529f 100644 --- a/drivers/net/ixgbe/ixgbe_dcb.c +++ b/drivers/net/ixgbe/ixgbe_dcb.c @@ -64,7 +64,7 @@ s32 ixgbe_ieee_credits(__u8 *bw, __u16 *refill, __u16 *max, int max_frame) val = min_credit; refill[i] = val; - max[i] = (bw[i] * MAX_CREDIT)/100; + max[i] = bw[i] ? (bw[i] * MAX_CREDIT)/100 : min_credit; } return 0; }