DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: i40evf exposes LSC flag to application.
@ 2020-08-11  9:10 SteveX Yang
  2020-08-31  2:01 ` Zhang, Qi Z
  2020-09-03  7:19 ` [dpdk-dev] [PATCH v2] " SteveX Yang
  0 siblings, 2 replies; 5+ messages in thread
From: SteveX Yang @ 2020-08-11  9:10 UTC (permalink / raw)
  To: qiming.yang, beilei.xing, jia.guo, dev; +Cc: SteveX Yang

When PF event VIRTCHNL_EVENT_LINK_CHANGE received, i40evf need update
the link status and issue RTE_ETH_EVENT_INTR_LSC via
_rte_eth_dev_callback_process().

Signed-off-by: SteveX Yang <stevex.yang@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 69cab8e73..a0a9268e5 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1381,13 +1381,16 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,
 	switch (pf_msg->event) {
 	case VIRTCHNL_EVENT_RESET_IMPENDING:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
-					      NULL);
+		_rte_eth_dev_callback_process(dev,
+				RTE_ETH_EVENT_INTR_RESET, NULL);
 		break;
 	case VIRTCHNL_EVENT_LINK_CHANGE:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_LINK_CHANGE event");
 		vf->link_up = pf_msg->event_data.link_event.link_status;
 		vf->link_speed = pf_msg->event_data.link_event.link_speed;
+		i40evf_dev_link_update(dev, 0);
+		_rte_eth_dev_callback_process(dev,
+				RTE_ETH_EVENT_INTR_LSC, NULL);
 		break;
 	case VIRTCHNL_EVENT_PF_DRIVER_CLOSE:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_PF_DRIVER_CLOSE event");
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH] net/i40e: i40evf exposes LSC flag to application.
@ 2020-08-11  9:04 SteveX Yang
  0 siblings, 0 replies; 5+ messages in thread
From: SteveX Yang @ 2020-08-11  9:04 UTC (permalink / raw)
  To: qiming.yang, beilei.xing, jia.guo, dev; +Cc: SteveX Yang

When PF event VIRTCHNL_EVENT_LINK_CHANGE recevied, i40evf need update
the link status, and issue RTE_ETH_EVENT_INTR_LSC via
_rte_eth_dev_callback_process().

Signed-off-by: SteveX Yang <stevex.yang@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 69cab8e73..a0a9268e5 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1381,13 +1381,16 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,
 	switch (pf_msg->event) {
 	case VIRTCHNL_EVENT_RESET_IMPENDING:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
-					      NULL);
+		_rte_eth_dev_callback_process(dev,
+				RTE_ETH_EVENT_INTR_RESET, NULL);
 		break;
 	case VIRTCHNL_EVENT_LINK_CHANGE:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_LINK_CHANGE event");
 		vf->link_up = pf_msg->event_data.link_event.link_status;
 		vf->link_speed = pf_msg->event_data.link_event.link_speed;
+		i40evf_dev_link_update(dev, 0);
+		_rte_eth_dev_callback_process(dev,
+				RTE_ETH_EVENT_INTR_LSC, NULL);
 		break;
 	case VIRTCHNL_EVENT_PF_DRIVER_CLOSE:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_PF_DRIVER_CLOSE event");
-- 
2.17.1


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

end of thread, other threads:[~2020-09-03 14:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11  9:10 [dpdk-dev] [PATCH] net/i40e: i40evf exposes LSC flag to application SteveX Yang
2020-08-31  2:01 ` Zhang, Qi Z
2020-09-03  7:19 ` [dpdk-dev] [PATCH v2] " SteveX Yang
2020-09-03 14:13   ` Zhang, Qi Z
  -- strict thread matches above, loose matches on Subject: below --
2020-08-11  9:04 [dpdk-dev] [PATCH] " SteveX Yang

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