ixgbe: configure minimal packet buffers to support TC
authorJohn Fastabend <john.r.fastabend@intel.com>
Tue, 3 May 2011 02:26:48 +0000 (02:26 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 21 Jun 2011 08:19:54 +0000 (01:19 -0700)
commit8b1c0b24d9afd4a59a8aa9c778253bcff949395a
treede0ca2509b98ed518797dbbc3079307959194795
parent72a32f1f3f68b7d95e7151b5f88831fb9906416e
ixgbe: configure minimal packet buffers to support TC

ixgbe devices support different numbers of packet buffers either
8 or 4. Here we only allocate the minimal number of packet
buffers required to implement the net_devices number of traffic
classes.

Fewer traffic classes allows for larger packet buffers in
hardware. Also more Tx/Rx queues can be given to each
traffic class.

This patch is mostly about propagating the number of traffic
classes through the init path. Specifically this adds the 4TC
cases to the MRQC and MTQC setup routines. Also ixgbe_setup_tc()
was sanitized to handle other traffic class value.

Finally changing the number of packet buffers in the hardware
requires the device to reinit. So this moves the reinit work
from DCB into the main ixgbe_setup_tc() routine to consolidate
the reset code. Now dcbnl_xxx ops call ixgbe_setup_tc() to
configure packet buffers if needed.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ixgbe/ixgbe_dcb_nl.c
drivers/net/ixgbe/ixgbe_main.c
drivers/net/ixgbe/ixgbe_type.h