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] [day] [month] [year] [list]
Date:   Mon, 17 Jun 2019 13:34:28 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     xuechaojing@...wei.com
Cc:     linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        luoshaokai@...wei.com, cloud.wangxiaoyun@...wei.com,
        chiqijun@...wei.com, wulike1@...wei.com
Subject: Re: [PATCH net-next v4 1/3] hinic: add rss support

From: Xue Chaojing <xuechaojing@...wei.com>
Date: Mon, 17 Jun 2019 05:45:59 +0000

> +static int hinic_rss_init(struct hinic_dev *nic_dev)
> +{
> +	u8 default_rss_key[HINIC_RSS_KEY_SIZE] = { 0 };
> +	u32 indir_tbl[HINIC_RSS_INDIR_SIZE] = { 0 };
> +	u8 tmpl_idx = nic_dev->rss_tmpl_idx;
> +	int err, i;
> +
> +	netdev_rss_key_fill(default_rss_key, sizeof(default_rss_key));

Since netdev_rss_key_fill() fills the entire object, you don't need the
variable initializer for default_rss_key here, please remove it.

> +int hinic_rss_set_indir_tbl(struct hinic_dev *nic_dev, u32 tmpl_idx,
> +			    const u32 *indir_table)
> +{
> +	for (i = 0; i < HINIC_RSS_INDIR_SIZE; i++) {
> +		indir_tbl->entry[i] = (u8)(*(indir_table + i));

Please index the array normally using "indir_table[i]", I also suspect
the u8 cast is also unnecessary.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ