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 4AF70A04B7; Tue, 13 Oct 2020 14:46:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 90B051BDFD; Tue, 13 Oct 2020 14:45:59 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 4CF491BD17 for ; Tue, 13 Oct 2020 14:45:57 +0200 (CEST) IronPort-SDR: j0LtV0QjjNZPRhQOOIG9h7dcJ0eJ8kL3LWFDDQubUbwrtBlimSMaS9C4fo8jZ3YTrlsQ7+J8Eg fMn19b3Zr18A== X-IronPort-AV: E=McAfee;i="6000,8403,9772"; a="250596025" X-IronPort-AV: E=Sophos;i="5.77,370,1596524400"; d="scan'208";a="250596025" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2020 05:45:54 -0700 IronPort-SDR: KJ0wowjAkQhrwlyuMKTE+vREXtcLhQkepCW4f2zqQsZTY79fEZ7Le802mbocm/1kXD/58F1js/ Pa305x2TpBdg== X-IronPort-AV: E=Sophos;i="5.77,370,1596524400"; d="scan'208";a="530381933" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.214.64]) ([10.213.214.64]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2020 05:45:49 -0700 To: Thomas Monjalon , dev@dpdk.org, Andrew Rybchenko References: <20200913220711.3768597-1-thomas@monjalon.net> <20201013100634.2482593-1-thomas@monjalon.net> <20201013100634.2482593-2-thomas@monjalon.net> From: Ferruh Yigit Cc: Steven Webster , Matt Peters , Somalapuram Amaranath , Rasesh Mody , Shahed Shaikh , Rahul Lakkireddy , Hemant Agrawal , Sachin Saxena , John Daley , Hyong Youb Kim , Qiming Yang , Qi Zhang , Alfredo Cardigliano , Rosen Xu , Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko , Liron Himi , Heinrich Kuhn , Harman Kalra , Jerin Jacob , Nithin Dabilpuram , Kiran Kumar K , Andrew Rybchenko Message-ID: <500095bc-470e-1bce-05d2-6fa67437dddd@intel.com> Date: Tue, 13 Oct 2020 13:45:45 +0100 MIME-Version: 1.0 In-Reply-To: <20201013100634.2482593-2-thomas@monjalon.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v5 1/3] ethdev: remove forcing stopped state upon close 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/13/2020 11:06 AM, Thomas Monjalon wrote: > When closing a port, it is supposed to be already stopped, > and marked as such with "dev_started" state zeroed by the stop API. > > Resetting "dev_started" before calling the driver close operation > was hiding the case of not properly stopped port being closed. > The flag "dev_started" is not changed anymore in "rte_eth_dev_close()". > > In case the "dev_stop" function is called from "dev_close", > bypassing "rte_eth_dev_stop()" API, > the "dev_started" state must be explicitly reset in the PMD > in order to keep the same behaviour. > > Signed-off-by: Thomas Monjalon > Acked-by: Stephen Hemminger > Reviewed-by: Andrew Rybchenko > --- > drivers/net/ark/ark_ethdev.c | 1 + > drivers/net/atlantic/atl_ethdev.c | 1 + > drivers/net/dpaa/dpaa_ethdev.c | 1 + > drivers/net/e1000/em_ethdev.c | 2 ++ > drivers/net/e1000/igb_ethdev.c | 1 + > drivers/net/ena/ena_ethdev.c | 1 + > drivers/net/enetc/enetc_ethdev.c | 1 + > drivers/net/fm10k/fm10k_ethdev.c | 1 + > drivers/net/hinic/hinic_pmd_ethdev.c | 2 ++ > drivers/net/hns3/hns3_ethdev.c | 1 + > drivers/net/hns3/hns3_ethdev_vf.c | 1 + > drivers/net/i40e/i40e_ethdev.c | 1 + > drivers/net/i40e/i40e_ethdev_vf.c | 2 +- > drivers/net/iavf/iavf_ethdev.c | 1 + > drivers/net/ice/ice_ethdev.c | 1 + > drivers/net/igc/igc_ethdev.c | 1 + > drivers/net/ixgbe/ixgbe_ethdev.c | 1 + > drivers/net/kni/rte_eth_kni.c | 1 + > drivers/net/liquidio/lio_ethdev.c | 1 + > drivers/net/mvneta/mvneta_ethdev.c | 2 ++ > drivers/net/netvsc/hn_ethdev.c | 1 + > drivers/net/nfb/nfb_ethdev.c | 2 ++ > drivers/net/pfe/pfe_ethdev.c | 2 ++ > drivers/net/qede/qede_ethdev.c | 1 + > drivers/net/ring/rte_eth_ring.c | 1 + > drivers/net/szedata2/rte_eth_szedata2.c | 2 ++ > drivers/net/thunderx/nicvf_ethdev.c | 1 + > drivers/net/vhost/rte_eth_vhost.c | 1 + > drivers/net/virtio/virtio_ethdev.c | 1 + > drivers/net/vmxnet3/vmxnet3_ethdev.c | 1 + > lib/librte_ethdev/rte_ethdev.c | 1 - > 31 files changed, 36 insertions(+), 2 deletions(-) Following non-virtual PMDs doesn't call 'dev_stop()' from 'dev_close()', maintainers of the PMDs cc'ed. avp axgbe bnx2x cxgbe dpaa2 enic ice_dcf ionic ipn3ke mlx4 mlx5 mvpp2 nfp octeontx octeontx2 sfc Can you please double check for your driver: 1) Device stopped properly before it has been closed? 2) The device stopped state ('dev->data->dev_started') is correct if device closed without explicitly stopped first. Thanks, ferruh