From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 665F92C00 for ; Wed, 30 Aug 2017 15:31:10 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Aug 2017 06:31:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,448,1498546800"; d="scan'208";a="143682434" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.57]) ([10.237.220.57]) by orsmga005.jf.intel.com with ESMTP; 30 Aug 2017 06:31:08 -0700 To: Jerin Jacob , dev@dpdk.org References: <20170830113007.28620-1-jerin.jacob@caviumnetworks.com> From: Ferruh Yigit Message-ID: <469dafbe-eefc-bb0b-1c5b-e300431f6a41@intel.com> Date: Wed, 30 Aug 2017 14:31:07 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170830113007.28620-1-jerin.jacob@caviumnetworks.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/thunderx: add device speed capability info X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Aug 2017 13:31:11 -0000 On 8/30/2017 12:30 PM, Jerin Jacob wrote: > updated nicvf feature file to mark support. > > Signed-off-by: Jerin Jacob > --- > doc/guides/nics/features/thunderx.ini | 1 + > drivers/net/thunderx/nicvf_ethdev.c | 9 +++++++++ > 2 files changed, 10 insertions(+) > > diff --git a/doc/guides/nics/features/thunderx.ini b/doc/guides/nics/features/thunderx.ini > index b9720be6b..626858971 100644 > --- a/doc/guides/nics/features/thunderx.ini > +++ b/doc/guides/nics/features/thunderx.ini > @@ -4,6 +4,7 @@ > ; Refer to default.ini for the full list of available PMD features. > ; > [Features] > +Speed capabilities = Y > Link status = Y > Link status event = Y > Queue start/stop = Y > diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c > index edc17f1d4..bfad07933 100644 > --- a/drivers/net/thunderx/nicvf_ethdev.c > +++ b/drivers/net/thunderx/nicvf_ethdev.c > @@ -1380,6 +1380,15 @@ nicvf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) > > dev_info->pci_dev = RTE_ETH_DEV_TO_PCI(dev); > > + /* Autonegotiation may be disabled */ > + dev_info->speed_capa = ETH_LINK_SPEED_FIXED; > + dev_info->speed_capa |= ETH_LINK_SPEED_10M; > + dev_info->speed_capa |= ETH_LINK_SPEED_100M; > + dev_info->speed_capa |= ETH_LINK_SPEED_1G; > + dev_info->speed_capa |= ETH_LINK_SPEED_10G; Why not just "|" them, same result with less code ... > + if (nicvf_hw_version(nic) != PCI_SUB_DEVICE_ID_CN81XX_NICVF) > + dev_info->speed_capa |= ETH_LINK_SPEED_40G; > + > dev_info->min_rx_bufsize = ETHER_MIN_MTU; > dev_info->max_rx_pktlen = NIC_HW_MAX_FRS; > dev_info->max_rx_queues = >