]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
net: hns3: fix for not initializing VF rss_hash_key problem
authorFuyun Liang <liangfuyun1@huawei.com>
Sat, 24 Mar 2018 03:32:46 +0000 (11:32 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 18:40:42 +0000 (14:40 -0400)
BugLink: https://bugs.launchpad.net/bugs/1768670
Default rss_hash_key value should be given to all vports. But just the
PF rss_hash_key has the default value here. This patch adds rss_hash_key
Initialization for all vports.

Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit ea739c90650ae39307c7eb2bc6851ab78deed5df)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

index bede4117bad9dff1100bdc232393d94df8abf103..ce093c350316cedcd935ec20b9ee7c3a26c39c05 100644 (file)
@@ -3466,8 +3466,6 @@ static void hclge_rss_init_cfg(struct hclge_dev *hdev)
        struct hclge_vport *vport = hdev->vport;
        int i;
 
-       netdev_rss_key_fill(vport->rss_hash_key, HCLGE_RSS_KEY_SIZE);
-
        for (i = 0; i < hdev->num_vmdq_vport + 1; i++) {
                vport[i].rss_tuple_sets.ipv4_tcp_en =
                        HCLGE_RSS_INPUT_TUPLE_OTHER;
@@ -3487,6 +3485,8 @@ static void hclge_rss_init_cfg(struct hclge_dev *hdev)
                        HCLGE_RSS_INPUT_TUPLE_OTHER;
 
                vport[i].rss_algo = HCLGE_RSS_HASH_ALGO_TOEPLITZ;
+
+               netdev_rss_key_fill(vport[i].rss_hash_key, HCLGE_RSS_KEY_SIZE);
        }
 
        hclge_rss_indir_init_cfg(hdev);