DPDK patches and discussions
 help / color / mirror / Atom feed
From: Mingjin Ye <mingjinx.ye@intel.com>
To: dev@dpdk.org
Cc: Mingjin Ye <mingjinx.ye@intel.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Anatoly Burakov <anatoly.burakov@intel.com>
Subject: [PATCH] net/ice: enable link speed 200G
Date: Thu, 31 Oct 2024 01:18:19 +0000	[thread overview]
Message-ID: <20241031011819.2020557-1-mingjinx.ye@intel.com> (raw)

ICE Enable 200G link speed capability.

Fixes: 36afbc269081 ("net/ice: support link speed change")

Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 11 ++++++++++-
 drivers/net/ice/ice_ethdev.h | 12 ++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index d5e94a6685..ce955ebbc2 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -4160,6 +4160,9 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 			ICE_PHY_TYPE_SUPPORT_100G_HIGH(phy_type_high))
 		dev_info->speed_capa |= RTE_ETH_LINK_SPEED_100G;
 
+	if (ICE_PHY_TYPE_SUPPORT_200G_HIGH(phy_type_high))
+		dev_info->speed_capa |= RTE_ETH_LINK_SPEED_200G;
+
 	dev_info->nb_rx_queues = dev->data->nb_rx_queues;
 	dev_info->nb_tx_queues = dev->data->nb_tx_queues;
 
@@ -4285,6 +4288,9 @@ ice_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 	case ICE_AQ_LINK_SPEED_100GB:
 		link.link_speed = RTE_ETH_SPEED_NUM_100G;
 		break;
+	case ICE_AQ_LINK_SPEED_200GB:
+		link.link_speed = RTE_ETH_SPEED_NUM_200G;
+		break;
 	case ICE_AQ_LINK_SPEED_UNKNOWN:
 		PMD_DRV_LOG(ERR, "Unknown link speed");
 		link.link_speed = RTE_ETH_SPEED_NUM_UNKNOWN;
@@ -4311,6 +4317,8 @@ ice_parse_link_speeds(uint16_t link_speeds)
 {
 	uint16_t link_speed = ICE_AQ_LINK_SPEED_UNKNOWN;
 
+	if (link_speeds & RTE_ETH_LINK_SPEED_200G)
+		link_speed |= ICE_AQ_LINK_SPEED_200GB;
 	if (link_speeds & RTE_ETH_LINK_SPEED_100G)
 		link_speed |= ICE_AQ_LINK_SPEED_100GB;
 	if (link_speeds & RTE_ETH_LINK_SPEED_50G)
@@ -4343,7 +4351,8 @@ ice_apply_link_speed(struct rte_eth_dev *dev)
 	struct rte_eth_conf *conf = &dev->data->dev_conf;
 
 	if (conf->link_speeds == RTE_ETH_LINK_SPEED_AUTONEG) {
-		conf->link_speeds = RTE_ETH_LINK_SPEED_100G |
+		conf->link_speeds = RTE_ETH_LINK_SPEED_200G |
+				    RTE_ETH_LINK_SPEED_100G |
 				    RTE_ETH_LINK_SPEED_50G  |
 				    RTE_ETH_LINK_SPEED_40G  |
 				    RTE_ETH_LINK_SPEED_25G  |
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index 076cf595e8..61d8c275cf 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -741,6 +741,18 @@ ice_align_floor(int n)
 	((phy_type) & ICE_PHY_TYPE_HIGH_100G_AUI2_AOC_ACC) || \
 	((phy_type) & ICE_PHY_TYPE_HIGH_100G_AUI2))
 
+#define ICE_PHY_TYPE_SUPPORT_200G_HIGH(phy_type) \
+	(((phy_type) & ICE_PHY_TYPE_HIGH_200G_CR4_PAM4) || \
+	((phy_type) & ICE_PHY_TYPE_HIGH_200G_SR4) || \
+	((phy_type) & ICE_PHY_TYPE_HIGH_200G_FR4) || \
+	((phy_type) & ICE_PHY_TYPE_HIGH_200G_LR4) || \
+	((phy_type) & ICE_PHY_TYPE_HIGH_200G_DR4) || \
+	((phy_type) & ICE_PHY_TYPE_HIGH_200G_KR4_PAM4) || \
+	((phy_type) & ICE_PHY_TYPE_HIGH_200G_AUI4_AOC_ACC) || \
+	((phy_type) & ICE_PHY_TYPE_HIGH_200G_AUI4) || \
+	((phy_type) & ICE_PHY_TYPE_HIGH_200G_AUI8_AOC_ACC) || \
+	((phy_type) & ICE_PHY_TYPE_HIGH_200G_AUI8))
+
 __rte_experimental
 int rte_pmd_ice_dump_package(uint16_t port, uint8_t **buff, uint32_t *size);
 
-- 
2.25.1


                 reply	other threads:[~2024-10-31  1:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20241031011819.2020557-1-mingjinx.ye@intel.com \
    --to=mingjinx.ye@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /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).