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 2A831A3168 for ; Wed, 16 Oct 2019 08:44:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BF66D1E8BC; Wed, 16 Oct 2019 08:44:03 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 476B41DFEE for ; Wed, 16 Oct 2019 08:44:02 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Oct 2019 23:44:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,302,1566889200"; d="scan'208";a="208347406" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by fmsmga001.fm.intel.com with ESMTP; 15 Oct 2019 23:44:00 -0700 Date: Wed, 16 Oct 2019 14:41:18 +0800 From: Ye Xiaolong To: Leyi Rong Cc: wenzhuo.lu@intel.com, qi.z.zhang@intel.com, dev@dpdk.org Message-ID: <20191016064118.GP3725@intel.com> References: <20191014084128.11791-1-leyi.rong@intel.com> <20191016062446.18001-1-leyi.rong@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191016062446.18001-1-leyi.rong@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [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" On 10/16, Leyi Rong wrote: >Needs to call _rte_eth_dev_callback_process to run registered >callbacks when link status change. > Is it a must to call _rte_eth_dev_callback_process after link status change, I see ice_link_update is also called in ice_dev_start, do we need to apply the same change there too? Thanks, Xiaolong >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 >