Re: [PATCH net-next 2/3] ethtool: add rx_copybreak support
From: Ben Hutchings <hidden>
Date: 2014-07-27 00:19:55
On Sat, 2014-07-26 at 16:19 +0530, Govindarajulu Varadarajan wrote:
On Wed, 23 Jul 2014, Govindarajulu Varadarajan wrote:quoted
On Tue, 22 Jul 2014, Ben Hutchings wrote:quoted
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? ThanksShould 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.
Attachments
- signature.asc [application/pgp-signature] 811 bytes