| Submitter | françois romieu |
|---|---|
| Date | May 7, 2012, 11:42 p.m. |
| Message ID | <20120507234205.GA2230@electric-eye.fr.zoreil.com> |
| Download | mbox | patch |
| Permalink | /patch/157490/ |
| State | RFC |
| Delegated to: | David Miller |
| Headers | show |
Comments
El 07/05/12 18:42, Francois Romieu escribió: > Julien Ducourthial<jducourt@free.fr> : >> The r8169 may get stuck or show bad behaviour after activating TSO : >> the net_device is not stopped when it has no more TX descriptors. >> This problem comes from TX_BUFS_AVAIL which may reach -1 when all >> transmit descriptors are in use. The patch simply tries to keep positive >> values. > It seems more than good. > > Alex, Thomas, can you check if Julien's patch below fixes your broken > kernels as well ? > No luck. The backtrace still appears after using the patched driver. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index f545093..d1e3c51 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ -61,8 +61,12 @@ #define R8169_MSG_DEFAULT \ (NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_IFUP | NETIF_MSG_IFDOWN) -#define TX_BUFFS_AVAIL(tp) \ - (tp->dirty_tx + NUM_TX_DESC - tp->cur_tx - 1) +#define TX_SLOTS_AVAIL(tp) \ + (tp->dirty_tx + NUM_TX_DESC - tp->cur_tx) + +/* A skbuff with nr_frags needs nr_frags+1 entries in the tx queue */ +#define TX_FRAGS_READY_FOR(tp,nr_frags) \ + (TX_SLOTS_AVAIL(tp) >= (nr_frags + 1)) /* Maximum number of multicast addresses to filter (vs. Rx-all-multicast).