From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5E79ECAAD5 for ; Fri, 2 Sep 2022 12:11:08 +0000 (UTC) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D937340695; Fri, 2 Sep 2022 14:11:07 +0200 (CEST) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mails.dpdk.org (Postfix) with ESMTP id 8F75140693 for ; Fri, 2 Sep 2022 14:11:06 +0200 (CEST) Received: from dggpeml500024.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4MJxVf49l7z1N7ph; Fri, 2 Sep 2022 20:07:22 +0800 (CST) Received: from [10.67.100.224] (10.67.100.224) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 2 Sep 2022 20:11:04 +0800 Subject: Re: [Patch v6 06/18] net/mana: add device info To: , Ferruh Yigit CC: , Ajay Sharma , Stephen Hemminger References: <1661899911-13086-1-git-send-email-longli@linuxonhyperv.com> <1661899911-13086-7-git-send-email-longli@linuxonhyperv.com> From: fengchengwen Message-ID: Date: Fri, 2 Sep 2022 20:11:04 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <1661899911-13086-7-git-send-email-longli@linuxonhyperv.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.100.224] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500024.china.huawei.com (7.185.36.10) X-CFilter-Loop: Reflected X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 2022/8/31 6:51, longli@linuxonhyperv.com wrote: > From: Long Li > > Add the function to get device info. > > Signed-off-by: Long Li > --- > doc/guides/nics/features/mana.ini | 1 + > drivers/net/mana/mana.c | 82 +++++++++++++++++++++++++++++++ > 2 files changed, 83 insertions(+) > > diff --git a/doc/guides/nics/features/mana.ini b/doc/guides/nics/features/mana.ini > index 8043e11f99..566b3e8770 100644 > --- a/doc/guides/nics/features/mana.ini > +++ b/doc/guides/nics/features/mana.ini > @@ -8,5 +8,6 @@ Link status = P > Linux = Y > Multiprocess aware = Y > Removal event = Y > +Speed capabilities = P > Usage doc = Y > x86-64 = Y > diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c > index c9591035ac..e1550b3c08 100644 > --- a/drivers/net/mana/mana.c > +++ b/drivers/net/mana/mana.c > @@ -116,6 +116,86 @@ mana_dev_close(struct rte_eth_dev *dev) > return 0; > } > > +static int mana_dev_info_get(struct rte_eth_dev *dev, > + struct rte_eth_dev_info *dev_info) > +{ > + struct mana_priv *priv = dev->data->dev_private; > + > + dev_info->max_mtu = RTE_ETHER_MTU; ... > + dev_info->tx_desc_lim.nb_max = priv->max_tx_desc; > + dev_info->tx_desc_lim.nb_align = MIN_BUFFERS_PER_QUEUE; > + dev_info->tx_desc_lim.nb_seg_max = priv->max_send_sge; > + dev_info->rx_desc_lim.nb_mtu_seg_max = priv->max_recv_sge; > + > + /* Speed */ > + dev_info->speed_capa = ETH_LINK_SPEED_100G; I notice "[Patch v6 04/18] net/mana: add link update" report always 200G, why here is 100G? > + > + /* RX params */ > + dev_info->default_rxportconf.burst_size = 1; > + dev_info->default_rxportconf.ring_size = MAX_RECEIVE_BUFFERS_PER_QUEUE; > + dev_info->default_rxportconf.nb_queues = 1; > + > + /* TX params */ > + dev_info->default_txportconf.burst_size = 1; > + dev_info->default_txportconf.ring_size = MAX_SEND_BUFFERS_PER_QUEUE; > + dev_info->default_txportconf.nb_queues = 1; > + > + return 0; > +} > + ...