Messages in this thread | | | Date | Mon, 17 Jun 2019 13:34:28 -0700 (PDT) | Subject | Re: [PATCH net-next v4 1/3] hinic: add rss support | From | David Miller <> |
| |
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.
| |