Received: by 10.223.185.116 with SMTP id b49csp5785205wrg; Wed, 7 Mar 2018 18:38:07 -0800 (PST) X-Google-Smtp-Source: AG47ELvDaJDIiCpuokDCDnGbTRycNmCtr+pZlBDP6htoFYDZdYEzcdkdFU8t5uGIhmTZZhG3xI9S X-Received: by 10.99.116.10 with SMTP id p10mr19873807pgc.97.1520476687420; Wed, 07 Mar 2018 18:38:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520476687; cv=none; d=google.com; s=arc-20160816; b=r/QqbQcWYhlwuRTAixtP2irKZd0b3vlH4ecT2ujyLNXlWlr/PwZtFcynNQgeSZyJTG hOH6I2xqGGmIXLxZH+2VA8GSwv1MEmFrr0uyrs1kDch29xwjCSLP9FvASamliVFQbOIJ BDN4s+oXJdVUVvmPpGrc+ErloSCxSyocpDjocNWXHyWQ5s7b5ZFdDu5Ix5fJBZzbrtT7 BYsa7FnojHOMEavuiLYKrzvpZphdVgkJG9EN7/A17bX++I4SYGrC92pOpmkQAyguR2Q9 0PTZz/+sa8zfZN2GoWlJkm+R8UtTcMb76Vzg6K+AXZACHdGd+hXhnc4Ii6O0/yTEk3sN nLLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=B+NoeXHZTmqdWtc+aagouNDWC5QPXYkw2UmRdqWJ9sM=; b=iDaEKIAB/nUmJj2++pmfKYXk42ToYdv/3HR099nA1mnl+WJq70SaofmTbhh6FED0OK RJF+kotsacWg/5+M1xbDzO+vQS1c0ARc0CqeaD9gRZMtcpLBk9MZ5avwaqrS53vAbTqP 7f54wG1It1l2bkHvT2YHvo+9Dc3fwbT1K1u7ysyUeJWIcnWbEenS2fb1YC6ZFC+tv2M7 WZkQ3LRdv2htTigZ8NOZUCr+ya4mEYQB4K4f54VGwLI4/2q1d6rNlu2boGz6IopO32v9 cW3ZRzAhlpW1ISjCWfD7n2sa1syNQhfm8NspDykaPvWSCjrKN7FoP8xZ21WkkE8GPlPr iL/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k185si14835969pfc.277.2018.03.07.18.37.53; Wed, 07 Mar 2018 18:38:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934943AbeCHCga (ORCPT + 99 others); Wed, 7 Mar 2018 21:36:30 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:5753 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934887AbeCHCfC (ORCPT ); Wed, 7 Mar 2018 21:35:02 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id AC7F76C0EEE0D; Thu, 8 Mar 2018 10:34:48 +0800 (CST) Received: from linux-ioko.site (10.71.200.31) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.361.1; Thu, 8 Mar 2018 10:34:42 +0800 From: Peng Li To: CC: , , , , Subject: [PATCH net-next 23/23] {topost} net: hns3: add support for VF driver inner interface hclgevf_ops.get_tqps_and_rss_info Date: Thu, 8 Mar 2018 11:06:48 +0800 Message-ID: <1520478408-116992-24-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1520478408-116992-1-git-send-email-lipeng321@huawei.com> References: <1520478408-116992-1-git-send-email-lipeng321@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.71.200.31] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c index b5cb8fb..6c240d6 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c @@ -1451,6 +1451,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, @@ -1482,6 +1491,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 = { -- 2.9.3