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 4EB56A0A02; Fri, 21 May 2021 02:59:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1437F40143; Fri, 21 May 2021 02:59:29 +0200 (CEST) Received: from CNSHJSMIN03.NOKIA-SBELL.COM (unknown [116.246.26.71]) by mails.dpdk.org (Postfix) with ESMTP id 5E17B40041 for ; Fri, 21 May 2021 02:59:27 +0200 (CEST) X-AuditID: ac189297-b77ff70000013027-e2-60a705e78cbb Received: from CNSHPPEXCH1608.nsn-intra.net (Unknown_Domain [135.251.51.108]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by CNSHJSMIN03.NOKIA-SBELL.COM (Symantec Messaging Gateway) with SMTP id 19.DF.12327.7E507A06; Fri, 21 May 2021 08:59:19 +0800 (HKT) Received: from CNSHPPEXCH1601.nsn-intra.net (135.251.51.101) by CNSHPPEXCH1608.nsn-intra.net (135.251.51.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 21 May 2021 08:59:19 +0800 Received: from CNSHPPEXCH1601.nsn-intra.net ([135.251.51.101]) by CNSHPPEXCH1601.nsn-intra.net ([135.251.51.101]) with mapi id 15.01.2176.012; Fri, 21 May 2021 08:59:19 +0800 From: "Wu, Jianyue (NSB - CN/Hangzhou)" To: "haiyue.wang@intel.com" CC: "dev@dpdk.org" Thread-Topic: [PATCH] ixgbe: Add runtime tx/rx queue setup for X550 Thread-Index: AQHXTdnvgr2Ek002kkuBHkr8uqDg+6rtG6GwgAAA+nA= Date: Fri, 21 May 2021 00:59:19 +0000 Message-ID: References: <20210521004041.159-1-jianyue.wu@nokia-sbell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [135.251.51.115] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHLMWRmVeSWpSXmKPExsXS/ts4R/c56/IEg937tCzefdrOZNHTeZDR gcnj14KlrB6L97xkCmCK4rJJSc3JLEst0rdL4MpY9eoqS8FByYotzxqYGxhXiXYxcnBICJhI vN3s1sXIySEkcIhJ4tqK0i5GLiD7L6PEmXkrGSGcTYwSHR/aWEGq2ARcJKbumA9miwgYS9y8 fYUZxGYWUJT4tGASC8hQYQE7icsrc0FMEQFnia9rPCGqrSSe3LzPBmKzCKhKzNp7gwXE5gWq 3ra5gRnihiKJiQefM4HYnAL2EgdWHmIHsRkFxCS+n1rDBLFJXOLWk/lgtoSAgMSSPeeZIWxR iZeP/7FCvKUk0bcBqlxHYsHuT2wQtrbEsoWvmSHWCkqcnPmEZQKj2CwkU2chaZmFpGUWkpYF jCyrGKWd/YI9vIJ9Pf0MjPX8/L09HXWDnVx9fPSc/X03MQKjaI3EpOk7GJ/P+qB3iJGJg/EQ owQHs5II73bvxQlCvCmJlVWpRfnxRaU5qcWHGKU5WJTEea9On5EgJJCeWJKanZpakFoEk2Xi 4JRqYLrVWCRrETlVsLGdoX+6mUS17vUsVh7TvfqCXWdr/h/yW/Nuq7hsyh11pSzhU5puoU5b ZVOr7j1+blet3RR/wZzj2TGXExmHymSPcVfeOl/SLbacbeG/wjnTjjE6vpA+La5ldT8lROif b0nzjyBmPr9bjz8/v6KSNGl32Jxf5q76t2RfeHi/6lp7yPLg852pP9bZst0R4RV9MvOcSN7k yOnfD+9q3j/j/ftktaYGxcjNe3WT/IXuf8yoKnvYUeXU7CDr/TBjyd/tDz5ptDbNmju/r5rH Zuo+r7CJr63mR82bsetcZ/qPC4U+J741Cu9SFtwkN2/5BJuoW4tC3M4p/11Qmcb1YeGCgxmP H374EqzEUpyRaKjFXFScCAChdaccEQMAAA== Subject: [dpdk-dev] [PATCH] ixgbe: Add runtime tx/rx queue setup for X550 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" X550 eth card support runtime tx/rx queue setup, so add capacity in dev_capa and queue offload capacity. Signed-off-by: Wu Jianyue --- drivers/net/ixgbe/ixgbe_ethdev.c | 22 ++++++++++++++++++++++ drivers/net/ixgbe/ixgbe_rxtx.c | 21 +++++++++++++++++++-- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git drivers/net/ixgbe/ixgbe_ethdev.c drivers/net/ixgbe/ixgbe_ethdev.= c index b5371568b..0839426b4 100644 --- drivers/net/ixgbe/ixgbe_ethdev.c +++ drivers/net/ixgbe/ixgbe_ethdev.c @@ -3915,6 +3915,17 @@ ixgbe_dev_info_get(struct rte_eth_dev *dev, struct r= te_eth_dev_info *dev_info) dev_info->default_rxportconf.ring_size =3D 256; dev_info->default_txportconf.ring_size =3D 256; =20 + if (hw->mac.type =3D=3D ixgbe_mac_X550 || + hw->mac.type =3D=3D ixgbe_mac_X550EM_x || + hw->mac.type =3D=3D ixgbe_mac_X550EM_a || + hw->mac.type =3D=3D ixgbe_mac_X550_vf || + hw->mac.type =3D=3D ixgbe_mac_X550EM_x_vf || + hw->mac.type =3D=3D ixgbe_mac_X550EM_a_vf) { + dev_info->dev_capa =3D + RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP | + RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP; + } + return 0; } =20 @@ -4010,6 +4021,17 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev, dev_info->rx_desc_lim =3D rx_desc_lim; dev_info->tx_desc_lim =3D tx_desc_lim; =20 + if (hw->mac.type =3D=3D ixgbe_mac_X550 || + hw->mac.type =3D=3D ixgbe_mac_X550EM_x || + hw->mac.type =3D=3D ixgbe_mac_X550EM_a || + hw->mac.type =3D=3D ixgbe_mac_X550_vf || + hw->mac.type =3D=3D ixgbe_mac_X550EM_x_vf || + hw->mac.type =3D=3D ixgbe_mac_X550EM_a_vf) { + dev_info->dev_capa =3D + RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP | + RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP; + } + return 0; } =20 diff --git drivers/net/ixgbe/ixgbe_rxtx.c drivers/net/ixgbe/ixgbe_rxtx.c in= dex d69f36e97..ea813aefe 100644 --- drivers/net/ixgbe/ixgbe_rxtx.c +++ drivers/net/ixgbe/ixgbe_rxtx.c @@ -2571,9 +2571,18 @@ ixgbe_set_tx_function(struct rte_eth_dev *dev, struc= t ixgbe_tx_queue *txq) uint64_t ixgbe_get_tx_queue_offloads(struct rte_et= h_dev *dev) { - RTE_SET_USED(dev); + uint64_t offloads =3D 0; + struct ixgbe_hw *hw =3D IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); =20 - return 0; + if (hw->mac.type =3D=3D ixgbe_mac_X550 || + hw->mac.type =3D=3D ixgbe_mac_X550EM_x || + hw->mac.type =3D=3D ixgbe_mac_X550EM_a || + hw->mac.type =3D=3D ixgbe_mac_X550_vf || + hw->mac.type =3D=3D ixgbe_mac_X550EM_x_vf || + hw->mac.type =3D=3D ixgbe_mac_X550EM_a_vf) + offloads |=3D RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP; + + return offloads; } =20 uint64_t @@ -3008,6 +3017,14 @@ ixgbe_get_rx_queue_offloads(struct rte_eth_dev *dev) if (hw->mac.type !=3D ixgbe_mac_82598EB) offloads |=3D DEV_RX_OFFLOAD_VLAN_STRIP; =20 + if (hw->mac.type =3D=3D ixgbe_mac_X550 || + hw->mac.type =3D=3D ixgbe_mac_X550EM_x || + hw->mac.type =3D=3D ixgbe_mac_X550EM_a || + hw->mac.type =3D=3D ixgbe_mac_X550_vf || + hw->mac.type =3D=3D ixgbe_mac_X550EM_x_vf || + hw->mac.type =3D=3D ixgbe_mac_X550EM_a_vf) + offloads |=3D RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP; + return offloads; } =20 -- 2.17.1