From: <skori@marvell.com>
To: Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Satha Rao <skoteshwar@marvell.com>,
	Harman Kalra <hkalra@marvell.com>
Cc: <dev@dpdk.org>
Subject: [PATCH 6/6] net/cnxk: report link mode
Date: Thu, 5 Jun 2025 17:12:20 +0530	[thread overview]
Message-ID: <20250605114231.3036050-6-skori@marvell.com> (raw)
In-Reply-To: <20250605114231.3036050-1-skori@marvell.com>
From: Sunil Kumar Kori <skori@marvell.com>
Reports link mode whether fixed or autonegotiation
Depends-on: patch-35378 ("ethdev: add support to provide link type")
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
 drivers/net/cnxk/cnxk_link.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/cnxk/cnxk_link.c b/drivers/net/cnxk/cnxk_link.c
index a074f6f65e..d2b2372871 100644
--- a/drivers/net/cnxk/cnxk_link.c
+++ b/drivers/net/cnxk/cnxk_link.c
@@ -171,7 +171,7 @@ cnxk_eth_dev_link_status_cb(struct roc_nix *nix, struct roc_nix_link_info *link)
 
 	eth_link.link_status = link->status;
 	eth_link.link_speed = link->speed;
-	eth_link.link_autoneg = RTE_ETH_LINK_AUTONEG;
+	eth_link.link_autoneg = link->autoneg ? RTE_ETH_LINK_AUTONEG : RTE_ETH_LINK_FIXED;
 	eth_link.link_duplex = link->full_duplex;
 	eth_link.link_type = dev->link_type;
 
@@ -210,7 +210,7 @@ cnxk_nix_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete)
 			return rc;
 		link.link_status = info.status;
 		link.link_speed = info.speed;
-		link.link_autoneg = RTE_ETH_LINK_AUTONEG;
+		link.link_autoneg = info.autoneg ? RTE_ETH_LINK_AUTONEG : RTE_ETH_LINK_FIXED;
 		if (info.full_duplex)
 			link.link_duplex = info.full_duplex;
 		link.link_type = dev->link_type;
-- 
2.43.0
next prev parent reply	other threads:[~2025-06-05 11:43 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-05 11:42 [PATCH 1/6] common/cnxk: support link mode configuration skori
2025-06-05 11:42 ` [PATCH 2/6] common/cnxk: provide port type from fwdata skori
2025-06-05 11:42 ` [PATCH 3/6] net/cnxk: get speed capability from firmware skori
2025-06-05 11:42 ` [PATCH 4/6] net/cnxk: support link mode configuration skori
2025-06-05 11:42 ` [PATCH 5/6] net/cnxk: report link type and status skori
2025-06-05 11:42 ` skori [this message]
2025-08-13  9:30   ` [PATCH v2 1/6] common/cnxk: support link mode configuration skori
2025-08-13  9:30     ` [PATCH v2 2/6] common/cnxk: provide port type from fwdata skori
2025-08-13  9:30     ` [PATCH v2 3/6] net/cnxk: get speed capability from firmware skori
2025-08-13  9:30     ` [PATCH v2 4/6] net/cnxk: support link mode configuration skori
2025-08-13  9:30     ` [PATCH v2 5/6] net/cnxk: report link type and status skori
2025-08-13  9:30     ` [PATCH v2 6/6] net/cnxk: report link mode skori
2025-08-14  8:16       ` [PATCH v3 1/6] common/cnxk: support link mode configuration skori
2025-08-14  8:16         ` [PATCH v3 2/6] common/cnxk: provide port type from fwdata skori
2025-08-14  8:16         ` [PATCH v3 3/6] net/cnxk: get speed capability from firmware skori
2025-08-14  8:16         ` [PATCH v3 4/6] net/cnxk: support link mode configuration skori
2025-08-14  8:16         ` [PATCH v3 5/6] net/cnxk: report link type and status skori
2025-08-14  8:16         ` [PATCH v3 6/6] net/cnxk: report link mode skori
2025-10-23  5:37           ` [PATCH v4 1/6] common/cnxk: support link mode configuration skori
2025-10-23  5:37             ` [PATCH v4 2/6] common/cnxk: provide port type from fwdata skori
2025-10-23  5:37             ` [PATCH v4 3/6] net/cnxk: get speed capability from firmware skori
2025-10-23  5:37             ` [PATCH v4 4/6] net/cnxk: support link mode configuration skori
2025-10-23  5:37             ` [PATCH v4 5/6] net/cnxk: report link type and status skori
2025-10-23  5:37             ` [PATCH v4 6/6] net/cnxk: report link mode skori
2025-10-23  7:53               ` [PATCH v5 1/6] common/cnxk: support link mode configuration skori
2025-10-23  7:53                 ` [PATCH v5 2/6] common/cnxk: provide port type from fwdata skori
2025-10-23  7:53                 ` [PATCH v5 3/6] net/cnxk: get speed capability from firmware skori
2025-10-23  7:53                 ` [PATCH v5 4/6] net/cnxk: support link mode configuration skori
2025-10-23  7:53                 ` [PATCH v5 5/6] net/cnxk: report link type and status skori
2025-10-23  7:53                 ` [PATCH v5 6/6] net/cnxk: report link mode skori
2025-10-23 11:02                   ` [PATCH v6 1/6] common/cnxk: support link mode configuration skori
2025-10-23 11:02                     ` [PATCH v6 2/6] common/cnxk: provide port type from fwdata skori
2025-10-23 11:02                     ` [PATCH v6 3/6] net/cnxk: get speed capability from firmware skori
2025-10-23 11:02                     ` [PATCH v6 4/6] net/cnxk: support link mode configuration skori
2025-10-23 11:02                     ` [PATCH v6 5/6] net/cnxk: report link type and status skori
2025-10-23 11:02                     ` [PATCH v6 6/6] net/cnxk: report link mode skori
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=20250605114231.3036050-6-skori@marvell.com \
    --to=skori@marvell.com \
    --cc=dev@dpdk.org \
    --cc=hkalra@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=skoteshwar@marvell.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).