From: Qiming Yang <qiming.yang@intel.com>
To: dev@dpdk.org
Cc: qi.z.zhang@intel.com, Qiming Yang <qiming.yang@intel.com>
Subject: [PATCH] net/ice: check process type in reset operation
Date: Mon, 26 Sep 2022 13:44:05 +0000 [thread overview]
Message-ID: <20220926134405.304919-1-qiming.yang@intel.com> (raw)
The secondary processes are not allowed to release shared resources.
so the stop and reset operation are forbidden in a secondary process.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
---
drivers/net/ice/ice_ethdev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index cf63ce1f32..d855e9ebe1 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2504,6 +2504,9 @@ ice_dev_stop(struct rte_eth_dev *dev)
struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
uint16_t i;
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return 0;
+
/* avoid stopping again */
if (pf->adapter_stopped)
return 0;
@@ -3742,6 +3745,9 @@ ice_dev_reset(struct rte_eth_dev *dev)
{
int ret;
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return -ENOTSUP;
+
if (dev->data->sriov.active)
return -ENOTSUP;
--
2.25.1
next reply other threads:[~2022-09-26 13:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-26 13:44 Qiming Yang [this message]
2022-09-27 2:07 ` [PATCH] net/ice: check process type in reset operation Zhang, Qi Z
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=20220926134405.304919-1-qiming.yang@intel.com \
--to=qiming.yang@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.