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 00DF1A0A0C; Sat, 22 May 2021 09:17:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 63B7140685; Sat, 22 May 2021 09:17:45 +0200 (CEST) Received: from CNSHJSMIN03.NOKIA-SBELL.COM (cnshjsmin03.nokia-sbell.com [116.246.26.71]) by mails.dpdk.org (Postfix) with ESMTP id D6E9A40683 for ; Sat, 22 May 2021 09:17:43 +0200 (CEST) X-AuditID: ac189297-b61ff70000013027-21-60a8b0150b3c Received: from CNSHPPEXCH1606.nsn-intra.net (Unknown_Domain [135.251.51.106]) (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 82.D9.12327.510B8A06; Sat, 22 May 2021 15:17:41 +0800 (HKT) Received: from CNSHPPEXCH1601.nsn-intra.net (135.251.51.101) by CNSHPPEXCH1606.nsn-intra.net (135.251.51.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Sat, 22 May 2021 15:17:38 +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; Sat, 22 May 2021 15:17:38 +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: AQHXTtnr8mntyuLlQUSACNx4+RFmTqrvFuZQ Date: Sat, 22 May 2021 07:17:38 +0000 Message-ID: <80d2d7aa8a684b8c91d53be2bd8a3920@nokia-sbell.com> References: <20210522071304.981-1-jianyue.wu@nokia-sbell.com> In-Reply-To: <20210522071304.981-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/ts4S1d0w4oEg9+N7BbvPm1nsujpPMjo wOTxa8FSVo/Fe14yBTBFcdmkpOZklqUW6dslcGVsOSRY8Fiy4tfrRcwNjCdFuxg5OSQETCQu /n/D1MXIxSEkcIhJYte3XnYI5y+jxKSPU9ggnE2MEje+3WYEaWETcJGYumM+K4gtImAscfP2 FWYQm1lAUeLTgkksXYwcHMICdhKXV+aCmCICzhJf13hCVBtJ3D//nA3EZhFQlVj3eAMbSAkv UHXPNymQsJCArcTKJ29ZQGxOoPDWldvZQWxGATGJ76fWMEEsEpe49WQ+E8T9AhJL9pxnhrBF JV4+/scKMlJCQEmibwNUuY7Egt2f2CBsbYllC1+DlfMKCEqcnPmEZQKj2CwkU2chaZmFpGUW kpYFjCyrGKWd/YI9vIJ9Pf0MjPX8/L09HXWDnVx9fPSc/X03MQKjaI3EpOk7GJ/P+qB3iJGJ g/EQowQHs5IIL7fj8gQh3pTEyqrUovz4otKc1OJDjNIcLErivFenz0gQEkhPLEnNTk0tSC2C yTJxcEo1MHlrTvm/4V/xjKtarK93ecn8zd54RPkaj7g676liGW8Vtuojp67FeG2R1DZoPSTe dHYz48+Yt3mcmRP/P3F5l5msvLsl5qJvgOhv73JhCyneqXt3S76efbqr2/DAwieh/fPrLk3P CNz6oJm96u3Fi+9WzP0VIGtuGv6YQ/pB0uvnv4s3ecqc6lCuZlx++Jm2GYvOpDmmDHK3Nnmu jfgUZrjvu43nq4bWyty5u2RUNid9rjvfOcko3j5UWXfRMbtMYyOP/raAKJcnXxrDniQJiLBd 8n5XmCmtLi/C4ik4QfqkhdeO42bbZ7sefThryryT+07HWi3gixUJ/GocamQuKcxoIXZn8UaL KW2/k170KrEUZyQaajEXFScCANeDhJcRAwAA 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 NIC can support runtime tx/rx queue setup. Add capacity in dev_capa and queue offload capacity. Signed-off-by: Wu, Jianyue (NSB - CN/Hangzhou) --- drivers/net/ixgbe/ixgbe_ethdev.c | 22 ++++++++++++++++++++++ drivers/net/ixgbe/ixgbe_rxtx.c | 21 +++++++++++++++++++-- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_eth= dev.c index b5371568b..0839426b4 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/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 a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.= c index d69f36e97..ea813aefe 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/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.24.1