]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
net: hns3: add support for VF driver inner interface hclgevf_ops.get_tqps_and_rss_info
authorPeng Li <lipeng321@huawei.com>
Thu, 8 Mar 2018 11:41:55 +0000 (19:41 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 18:40:02 +0000 (14:40 -0400)
BugLink: https://bugs.launchpad.net/bugs/1768670
This patch adds support for VF driver inner interface
hclgevf_ops.get_tqps_and_rss_info. This interface will be
used in the initialization process.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit cc719218e9539720160046a49369dc44dce1889b)
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/hns3vf/hclgevf_main.c

index cc95fc15fb0bb30f4387c53f72e26ac1261244a1..560bfc3c367aae786507646212b4c0bf026b8c8d 100644 (file)
@@ -1449,6 +1449,15 @@ static void hclgevf_get_channels(struct hnae3_handle *handle,
        ch->combined_count = hdev->num_tqps;
 }
 
+static void hclgevf_get_tqps_and_rss_info(struct hnae3_handle *handle,
+                                         u16 *free_tqps, u16 *max_rss_size)
+{
+       struct hclgevf_dev *hdev = hclgevf_ae_get_hdev(handle);
+
+       *free_tqps = 0;
+       *max_rss_size = hdev->rss_size_max;
+}
+
 static const struct hnae3_ae_ops hclgevf_ops = {
        .init_ae_dev = hclgevf_init_ae_dev,
        .uninit_ae_dev = hclgevf_uninit_ae_dev,
@@ -1479,6 +1488,7 @@ static const struct hnae3_ae_ops hclgevf_ops = {
        .get_fw_version = hclgevf_get_fw_version,
        .set_vlan_filter = hclgevf_set_vlan_filter,
        .get_channels = hclgevf_get_channels,
+       .get_tqps_and_rss_info = hclgevf_get_tqps_and_rss_info,
 };
 
 static struct hnae3_ae_algo ae_algovf = {