On Sun, 2020-07-05 at 00:50 +0200, Michal Kubecek wrote:
> On Mon, Jun 08, 2020 at 10:52:54AM -0700, Govindarajulu Varadarajan wrote:
> > Add support for ETHTOOL_GTUNABLE and ETHTOOL_STUNABLE options.
> > 
> > Tested rx-copybreak on enic driver. Tested ETHTOOL_TUNNABLE_STRING
>                                                      TUNABLE
> > options with test/debug changes in kernel.
> 
> This makes me wonder how are string tunables supposed to work.
> Unfortunately there is neither documentation nor code one could look at.
> I tried to understand it from this patch but it didn't help much either:
> do_stunable() will pass a string of arbitrary size to kernel but
> do_gtunable() allocates a buffer of fixed size (for a given tunable).
> Is this supposed to be the maximum value length? Or is kernel going to
> return an error if the buffer is insufficient and userspace repeats the
> request?

I do not know. string tunable isn't implemented/supported in kernel.
I assumed driver's get/set_tunable() returns error in case insufficient size.

Addressing the rest of the comments and sending v2.

--
Govind

Reply via email to