On Tue, 1 Mar 2016 09:27:05 +0200 Corcodel Marian <a...@marian1000.go.ro> wrote:
> This patch increase rx/tx on maximum allowed 1024 4-duble-words > descriptors. > > Signed-off-by: Corcodel Marian <a...@marian1000.go.ro> > --- > drivers/net/ethernet/realtek/r8169.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/realtek/r8169.c > b/drivers/net/ethernet/realtek/r8169.c > index e215812..5fd3fca 100644 > --- a/drivers/net/ethernet/realtek/r8169.c > +++ b/drivers/net/ethernet/realtek/r8169.c > @@ -84,8 +84,8 @@ static const int multicast_filter_limit = 32; > > #define R8169_REGS_SIZE 256 > #define R8169_NAPI_WEIGHT 64 > -#define NUM_TX_DESC 64 /* Number of Tx descriptor registers */ > -#define NUM_RX_DESC 256U /* Number of Rx descriptor registers */ > +#define NUM_TX_DESC 1024 /* Number of Tx descriptor registers */ > +#define NUM_RX_DESC 1024U /* Number of Rx descriptor registers */ > #define R8169_TX_RING_BYTES (NUM_TX_DESC * sizeof(struct TxDesc)) > #define R8169_RX_RING_BYTES (NUM_RX_DESC * sizeof(struct RxDesc)) > I can see why you would want to do this to get better small packet performance, but there is a serious downside. Increasing the ring size can mean significantly increased bufferbloat. With jumbo frames a full ring of 1024 packets is 73ms. The r8169 driver does not support a couple of things that would help with bufferbloat. It doesn't support tuning the ring sizes with ethtool. And it doesn't support BQL. If you really want to do this, better to support ethtool ring size control and leave the default alone, but allow larger values by override.