[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bc8457a8-28d7-3c79-9272-314f8be5cc09@intel.com>
Date: Thu, 13 Apr 2023 12:11:59 -0700
From: "Tantilov, Emil S" <emil.s.tantilov@...el.com>
To: Simon Horman <simon.horman@...igine.com>,
Pavan Kumar Linga <pavan.kumar.linga@...el.com>
CC: <intel-wired-lan@...ts.osuosl.org>, <netdev@...r.kernel.org>,
<joshua.a.hay@...el.com>, <sridhar.samudrala@...el.com>,
<jesse.brandeburg@...el.com>, <anthony.l.nguyen@...el.com>,
<willemb@...gle.com>, <decot@...gle.com>, <pabeni@...hat.com>,
<kuba@...nel.org>, <edumazet@...gle.com>, <davem@...emloft.net>,
Alan Brady <alan.brady@...el.com>,
Alice Michael <alice.michael@...el.com>,
Phani Burra <phani.r.burra@...el.com>
Subject: Re: [PATCH net-next v2 14/15] idpf: add ethtool callbacks
On 4/11/2023 2:55 AM, Simon Horman wrote:
> On Mon, Apr 10, 2023 at 06:13:53PM -0700, Pavan Kumar Linga wrote:
>> From: Alan Brady <alan.brady@...el.com>
>
> ...
>
>> diff --git a/drivers/net/ethernet/intel/idpf/idpf_ethtool.c b/drivers/net/ethernet/intel/idpf/idpf_ethtool.c
>
> ...
>
>> +/**
>> + * idpf_add_qstat_strings - Copy queue stat strings into ethtool buffer
>> + * @p: ethtool supplied buffer
>> + * @stats: stat definitions array
>> + * @type: stat type
>> + * @idx: stat idx
>> + *
>> + * Format and copy the strings described by the const static stats value into
>> + * the buffer pointed at by p.
>> + *
>> + * The parameter @stats is evaluated twice, so parameters with side effects
>> + * should be avoided. Additionally, stats must be an array such that
>> + * ARRAY_SIZE can be called on it.
>> + */
>> +#define idpf_add_qstat_strings(p, stats, type, idx) \
>> + __idpf_add_qstat_strings(p, stats, ARRAY_SIZE(stats), type, idx)
>
> Hi Pavan, Hi Alan,
>
> FWIIW, I think __idpf_add_qstat_strings() could be a function.
> It would give some type checking. And avoid possible aliasing of inputs.
> Basically, I think functions should be used unless there is a reason not to.
>
> ...
Good catch, we'll resolve it in v3.
Thanks,
Emil
Powered by blists - more mailing lists