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

From: Prashant Sreedharan
Date: Thu Aug 28 2014 - 23:33:24 EST


>
> - 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];
> +
> + tnapi->tx_pending = ering->tx_pending;
> + if (netif_tx_queue_stopped(netdev_get_tx_queue(dev, i)) &&

Need to limit the number of TX queues to tp->txq_cnt instead of
tp->irq_max as txq_cnt can be less than irq_max.

netif_set_real_num_tx_queues(tp->dev, tp->txq_cnt);

> + tnapi->wakeup_thresh >= ering->tx_pending)
> + tnapi->wakeup_thresh = MAX_SKB_FRAGS + 1;
> + }
>



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/