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 958E5A0A02; Fri, 21 May 2021 02:53:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1298940143; Fri, 21 May 2021 02:53:54 +0200 (CEST) Received: from CNSHJSMIN05.NOKIA-SBELL.COM (cnshjsmin05.app.nokia-sbell.com [116.246.26.45]) by mails.dpdk.org (Postfix) with ESMTP id 46FDD40041 for ; Fri, 21 May 2021 02:53:52 +0200 (CEST) X-AuditID: ac18929d-e7bff70000023e73-3e-60a7049e08c6 Received: from CNSHPPEXCH1604.nsn-intra.net (Unknown_Domain [135.251.51.104]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by CNSHJSMIN05.NOKIA-SBELL.COM (Symantec Messaging Gateway) with SMTP id 0F.12.15987.E9407A06; Fri, 21 May 2021 08:53:50 +0800 (HKT) Received: from CNSHPPEXCH1601.nsn-intra.net (135.251.51.101) by CNSHPPEXCH1604.nsn-intra.net (135.251.51.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 21 May 2021 08:53:50 +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:53:50 +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+6rtG6Gw Date: Fri, 21 May 2021 00:53:50 +0000 Message-ID: References: <20210521004041.159-1-jianyue.wu@nokia-sbell.com> In-Reply-To: <20210521004041.159-1-jianyue.wu@nokia-sbell.com> 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/ts4Q3cey/IEgxkXRC3efdrOZNHTeZDR gcnj14KlrB6L97xkCmCK4rJJSc3JLEst0rdL4Mp4+mwOc8FhyYqjv2+zNDCuFu1i5OSQEDCR WLvzElMXIxeHkMAhJokpjTfZQRJCAn8ZJW7eKoBIbGKUmL7zHStIgk3ARWLqjvlgtoiAscTN 21eYQWxmAUWJTwsmsXQxcnAIC9hJXF6ZC2KKCDhLfF3jCVFtJNE78w3YeBYBVYnZ02cwgdi8 QNXzzrQwgZQLCdhK3NzECxLmBAo/vjEDbDijgJjE91NrmCAWiUvcejKfCeJ8AYkle84zQ9ii Ei8f/2MFGSMhoCTRtwGqXEdiwe5PbBC2tsSyha+ZIbYKSpyc+YRlAqPYLCRTZyFpmYWkZRaS lgWMLKsYpZ39gj28gn09/QxM9fz8vT0ddYOdXH189Jz9fTcxAqNojcSkuTsYm2Z+0DvEyMTB eIhRgoNZSYR3u/fiBCHelMTKqtSi/Pii0pzU4kOM0hwsSuK8V6fPSBASSE8sSc1OTS1ILYLJ MnFwSjUwdfJsk2yfU/XH9uCdFTN987edX+fzoSWVKyXobkc7R6Ko0A+//PleF3u32f2w5HkR KeevNOntNYO1pz5FnkmVWpq5Ulv2qNZy/bhJe5v5wy9yHxPk3fZg2TlPxk3Txc/snlP4Y67X y1kSfCx793JavdkWqxVbtfq426dw0U+Lc7lubVhzQnKCH1PtOw63s0Lezx7uvXBMbjrbp45f XObxDXe3bn2xf/elV9P/s1Qct8g2lZsRZrua/5Nrz7zZHzQqnR+EXWU8aMmnoLWs5aPZ+6l6 9ZX7Zq5/eGLjAvbzbz+XWM0Szpj89l1rr+vE3UfzjZU8JdljfhYWcFwT5P3p065fufK97Gw9 L/mqnrQ9rUosxRmJhlrMRcWJAK7wemgRAwAA 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_cap= a 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