From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2858FA052A; Tue, 26 Jan 2021 16:31:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0EA46140F8C; Tue, 26 Jan 2021 16:31:19 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 7FC0F140F88 for ; Tue, 26 Jan 2021 16:31:16 +0100 (CET) IronPort-SDR: CaBIcYYcKNo9EKCm4BteSK/x9rJLWfPQXnVpZj43Q/uBxcEmZ7kEXv8dYE5bNnghbNsBgptja4 PBqCYeZNVeMQ== X-IronPort-AV: E=McAfee;i="6000,8403,9876"; a="167589952" X-IronPort-AV: E=Sophos;i="5.79,375,1602572400"; d="scan'208";a="167589952" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2021 07:31:15 -0800 IronPort-SDR: UiaDO3AVHTRTEsOWEPQMU4P+DjGB/0HS8d/MoMmnDsGsy1fkNlcVDms27ZBXx6BgTSP05FhDQv IbmFN6h4i6rg== X-IronPort-AV: E=Sophos;i="5.79,375,1602572400"; d="scan'208";a="362022053" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.227.53]) ([10.213.227.53]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2021 07:31:13 -0800 To: Nalla Pradeep , Radha Mohan Chintakuntla , Veerasenareddy Burru Cc: jerinj@marvell.com, dev@dpdk.org, sburla@marvell.com References: <20210118093602.5449-1-pnalla@marvell.com> <20210118093602.5449-5-pnalla@marvell.com> From: Ferruh Yigit Message-ID: Date: Tue, 26 Jan 2021 15:31:09 +0000 MIME-Version: 1.0 In-Reply-To: <20210118093602.5449-5-pnalla@marvell.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2 05/11] net/octeontx_ep: Add dev info get and configure 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 Sender: "dev" On 1/18/2021 9:35 AM, Nalla Pradeep wrote: > Add device information get and device configure operations. > > Signed-off-by: Nalla Pradeep <...> > +static int > +otx_ep_dev_info_get(struct rte_eth_dev *eth_dev, > + struct rte_eth_dev_info *devinfo) > +{ > + struct otx_ep_device *otx_epvf; > + struct rte_pci_device *pdev; > + uint32_t dev_id; > + > + otx_epvf = OTX_EP_DEV(eth_dev); > + pdev = otx_epvf->pdev; > + dev_id = pdev->id.device_id; > + > + devinfo->speed_capa = ETH_LINK_SPEED_10G; Is it always 10G independent from the device type and PHY? Also can you please update the featutes file, octeontx_ep.ini, as the same patch features are added. For example the 'Speed capabilities' feature can be set as P (partially supported) with this patch. > + devinfo->max_rx_queues = otx_epvf->max_rx_queues; > + devinfo->max_tx_queues = otx_epvf->max_tx_queues; > + > + devinfo->min_rx_bufsize = OTX_EP_MIN_RX_BUF_SIZE; > + if (dev_id == PCI_DEVID_OCTEONTX_EP_VF || > + dev_id == PCI_DEVID_OCTEONTX2_EP_NET_VF || > + dev_id == PCI_DEVID_CN98XX_EP_NET_VF) { > + devinfo->max_rx_pktlen = OTX_EP_MAX_PKT_SZ; > + devinfo->rx_offload_capa = DEV_RX_OFFLOAD_JUMBO_FRAME; > + devinfo->rx_offload_capa |= DEV_RX_OFFLOAD_SCATTER; > + devinfo->tx_offload_capa = DEV_TX_OFFLOAD_MULTI_SEGS; > + } The above list seems all the devices this driver probes, is there a reason to check for them? <...> > +static int > +otx_ep_dev_configure(struct rte_eth_dev *eth_dev) > +{ > + struct otx_ep_device *otx_epvf = OTX_EP_DEV(eth_dev); > + struct rte_eth_dev_data *data = eth_dev->data; > + struct rte_eth_rxmode *rxmode; > + struct rte_eth_txmode *txmode; > + struct rte_eth_conf *conf; > + uint32_t ethdev_queues; > + > + conf = &data->dev_conf; > + rxmode = &conf->rxmode; > + txmode = &conf->txmode; > + ethdev_queues = (uint32_t)(otx_epvf->sriov_info.rings_per_vf); > + if (eth_dev->data->nb_rx_queues > ethdev_queues || > + eth_dev->data->nb_tx_queues > ethdev_queues) { In dev_info, 'max_rx_queues' & 'max_tx_queues' set by 'otx_epvf->max_rx_queues' & 'otx_epvf->max_tx_queues' respectively, but here they are checked against 'otx_epvf->sriov_info.rings_per_vf' are they same values? Or should dev_info chaged to set correct limits?