DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v2] net/ice: add nic blinking support
@ 2022-09-14 15:57 Markus Theil
  2022-09-20  0:41 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Theil @ 2022-09-14 15:57 UTC (permalink / raw)
  To: dev; +Cc: Qiming Yang, Qi Zhang, Markus Theil

From: Markus Theil <markus.theil@secunet.com>

Signed-off-by: Markus Theil <markus.theil@secunet.com>
---
v2: add LED feature in ice.ini

 doc/guides/nics/features/ice.ini |  1 +
 drivers/net/ice/ice_ethdev.c     | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/doc/guides/nics/features/ice.ini b/doc/guides/nics/features/ice.ini
index fe1e81302c..fd639dd1ec 100644
--- a/doc/guides/nics/features/ice.ini
+++ b/doc/guides/nics/features/ice.ini
@@ -47,6 +47,7 @@ Linux                = Y
 Windows              = Y
 x86-32               = Y
 x86-64               = Y
+LED                  = Y
 
 [rte_flow items]
 ah                   = Y
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 50fe23fdc4..dc47a9d8b3 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [PATCH v2] net/ice: add nic blinking support
  2022-09-14 15:57 [PATCH v2] net/ice: add nic blinking support Markus Theil
@ 2022-09-20  0:41 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2022-09-20  0:41 UTC (permalink / raw)
  To: Markus Theil, dev; +Cc: Yang, Qiming, Theil, Markus



> -----Original Message-----
> From: Markus Theil <markus.theil@tu-ilmenau.de>
> Sent: Wednesday, September 14, 2022 11:57 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Theil, Markus <markus.theil@secunet.com>
> Subject: [PATCH v2] net/ice: add nic blinking support
> 
> From: Markus Theil <markus.theil@secunet.com>
> 
> Signed-off-by: Markus Theil <markus.theil@secunet.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-20  0:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-14 15:57 [PATCH v2] net/ice: add nic blinking support Markus Theil
2022-09-20  0:41 ` Zhang, Qi Z

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).