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 E9B3AA3168 for ; Wed, 16 Oct 2019 08:27:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A56891E54C; Wed, 16 Oct 2019 08:27:36 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id A4A3A1D179 for ; Wed, 16 Oct 2019 08:27:35 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Oct 2019 23:27:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,302,1566889200"; d="scan'208";a="195509486" Received: from dpdk-lrong-srv-03.sh.intel.com ([10.67.119.149]) by fmsmga007.fm.intel.com with ESMTP; 15 Oct 2019 23:27:32 -0700 From: Leyi Rong To: wenzhuo.lu@intel.com, qi.z.zhang@intel.com, xiaolong.ye@intel.com Cc: dev@dpdk.org, Leyi Rong Date: Wed, 16 Oct 2019 14:24:46 +0800 Message-Id: <20191016062446.18001-1-leyi.rong@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191014084128.11791-1-leyi.rong@intel.com> References: <20191014084128.11791-1-leyi.rong@intel.com> Subject: [dpdk-dev] [PATCH v2] net/ice: invoke callback func when link status change 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" Needs to call _rte_eth_dev_callback_process to run registered callbacks when link status change. Fixes: cf911d90e366 ("net/ice: support link update") Signed-off-by: Leyi Rong --- v2: - adds fixline in commit log. --- drivers/net/ice/ice_ethdev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 5567beb55..092f10d47 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -1303,6 +1303,7 @@ ice_interrupt_handler(void *param) uint8_t pf_num; uint8_t event; uint16_t queue; + int ret; #ifdef ICE_LSE_SPT uint32_t int_fw_ctl; #endif @@ -1330,7 +1331,10 @@ ice_interrupt_handler(void *param) #else if (oicr & PFINT_OICR_LINK_STAT_CHANGE_M) { PMD_DRV_LOG(INFO, "OICR: link state change event"); - ice_link_update(dev, 0); + ret = ice_link_update(dev, 0); + if (!ret) + _rte_eth_dev_callback_process + (dev, RTE_ETH_EVENT_INTR_LSC, NULL); } #endif -- 2.17.1