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 C9255A04A5; Thu, 18 Jun 2020 08:48:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D5D441B951; Thu, 18 Jun 2020 08:48:58 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 4569B54AE for ; Thu, 18 Jun 2020 08:48:55 +0200 (CEST) IronPort-SDR: sV+OwyqtHecuKDoArpiBabCvRsW6h/0dMuGKITI6Y9brXx6pG7+/zNow11DPHXe2zddsDP7Y9m GbGNeODTGx4Q== X-IronPort-AV: E=McAfee;i="6000,8403,9655"; a="203954411" X-IronPort-AV: E=Sophos;i="5.73,525,1583222400"; d="scan'208";a="203954411" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2020 23:48:54 -0700 IronPort-SDR: BXaib/SDpFUU2D3ONhH6lxgdBMZoxSPx7xppPYPNBJOx/LJEu26Iu5xeH+VdqqLYqHlUFOm7FB H1OvUpJk7SHg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,525,1583222400"; d="scan'208";a="309020854" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga008.jf.intel.com with ESMTP; 17 Jun 2020 23:48:54 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 17 Jun 2020 23:48:54 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 17 Jun 2020 23:48:53 -0700 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.50) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 17 Jun 2020 23:48:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HqjkA3j6ASeL9sQul2MiijSWHa3I+TJcQDBHY0p80CtfGhMXWgmMkRfbieVZZfo4sYb5ccNy8x+6y1FiNJc2AGnrTzHGwjpjYeRay1MdS90biXs1vHGhkoAKKk4MiY89UZ6gmCovjkty+KbifDYTnVZVbDshAXGNkHQvnurXA36PovphdCa21tukeO4Q8SB/hKzV7WwJUEgGl+ty2ERaiba9c2QPWHQR4LrNVT60GVxQg4JgIMCTvi/hXcybnYGAFLpUk/awx8BMUnYbpca7IUC6r60kPMQs3W7SeSGkUqz2l5719lnWSyUYRaJPhpCFoeOvuaNRGDjOAQOTclYhIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qDoufcjEwNxpabVlKkrCSjr1fy8H2AOpBl081QSOCok=; b=gBS5YrQw3Gvc4ma0XEoS8mpHJBZ0dfaba2MT/iGXMt5j/uSrlS4pYn/t0e+vj2sGCf1IN/nm+ilaxqQtZ3SdGFmB9V8z9c1RfmNUCszfR4UFkuwyopsSQJ2GnFJA9eeo+lNOWSnARUb4JBAnEfWFbfEZ9m83A8DZW4qrmpbbaaQhTZjEFTo7qLZWYcQbsAOz/HbqSGbCDWbUPAqHiKXjaLOQDk/Tt42a8eIYqPoiTacLVET6Jq3dZVVWYo5IAy6mkZrCLz8sSjsjMOB6ZGYJZV7g4vWyBJ3SpVs7aa0+/F1VZ73TaWiP1anU3hlWD43SRpfVyoNDsDPoJjBi9cDKag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qDoufcjEwNxpabVlKkrCSjr1fy8H2AOpBl081QSOCok=; b=E9g6IauKn5QsK//akcdSj/sI75SOALd87uzP/ysibgFeh9VVazd9Mw3fbn5x8qHcz7XF07z7ITWnYXosG6lEoDb7Rv6ZI1aviiVkJ3YpT2N39DhkU4FUMGA9FQMFmjq4Va1OYOkUnxv7u6RbIp5ZCFb6nCOM6wkJzawIKmR9awQ= Received: from BN6PR11MB0017.namprd11.prod.outlook.com (2603:10b6:405:6c::34) by BN6PR1101MB2275.namprd11.prod.outlook.com (2603:10b6:405:54::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Thu, 18 Jun 2020 06:48:52 +0000 Received: from BN6PR11MB0017.namprd11.prod.outlook.com ([fe80::c8eb:f4c9:5b58:3120]) by BN6PR11MB0017.namprd11.prod.outlook.com ([fe80::c8eb:f4c9:5b58:3120%6]) with mapi id 15.20.3088.025; Thu, 18 Jun 2020 06:48:52 +0000 From: "Yang, Qiming" To: "Xu, Ting" , "dev@dpdk.org" CC: "Zhang, Qi Z" , "Wu, Jingjing" , "Xing, Beilei" , "Kovacevic, Marko" , "Mcnamara, John" , "Ye, Xiaolong" Thread-Topic: [PATCH v3 05/12] net/ice: add stop flag for device start / stop Thread-Index: AQHWQ5iV97b+plvGfU+AJ5MVJh9g3qjd8TnA Date: Thu, 18 Jun 2020 06:48:51 +0000 Message-ID: References: <20200616124112.108014-1-ting.xu@intel.com> <20200616124112.108014-6-ting.xu@intel.com> In-Reply-To: <20200616124112.108014-6-ting.xu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 965cea4d-217a-4c40-5dc3-08d81353a9b7 x-ms-traffictypediagnostic: BN6PR1101MB2275: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:466; x-forefront-prvs: 0438F90F17 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0+Hsnj/BGX4jrenKZljxHumFjCIhsx6JHsAdN2yPhp9O9OWR/htZ6L/O0M4+UaRMkmOy1PXX6CawDXsFh5Ounkbp7C7z1qtMraepV/a1YTVg9ITExgMPWhRwCy3esk9fv5WwQGvrb7zVpRIv+mQ2aaD6KbJ6J6rfPPgDR++qdsooj/RBOiO2Rirw8tCmDjGY2bt4ak3kJu73/zLCGRzCgsklaVNK2GuMSg1qpS+QlrISeYmag7ullyiNeZtlgBqTQk28KPCHdRaOpnJrneU6FhPhsAC0xC8cjFW+QxdGHm6ReexCFZWqBwrCr5tU/RE7ji3p9TvLKhC2RxYBUjA0pw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB0017.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(136003)(346002)(376002)(396003)(39860400002)(110136005)(5660300002)(2906002)(478600001)(8936002)(71200400001)(52536014)(4326008)(55016002)(9686003)(8676002)(107886003)(316002)(83380400001)(186003)(33656002)(66946007)(66476007)(66556008)(64756008)(66446008)(76116006)(7696005)(26005)(6506007)(53546011)(86362001)(54906003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: vpfLpi+kt52jtT7DJYTBBRZeCKI2Lk9wHOga2o2Jmir3SNEO3mczXTcf6LKyiXK4Dl/tFUsMR5DDsk67fsp/q/TtntBBBxfdJ3O3a7Wkt/gm4HQ09rD010Mjmhq2yAhCJDjtE2Xg8n5AXTYJiGernaFMFtucNpOSO2x336RWF+jUof+kn9TQ1mYdL8zP07UOpXXK6srzO5zLWIdD1U7yLxMYqzYANogAZ3djZIF2NwK4ojkpRidfN5um7CrCnTPWXlVrQ4gWftTOsDXiBB9H7LXaFv8FXJI77c95tvt6aLliWZKwE0KtDs7PYmx/CTWDb2TMVys7kCTO/hojXea2chhpl76PThBxftN64/IFITcE1kTceyAXyRIjBND1arK6Kh2O53ibRnQXl5KiUhPxwZA2OARzFoo4K9l/ni2lu31xy9SKyyA8ejgwuun3g8pw7jy5Jl27fzt7UttPRFugS6zBdAfGtet/VYC68lMgR5g= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 965cea4d-217a-4c40-5dc3-08d81353a9b7 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jun 2020 06:48:52.0716 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: nb0CTmS9sZJEb9Y/OgZLldL0IbvFP8llcCnx+AJjj7SQJJrsoPdEv/VKaVtHMHfVXMrUhpSkkL9oGBCCwJjLkw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1101MB2275 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 05/12] net/ice: add stop flag for device start / stop 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: Xu, Ting > Sent: Tuesday, June 16, 2020 20:41 > To: dev@dpdk.org > Cc: Zhang, Qi Z ; Yang, Qiming > ; Wu, Jingjing ; Xing, Beil= ei > ; Kovacevic, Marko ; > Mcnamara, John ; Ye, Xiaolong > > Subject: [PATCH v3 05/12] net/ice: add stop flag for device start / stop >=20 > From: Qi Zhang >=20 > Add stop flag for DCF device start and stop. >=20 > Signed-off-by: Qi Zhang > Signed-off-by: Ting Xu > --- > drivers/net/ice/ice_dcf_ethdev.c | 12 ++++++++++++ > drivers/net/ice/ice_dcf_parent.c | 1 + > 2 files changed, 13 insertions(+) >=20 > diff --git a/drivers/net/ice/ice_dcf_ethdev.c > b/drivers/net/ice/ice_dcf_ethdev.c > index 0c3013228..ff2cab054 100644 > --- a/drivers/net/ice/ice_dcf_ethdev.c > +++ b/drivers/net/ice/ice_dcf_ethdev.c > @@ -45,6 +45,11 @@ ice_dcf_xmit_pkts(__rte_unused void *tx_queue, > static int ice_dcf_dev_start(struct rte_eth_dev *dev) { > + struct ice_dcf_adapter *dcf_ad =3D dev->data->dev_private; > + struct ice_adapter *ad =3D &dcf_ad->parent; > + > + ad->pf.adapter_stopped =3D 0; > + > dev->data->dev_link.link_status =3D ETH_LINK_UP; >=20 > return 0; > @@ -53,7 +58,14 @@ ice_dcf_dev_start(struct rte_eth_dev *dev) static > void ice_dcf_dev_stop(struct rte_eth_dev *dev) { > + struct ice_dcf_adapter *dcf_ad =3D dev->data->dev_private; > + struct ice_adapter *ad =3D &dcf_ad->parent; > + > + if (ad->pf.adapter_stopped =3D=3D 1) We can add logs like 'port already stopped' > + return; > + > dev->data->dev_link.link_status =3D ETH_LINK_DOWN; > + ad->pf.adapter_stopped =3D 1; > } >=20 > static int > diff --git a/drivers/net/ice/ice_dcf_parent.c > b/drivers/net/ice/ice_dcf_parent.c > index 322a5273f..c5dfdd36e 100644 > --- a/drivers/net/ice/ice_dcf_parent.c > +++ b/drivers/net/ice/ice_dcf_parent.c > @@ -341,6 +341,7 @@ ice_dcf_init_parent_adapter(struct rte_eth_dev > *eth_dev) > if (!parent_adapter->pf.main_vsi) > return -ENOMEM; > parent_adapter->pf.main_vsi->adapter =3D parent_adapter; > + parent_adapter->pf.adapter_stopped =3D 1; >=20 > parent_hw->back =3D parent_adapter; > parent_hw->mac_type =3D ICE_MAC_GENERIC; > -- > 2.17.1