patches for DPDK stable branches
 help / color / mirror / Atom feed
From: dapengx.yu@intel.com
To: qiming.yang@intel.com, wenzhuo.lu@intel.com
Cc: stable@dpdk.org, Dapeng Yu <dapengx.yu@intel.com>
Subject: [dpdk-stable] [PATCH] net/ice: check process type in close operation
Date: Fri,  5 Mar 2021 17:25:09 +0800	[thread overview]
Message-ID: <20210305092509.121938-1-dapengx.yu@intel.com> (raw)

From: Dapeng Yu <dapengx.yu@intel.com>

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 <dapengx.yu@intel.com>
---
 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


                 reply	other threads:[~2021-03-05  9:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210305092509.121938-1-dapengx.yu@intel.com \
    --to=dapengx.yu@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).