lkml.org 
[lkml]   [2019]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net-next v4 1/3] hinic: add rss support
From
From: Xue Chaojing <xuechaojing@huawei.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.

\
 
 \ /
  Last update: 2019-06-17 22:35    [W:0.110 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site