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 35650A2EFC for ; Mon, 14 Oct 2019 10:44:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6F7431C131; Mon, 14 Oct 2019 10:44:17 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 380301C126 for ; Mon, 14 Oct 2019 10:44:16 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Oct 2019 01:44:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,295,1566889200"; d="scan'208";a="194164901" Received: from dpdk-lrong-srv-03.sh.intel.com ([10.67.119.149]) by fmsmga008.fm.intel.com with ESMTP; 14 Oct 2019 01:44:13 -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: Mon, 14 Oct 2019 16:41:28 +0800 Message-Id: <20191014084128.11791-1-leyi.rong@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] 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" Call _rte_eth_dev_callback_process when link status change. Signed-off-by: Leyi Rong --- 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 dfccef65d..ddcb4848b 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -1293,6 +1293,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 @@ -1320,7 +1321,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