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 D5CD3A3168 for ; Wed, 16 Oct 2019 09:08:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 54C7A1E8D0; Wed, 16 Oct 2019 09:08:32 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 944781E8CA for ; Wed, 16 Oct 2019 09:08:30 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2019 00:08:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,303,1566889200"; d="scan'208";a="370715934" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga005.jf.intel.com with ESMTP; 16 Oct 2019 00:08:29 -0700 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 16 Oct 2019 00:08:29 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 16 Oct 2019 00:08:29 -0700 Received: from shsmsx106.ccr.corp.intel.com ([169.254.10.119]) by SHSMSX152.ccr.corp.intel.com ([10.239.6.52]) with mapi id 14.03.0439.000; Wed, 16 Oct 2019 15:08:27 +0800 From: "Rong, Leyi" To: "Ye, Xiaolong" CC: "Lu, Wenzhuo" , "Zhang, Qi Z" , "dev@dpdk.org" Thread-Topic: [PATCH v2] net/ice: invoke callback func when link status change Thread-Index: AQHVg+rSNpLWGdbMYkSp5/seoeYUtKdcS3sAgACKhwA= Date: Wed, 16 Oct 2019 07:08:27 +0000 Message-ID: <47ACC7359E973C41ACB0C2477632BC72522A25B8@SHSMSX106.ccr.corp.intel.com> References: <20191014084128.11791-1-leyi.rong@intel.com> <20191016062446.18001-1-leyi.rong@intel.com> <20191016064118.GP3725@intel.com> In-Reply-To: <20191016064118.GP3725@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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" > -----Original Message----- > From: Ye, Xiaolong > Sent: Wednesday, October 16, 2019 2:41 PM > To: Rong, Leyi > Cc: Lu, Wenzhuo ; Zhang, Qi Z ; > dev@dpdk.org > Subject: Re: [PATCH v2] net/ice: invoke callback func when link status ch= ange >=20 > On 10/16, Leyi Rong wrote: > >Needs to call _rte_eth_dev_callback_process to run registered callbacks > >when link status change. > > >=20 > Is it a must to call _rte_eth_dev_callback_process after link status chan= ge, I see > ice_link_update is also called in ice_dev_start, do we need to apply the = same > change there too? >=20 I think no needs to invoke the same callback in ice_dev_start, as it's not = triggered by event in start process. > Thanks, > Xiaolong >=20 > >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 =3D ice_link_update(dev, 0); > >+ if (!ret) > >+ _rte_eth_dev_callback_process > >+ (dev, RTE_ETH_EVENT_INTR_LSC, NULL); > > } > > #endif > > > >-- > >2.17.1 > >