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 34769A04D9; Tue, 11 Aug 2020 11:05:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 71F0F1C0D2; Tue, 11 Aug 2020 11:05:14 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 96BE0A3 for ; Tue, 11 Aug 2020 11:05:12 +0200 (CEST) IronPort-SDR: w0mAkdCD0or807E8Si3vq0+2Ti/cFajixqD9POMRMJKUNJZoQ8zo97BOh97iRD1WlgVt1Xm/4v XACBlO/3rz8g== X-IronPort-AV: E=McAfee;i="6000,8403,9709"; a="153671880" X-IronPort-AV: E=Sophos;i="5.75,460,1589266800"; d="scan'208";a="153671880" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2020 02:05:09 -0700 IronPort-SDR: Fqm4zwGdsEEvGzIstEKJ4e0bCNzsLXC87yEGFlc/ly9WmKOvXcl/l3pynxnHQwWiH31S/FU6m6 925q1O70gOAA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,460,1589266800"; d="scan'208";a="368899422" Received: from intel-npg-odc-srv01.cd.intel.com ([10.240.178.134]) by orsmga001.jf.intel.com with ESMTP; 11 Aug 2020 02:05:07 -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:04:41 +0000 Message-Id: <20200811090441.24372-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 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 --- 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