From: Nithin Dabilpuram <ndabilpuram@marvell.com>
To: <jerinj@marvell.com>, Nithin Dabilpuram <ndabilpuram@marvell.com>,
"Kiran Kumar K" <kirankumark@marvell.com>,
Sunil Kumar Kori <skori@marvell.com>,
Satha Rao <skoteshwar@marvell.com>
Cc: <dev@dpdk.org>
Subject: [PATCH 3/4] net/cnxk: update LBK ethdev link info
Date: Mon, 28 Mar 2022 11:17:56 +0530 [thread overview]
Message-ID: <20220328054757.28762-3-ndabilpuram@marvell.com> (raw)
In-Reply-To: <20220328054757.28762-1-ndabilpuram@marvell.com>
Update link info of LBK ethdev i.e AF's VF's as always up
and 100G. This is because there is no phy for the LBK interfaces
and we won't get a link update notification for the same.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
drivers/net/cnxk/cnxk_link.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/cnxk/cnxk_link.c b/drivers/net/cnxk/cnxk_link.c
index f10a502..b1d59e3 100644
--- a/drivers/net/cnxk/cnxk_link.c
+++ b/drivers/net/cnxk/cnxk_link.c
@@ -12,6 +12,17 @@ cnxk_nix_toggle_flag_link_cfg(struct cnxk_eth_dev *dev, bool set)
else
dev->flags &= ~CNXK_LINK_CFG_IN_PROGRESS_F;
+ /* Update link info for LBK */
+ if (!set && roc_nix_is_lbk(&dev->nix)) {
+ struct rte_eth_link link;
+
+ link.link_status = RTE_ETH_LINK_UP;
+ link.link_speed = RTE_ETH_SPEED_NUM_100G;
+ link.link_autoneg = RTE_ETH_LINK_FIXED;
+ link.link_duplex = RTE_ETH_LINK_FULL_DUPLEX;
+ rte_eth_linkstatus_set(dev->eth_dev, &link);
+ }
+
rte_wmb();
}
--
2.8.4
next prev parent reply other threads:[~2022-03-28 7:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-28 5:47 [PATCH 1/4] common/cnxk: use aggregate level rr prio from mbox Nithin Dabilpuram
2022-03-28 5:47 ` [PATCH 2/4] net/cnxk: support loopback mode on AF VF's Nithin Dabilpuram
2022-03-28 5:47 ` Nithin Dabilpuram [this message]
2022-03-28 5:47 ` [PATCH 4/4] net/cnxk: add barrier after meta batch free in scalar Nithin Dabilpuram
2022-03-28 6:47 [PATCH 1/4] common/cnxk: use aggregate level rr prio from mbox Nithin Dabilpuram
2022-03-28 6:47 ` [PATCH 3/4] net/cnxk: update LBK ethdev link info Nithin Dabilpuram
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=20220328054757.28762-3-ndabilpuram@marvell.com \
--to=ndabilpuram@marvell.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=kirankumark@marvell.com \
--cc=skori@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).