From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 07B7BA0561 for ; Fri, 5 Mar 2021 10:25:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D9E1D40147; Fri, 5 Mar 2021 10:25:30 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 7C43E40147 for ; Fri, 5 Mar 2021 10:25:29 +0100 (CET) IronPort-SDR: Llf7yYRNcrHVxwkFHizPfVBmBx6E8BE3EdlguAuoFwDXfWswBI5oVWdFd9v77lqRUbukO6AwGP z7ZZk7hljGkg== X-IronPort-AV: E=McAfee;i="6000,8403,9913"; a="174726612" X-IronPort-AV: E=Sophos;i="5.81,224,1610438400"; d="scan'208";a="174726612" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2021 01:25:28 -0800 IronPort-SDR: hWwJIjhl2YSC+BjtJl9HzoydZo/enAhplCwVWbmfXC8Le3CfM7XB7I1aeoINOah7YU8Ins2AU/ SRwSs0Nfipew== X-IronPort-AV: E=Sophos;i="5.81,224,1610438400"; d="scan'208";a="408226087" Received: from unknown (HELO localhost.localdomain) ([10.240.183.93]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2021 01:25:26 -0800 From: dapengx.yu@intel.com To: qiming.yang@intel.com, wenzhuo.lu@intel.com Cc: stable@dpdk.org, Dapeng Yu Date: Fri, 5 Mar 2021 17:25:09 +0800 Message-Id: <20210305092509.121938-1-dapengx.yu@intel.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH] net/ice: check process type in close operation X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Dapeng Yu The secondary processes are not allowed to release shared resources. Only process-private resources should be freed in a secondary process. So the close operation is just forbidden in a secondary process. Fixes: bd513ece3c40 ("net/ice: release port upon close") Cc: stable@dpdk.org Signed-off-by: Dapeng Yu --- PATCH 19.11.7-rc1 drivers/net/ice/ice_ethdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index c2e659303c..2552bf228c 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2394,6 +2394,9 @@ ice_dev_close(struct rte_eth_dev *dev) struct ice_adapter *ad = ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); + if (rte_eal_process_type() != RTE_PROC_PRIMARY) + return; + /* Since stop will make link down, then the link event will be * triggered, disable the irq firstly to avoid the port_infoe etc * resources deallocation causing the interrupt service thread -- 2.27.0