Re: [PATCH net v4 4/4] tg3: Fix tx_pending checks for tg3_tso_bug

2014-08-29 Thread Benjamin Poirier
On 2014/08/28 20:24, Prashant Sreedharan wrote: > > > > - for (i = 0; i < tp->irq_max; i++) > > - tp->napi[i].tx_pending = ering->tx_pending; > > + dev->gso_max_segs = TG3_TX_SEG_PER_DESC(ering->tx_pending - 1); > > + for (i = 0; i < tp->irq_max; i++) { > > + struct tg3_

Re: [PATCH net v4 4/4] tg3: Fix tx_pending checks for tg3_tso_bug

2014-08-28 Thread Prashant Sreedharan
> > - for (i = 0; i < tp->irq_max; i++) > - tp->napi[i].tx_pending = ering->tx_pending; > + dev->gso_max_segs = TG3_TX_SEG_PER_DESC(ering->tx_pending - 1); > + for (i = 0; i < tp->irq_max; i++) { > + struct tg3_napi *tnapi = &tp->napi[i]; > + > + tn

Re: [PATCH net v4 4/4] tg3: Fix tx_pending checks for tg3_tso_bug

2014-08-28 Thread Prashant Sreedharan
> if (netif_running(dev)) { > @@ -12346,8 +12380,15 @@ static int tg3_set_ringparam(struct net_device *dev, > struct ethtool_ringparam *e > if (tg3_flag(tp, JUMBO_RING_ENABLE)) > tp->rx_jumbo_pending = ering->rx_jumbo_pending; > > - for (i = 0; i < tp->irq_max; i++

[PATCH net v4 4/4] tg3: Fix tx_pending checks for tg3_tso_bug

2014-08-27 Thread Benjamin Poirier
In tg3_set_ringparam(), the tx_pending test to cover the cases where tg3_tso_bug() is entered has two problems 1) the check is only done for certain hardware whereas the workaround is now used more broadly. IOW, the check may not be performed when it is needed. 2) the check is too optimistic. For