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]
Message-ID: <20230614112144.55d2fdf9@hermes.local>
Date: Wed, 14 Jun 2023 11:21:44 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Tony Nguyen <anthony.l.nguyen@...el.com>
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
 edumazet@...gle.com, netdev@...r.kernel.org, Pavan Kumar Linga
 <pavan.kumar.linga@...el.com>, emil.s.tantilov@...el.com,
 jesse.brandeburg@...el.com, sridhar.samudrala@...el.com,
 shiraz.saleem@...el.com, sindhu.devale@...el.com, willemb@...gle.com,
 decot@...gle.com, andrew@...n.ch, leon@...nel.org, mst@...hat.com,
 simon.horman@...igine.com, shannon.nelson@....com, Alan Brady
 <alan.brady@...el.com>, Joshua Hay <joshua.a.hay@...el.com>, Madhu Chittim
 <madhu.chittim@...el.com>, Phani Burra <phani.r.burra@...el.com>,
 Shailendra Bhatnagar <shailendra.bhatnagar@...el.com>
Subject: Re: [PATCH net-next v2 05/15] idpf: add create vport and netdev
 configuration

On Wed, 14 Jun 2023 10:14:18 -0700
Tony Nguyen <anthony.l.nguyen@...el.com> wrote:

> +	/* TX */
> +	int num_txq;
> +	int num_complq;
> +	/* It makes more sense for descriptor count to be part of only idpf
> +	 * queue structure. But when user changes the count via ethtool, driver
> +	 * has to store that value somewhere other than queue structure as the
> +	 * queues will be freed and allocated again.
> +	 */
> +	int txq_desc_count;
> +	int complq_desc_count;
> +	int num_txq_grp;
> +	u32 txq_model;
> +
> +	/* RX */
> +	int num_rxq;
> +	int num_bufq;
> +	int rxq_desc_count;

If value can never be negative, you can avoid future errors by using
an unsigned type. Ideally to save space use u32 or u16.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ