[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1406420380.29010.129.camel@deadeye.wl.decadent.org.uk>
Date: Sun, 27 Jul 2014 01:19:40 +0100
From: Ben Hutchings <ben@...adent.org.uk>
To: Govindarajulu Varadarajan <_govind@....com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, ssujith@...co.com,
benve@...co.com
Subject: Re: [PATCH net-next 2/3] ethtool: add rx_copybreak support
On Sat, 2014-07-26 at 16:19 +0530, Govindarajulu Varadarajan wrote:
> On Wed, 23 Jul 2014, Govindarajulu Varadarajan wrote:
>
> > On Tue, 22 Jul 2014, Ben Hutchings wrote:
> >> No, you can't do that either. Basically you can't change the size or
> >> layout of any of the ethtool structures.
> >
> > Ok. Can you suggest me how I should add rx_copybreak to ethtool?
> >
> > May be add another function, set/get_rxcopybreak(), to ethtool_ops?
> >
> > Thanks
> >
>
> Should I drop the idea of ethtool and resubmit just the rx_copybreak changes?
> (use module parameter to change rx_copybreak value).
>
> Or should I try something like this
> 3de0b592394d17b 'ethtool: Support for configurable RSS hash key', Create new
> ethtool cmd for changing driver rx_copybreak value.
I think that you will need to add new ethtool operations to get and set
this parameter. At the same time, please consider whether there are
other parameters for buffer allocation and use that might usefully be
configurable in some drivers, so they can be grouped together.
Some parameters that could be included are:
- Maximum frame size that should be copied to a pre-allocated DMA
buffer rather than DMA-mapped directly from the skb.
ibmveth has the module parameter 'tx_copybreak' for this.
- Maximum frame size to be transmitted by PIO rather than DMA, where
the hardware supports both methods.
The mlx4_en and sfc drivers have hardcoded values for this (MAX_BF
and EFX_PIOBUF_SIZE_DEF respectively).
- Size of each RX DMA buffer, which is independent of MTU if
scatter/gather is enabled.
benet has the module parameter 'rx_frag_size' for this.
Others on netdev might have some other suggestions for inclusion. You
could also add some reserved space for further expansion.
You should probably include maximum fields for all these, which the
'get' operation would set to 0 if the parameter isn't applicable to the
device.
Ben.
--
Ben Hutchings
73.46% of all statistics are made up.
Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)
Powered by blists - more mailing lists