+ tg3-add-lower-bound-checks-for-tx-ring-size.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     tg3: add lower bound checks for tx ring size

has been added to the -mm tree.  Its filename is

     tg3-add-lower-bound-checks-for-tx-ring-size.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: tg3: add lower bound checks for tx ring size
From: "Michael Chan" <mchan@xxxxxxxxxxxx>

The minimum tx ring size must be greater than MAX_SKB_FRAGS or 3 times that
on some chips with TSO bugs.

Signed-off-by: Michael Chan <mchan@xxxxxxxxxxxx>
Cc: Ranjit Manomohan <ranjitm@xxxxxxxxxx>
Cc: Jeff Garzik <jeff@xxxxxxxxxx>
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/net/tg3.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -puN drivers/net/tg3.c~tg3-add-lower-bound-checks-for-tx-ring-size drivers/net/tg3.c
--- a/drivers/net/tg3.c~tg3-add-lower-bound-checks-for-tx-ring-size
+++ a/drivers/net/tg3.c
@@ -8106,7 +8106,10 @@ static int tg3_set_ringparam(struct net_
 
 	if ((ering->rx_pending > TG3_RX_RING_SIZE - 1) ||
 	    (ering->rx_jumbo_pending > TG3_RX_JUMBO_RING_SIZE - 1) ||
-	    (ering->tx_pending > TG3_TX_RING_SIZE - 1))
+	    (ering->tx_pending > TG3_TX_RING_SIZE - 1) ||
+	    (ering->tx_pending <= MAX_SKB_FRAGS) ||
+	    ((tp->tg3_flags2 & TG3_FLG2_HW_TSO_1_BUG) &&
+	     (ering->tx_pending <= (MAX_SKB_FRAGS * 3))))
 		return -EINVAL;
 
 	if (netif_running(dev)) {
_

Patches currently in -mm which might be from mchan@xxxxxxxxxxxx are

tg3-fix-set-ring-params-tx-ring-size-implementation.patch
tg3-add-lower-bound-checks-for-tx-ring-size.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux