From: Wu Jianyue <jianyue.wu@nokia-sbell.com>
To: haiyue.wang@intel.com
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] ixgbe: Add runtime tx/rx queue setup for X550
Date: Mon, 24 May 2021 19:53:29 +0800 [thread overview]
Message-ID: <20210524115329.40525-1-jianyue.wu@nokia-sbell.com> (raw)
X550 NIC can support runtime tx/rx queue setup.
Add capacity in dev_capa and queue offload capacity.
Signed-off-by: Wu Jianyue <jianyue.wu@nokia-sbell.com>
---
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_ethdev.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 rte_eth_dev_info *dev_info)
dev_info->default_rxportconf.ring_size = 256;
dev_info->default_txportconf.ring_size = 256;
+ if (hw->mac.type == ixgbe_mac_X550 ||
+ hw->mac.type == ixgbe_mac_X550EM_x ||
+ hw->mac.type == ixgbe_mac_X550EM_a ||
+ hw->mac.type == ixgbe_mac_X550_vf ||
+ hw->mac.type == ixgbe_mac_X550EM_x_vf ||
+ hw->mac.type == ixgbe_mac_X550EM_a_vf) {
+ dev_info->dev_capa =
+ RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP |
+ RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP;
+ }
+
return 0;
}
@@ -4010,6 +4021,17 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev,
dev_info->rx_desc_lim = rx_desc_lim;
dev_info->tx_desc_lim = tx_desc_lim;
+ if (hw->mac.type == ixgbe_mac_X550 ||
+ hw->mac.type == ixgbe_mac_X550EM_x ||
+ hw->mac.type == ixgbe_mac_X550EM_a ||
+ hw->mac.type == ixgbe_mac_X550_vf ||
+ hw->mac.type == ixgbe_mac_X550EM_x_vf ||
+ hw->mac.type == ixgbe_mac_X550EM_a_vf) {
+ dev_info->dev_capa =
+ RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP |
+ RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP;
+ }
+
return 0;
}
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, struct ixgbe_tx_queue *txq)
uint64_t
ixgbe_get_tx_queue_offloads(struct rte_eth_dev *dev)
{
- RTE_SET_USED(dev);
+ uint64_t offloads = 0;
+ struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- return 0;
+ if (hw->mac.type == ixgbe_mac_X550 ||
+ hw->mac.type == ixgbe_mac_X550EM_x ||
+ hw->mac.type == ixgbe_mac_X550EM_a ||
+ hw->mac.type == ixgbe_mac_X550_vf ||
+ hw->mac.type == ixgbe_mac_X550EM_x_vf ||
+ hw->mac.type == ixgbe_mac_X550EM_a_vf)
+ offloads |= RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP;
+
+ return offloads;
}
uint64_t
@@ -3008,6 +3017,14 @@ ixgbe_get_rx_queue_offloads(struct rte_eth_dev *dev)
if (hw->mac.type != ixgbe_mac_82598EB)
offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
+ if (hw->mac.type == ixgbe_mac_X550 ||
+ hw->mac.type == ixgbe_mac_X550EM_x ||
+ hw->mac.type == ixgbe_mac_X550EM_a ||
+ hw->mac.type == ixgbe_mac_X550_vf ||
+ hw->mac.type == ixgbe_mac_X550EM_x_vf ||
+ hw->mac.type == ixgbe_mac_X550EM_a_vf)
+ offloads |= RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP;
+
return offloads;
}
--
2.24.1
next reply other threads:[~2021-05-24 11:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 11:53 Wu Jianyue [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-05-26 5:29 Wu, Jianyue (NSB - CN/Hangzhou)
2021-06-16 0:31 ` Zhang, Qi Z
2021-06-16 5:03 ` Wu, Jianyue (NSB - CN/Hangzhou)
2021-06-16 12:59 ` Zhang, Qi Z
[not found] <20210522071304.981-1-jianyue.wu@nokia-sbell.com>
2021-05-22 7:17 ` Wu, Jianyue (NSB - CN/Hangzhou)
[not found] <20210521004041.159-1-jianyue.wu@nokia-sbell.com>
2021-05-21 0:53 ` Wu, Jianyue (NSB - CN/Hangzhou)
2021-05-21 0:59 ` Wu, Jianyue (NSB - CN/Hangzhou)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210524115329.40525-1-jianyue.wu@nokia-sbell.com \
--to=jianyue.wu@nokia-sbell.com \
--cc=dev@dpdk.org \
--cc=haiyue.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).