From: Markus Theil <markus.theil@tu-ilmenau.de>
To: dev@dpdk.org
Cc: Qiming Yang <qiming.yang@intel.com>,
Qi Zhang <qi.z.zhang@intel.com>,
Markus Theil <markus.theil@secunet.com>
Subject: [PATCH 1/2] net/ice: add nic blinking support
Date: Thu, 1 Sep 2022 23:13:49 +0200 [thread overview]
Message-ID: <20220901211350.87631-1-markus.theil@tu-ilmenau.de> (raw)
From: Markus Theil <markus.theil@secunet.com>
Signed-off-by: Markus Theil <markus.theil@secunet.com>
---
drivers/net/ice/ice_ethdev.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index fc889420c7..f5820d6ccb 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -90,6 +90,8 @@ static int ice_link_update(struct rte_eth_dev *dev,
int wait_to_complete);
static int ice_dev_set_link_up(struct rte_eth_dev *dev);
static int ice_dev_set_link_down(struct rte_eth_dev *dev);
+static int ice_dev_led_on(struct rte_eth_dev *dev);
+static int ice_dev_led_off(struct rte_eth_dev *dev);
static int ice_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
static int ice_vlan_offload_set(struct rte_eth_dev *dev, int mask);
@@ -215,6 +217,8 @@ static const struct eth_dev_ops ice_eth_dev_ops = {
.dev_reset = ice_dev_reset,
.dev_set_link_up = ice_dev_set_link_up,
.dev_set_link_down = ice_dev_set_link_down,
+ .dev_led_on = ice_dev_led_on,
+ .dev_led_off = ice_dev_led_off,
.rx_queue_start = ice_rx_queue_start,
.rx_queue_stop = ice_rx_queue_stop,
.tx_queue_start = ice_tx_queue_start,
@@ -4074,6 +4078,24 @@ ice_dev_set_link_down(struct rte_eth_dev *dev)
return ice_force_phys_link_state(hw, false);
}
+static int
+ice_dev_led_on(struct rte_eth_dev *dev)
+{
+ struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ int status = ice_aq_set_port_id_led(hw->port_info, false, NULL);
+
+ return status == ICE_SUCCESS ? 0 : -ENOTSUP;
+}
+
+static int
+ice_dev_led_off(struct rte_eth_dev *dev)
+{
+ struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ int status = ice_aq_set_port_id_led(hw->port_info, true, NULL);
+
+ return status == ICE_SUCCESS ? 0 : -ENOTSUP;
+}
+
static int
ice_mtu_set(struct rte_eth_dev *dev, uint16_t mtu __rte_unused)
{
--
2.37.3
next reply other threads:[~2022-09-01 21:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 21:13 Markus Theil [this message]
2022-09-01 21:13 ` [PATCH 2/2] net/ice: add basic flow ctrl support for enable/disable/get Markus Theil
2022-09-04 2:06 ` Zhang, Qi Z
2022-09-14 15:49 ` Markus Theil
2022-09-04 2:10 ` [PATCH 1/2] net/ice: add nic blinking support Zhang, Qi Z
2022-09-14 15:50 ` Markus Theil
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=20220901211350.87631-1-markus.theil@tu-ilmenau.de \
--to=markus.theil@tu-ilmenau.de \
--cc=dev@dpdk.org \
--cc=markus.theil@secunet.com \
--cc=qi.z.zhang@intel.com \
--cc=qiming.yang@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).