lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 11 Apr 2023 11:55:42 +0200
From:   Simon Horman <simon.horman@...igine.com>
To:     Pavan Kumar Linga <pavan.kumar.linga@...el.com>
Cc:     intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org,
        emil.s.tantilov@...el.com, 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 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.

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ