]> git.baikalelectronics.ru Git - kernel.git/commit
igb: Update igb to use a path similar to ixgbe to determine when to stop Tx
authorAlexander Duyck <alexander.h.duyck@intel.com>
Sat, 9 Feb 2013 04:27:48 +0000 (04:27 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 15 Feb 2013 09:31:19 +0000 (01:31 -0800)
commit1905235af90bff06dba87415cf6a115228798cfa
treec6b171a04255964314d035a41c05830754a1071f
parentb0ef03efac16e2aa7a67758a0aaff5a2934e0a4d
igb: Update igb to use a path similar to ixgbe to determine when to stop Tx

After reviewing the igb and ixgbe code I realized there are a few issues in
how the code is structured.  Specifically we are not checking the size of the
buffers being used in transmits and we are not using the same value to
determine when to stop or start a Tx queue.  As such the code is prone to be
buggy.

This patch makes it so that we have one value DESC_NEEDED that we will use for
starting and stopping the queue.  In addition we will check the size of
buffers being used when setting up a transmit so as to avoid a possible buffer
overrun if we were to receive a frame with a block of data larger than 32K in
skb->data.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igb/igb.h
drivers/net/ethernet/intel/igb/igb_main.c