From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C6CA3A04C5; Tue, 11 Aug 2020 11:11:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3CD581C0B4; Tue, 11 Aug 2020 11:11:00 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id DACB51C0B3 for ; Tue, 11 Aug 2020 11:10:57 +0200 (CEST) IronPort-SDR: 4VxcI1zabqwFC1Enxq92gV6yhABM4tLYbtOBWJCdiB3AteEM2oFlLV7MFV4NUnANddHhdJ05t8 6adwkSa85C9g== X-IronPort-AV: E=McAfee;i="6000,8403,9709"; a="133749315" X-IronPort-AV: E=Sophos;i="5.75,460,1589266800"; d="scan'208";a="133749315" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2020 02:10:56 -0700 IronPort-SDR: oruUWMplSZ5GC5LhiM6ia4yxuitx5Lx/k++qDAng8roCdeXi26k0n/DCWY1NeynenmEYG3/txs EBh7o4YF9t0Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,460,1589266800"; d="scan'208";a="326786221" Received: from intel-npg-odc-srv01.cd.intel.com ([10.240.178.134]) by fmsmga002.fm.intel.com with ESMTP; 11 Aug 2020 02:10:54 -0700 From: SteveX Yang To: qiming.yang@intel.com, beilei.xing@intel.com, jia.guo@intel.com, dev@dpdk.org Cc: SteveX Yang Date: Tue, 11 Aug 2020 09:10:40 +0000 Message-Id: <20200811091040.24602-1-stevex.yang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] net/i40e: i40evf exposes LSC flag to application. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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