From: Veerasenareddy Burru <vburru@marvell.com>
To: Sathesh B Edara <sedara@marvell.com>,
Satananda Burla <sburla@marvell.com>,
Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
Sathesh B Edara <sedara@marvell.com>,
Radha Chintakuntla <radhac@marvell.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH v2 3/3] net/octeon_ep: support link status
Date: Tue, 16 Aug 2022 05:34:12 +0000 [thread overview]
Message-ID: <BYAPR18MB2423A61FBD26F83F59AA82C1CC6B9@BYAPR18MB2423.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20220727092134.141530-4-sedara@marvell.com>
> -----Original Message-----
> From: Sathesh Edara <sedara@marvell.com>
> Sent: Wednesday, July 27, 2022 2:22 AM
> To: Satananda Burla <sburla@marvell.com>; Jerin Jacob Kollanukkaran
> <jerinj@marvell.com>; Sathesh B Edara <sedara@marvell.com>; Radha
> Chintakuntla <radhac@marvell.com>; Veerasenareddy Burru
> <vburru@marvell.com>
> Cc: dev@dpdk.org
> Subject: [PATCH v2 3/3] net/octeon_ep: support link status
>
> Added functionality to update link speed, duplex mode and link state.
>
> Signed-off-by: Sathesh Edara <sedara@marvell.com>
> ---
> doc/guides/nics/features/octeon_ep.ini | 1 +
> drivers/net/octeon_ep/otx_ep_ethdev.c | 17 +++++++++++++++++
> 2 files changed, 18 insertions(+)
>
> diff --git a/doc/guides/nics/features/octeon_ep.ini
> b/doc/guides/nics/features/octeon_ep.ini
> index b304ff8877..305e219262 100644
> --- a/doc/guides/nics/features/octeon_ep.ini
> +++ b/doc/guides/nics/features/octeon_ep.ini
> @@ -9,4 +9,5 @@ SR-IOV = Y
> Linux = Y
> x86-64 = Y
> Basic stats = Y
> +Link status = Y
> Usage doc = Y
> diff --git a/drivers/net/octeon_ep/otx_ep_ethdev.c
> b/drivers/net/octeon_ep/otx_ep_ethdev.c
> index cb45bd7a8a..77def6daa1 100644
> --- a/drivers/net/octeon_ep/otx_ep_ethdev.c
> +++ b/drivers/net/octeon_ep/otx_ep_ethdev.c
> @@ -387,6 +387,22 @@ otx_ep_dev_stats_get(struct rte_eth_dev
> *eth_dev,
> return 0;
> }
>
> +static int
> +otx_ep_dev_link_update(struct rte_eth_dev *eth_dev, int
> +wait_to_complete) {
> + RTE_SET_USED(wait_to_complete);
> +
> + if (!eth_dev->data->dev_started)
> + return 0;
> + struct rte_eth_link link;
> +
> + memset(&link, 0, sizeof(link));
> + link.link_status = RTE_ETH_LINK_UP;
> + link.link_speed = RTE_ETH_SPEED_NUM_10G;
> + link.link_duplex = RTE_ETH_LINK_FULL_DUPLEX;
> + return rte_eth_linkstatus_set(eth_dev, &link); }
> +
> /* Define our ethernet definitions */
> static const struct eth_dev_ops otx_ep_eth_dev_ops = {
> .dev_configure = otx_ep_dev_configure,
> @@ -399,6 +415,7 @@ static const struct eth_dev_ops otx_ep_eth_dev_ops
> = {
> .dev_infos_get = otx_ep_dev_info_get,
> .stats_get = otx_ep_dev_stats_get,
> .stats_reset = otx_ep_dev_stats_reset,
> + .link_update = otx_ep_dev_link_update,
Ack
> };
>
> static int
> --
> 2.36.1
prev parent reply other threads:[~2022-08-16 5:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-27 9:21 [PATCH v2 0/3] net/octeon_ep: rename driver and add features Sathesh Edara
2022-07-27 9:21 ` [PATCH v2 1/3] net: rename octeon ep PMD Sathesh Edara
2022-08-16 5:32 ` Veerasenareddy Burru
2022-08-19 12:18 ` Jerin Jacob
2022-08-22 9:10 ` [PATCH v3 0/3] net/octeon_ep: rename driver and add features Sathesh Edara
2022-08-22 9:10 ` [PATCH v3 1/3] net/octeontx_ep: rename as octeon_ep Sathesh Edara
2022-08-22 9:10 ` [PATCH v3 2/3] net/octeon_ep: support basic stats Sathesh Edara
2022-08-22 9:10 ` [PATCH v3 3/3] net/octeon_ep: support link status Sathesh Edara
2022-08-23 5:50 ` [EXT] [PATCH v3 0/3] net/octeon_ep: rename driver and add features Veerasenareddy Burru
2022-08-27 12:24 ` Jerin Jacob
2022-07-27 9:21 ` [PATCH v2 2/3] net/octeon_ep: support basic stats Sathesh Edara
2022-08-16 5:34 ` Veerasenareddy Burru
2022-07-27 9:21 ` [PATCH v2 3/3] net/octeon_ep: support link status Sathesh Edara
2022-08-16 5:34 ` Veerasenareddy Burru [this message]
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=BYAPR18MB2423A61FBD26F83F59AA82C1CC6B9@BYAPR18MB2423.namprd18.prod.outlook.com \
--to=vburru@marvell.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=radhac@marvell.com \
--cc=sburla@marvell.com \
--cc=sedara@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).