DPDK patches and discussions
 help / color / mirror / Atom feed
From: Reshma Pattan <reshma.pattan@intel.com>
To: konstantin.ananyev@intel.com, declan.doherty@intel.com,
	thomas.monjalon@6wind.com
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v3 2/3] librte_cryptodev: remove RTE_PROC_PRIMARY_OR_RET
Date: Tue,  5 Jan 2016 16:34:57 +0000	[thread overview]
Message-ID: <1452011698-27354-3-git-send-email-reshma.pattan@intel.com> (raw)
In-Reply-To: <1452011698-27354-1-git-send-email-reshma.pattan@intel.com>

Macro RTE_PROC_PRIMARY_OR_ERR_RET blocking the secondary process from API usage.
API access should be given to both secondary and primary.

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
---
 lib/librte_cryptodev/rte_cryptodev.c |   42 ----------------------------------
 1 files changed, 0 insertions(+), 42 deletions(-)

diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index f09f67e..207e92c 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -532,12 +532,6 @@ rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id)
 {
 	struct rte_cryptodev *dev;
 
-	/*
-	 * This function is only safe when called from the primary process
-	 * in a multi-process setup
-	 */
-	RTE_PROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);
-
 	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
@@ -560,12 +554,6 @@ rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id)
 {
 	struct rte_cryptodev *dev;
 
-	/*
-	 * This function is only safe when called from the primary process
-	 * in a multi-process setup
-	 */
-	RTE_PROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);
-
 	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
@@ -593,12 +581,6 @@ rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
 	struct rte_cryptodev *dev;
 	int diag;
 
-	/*
-	 * This function is only safe when called from the primary process
-	 * in a multi-process setup
-	 */
-	RTE_PROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);
-
 	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return (-EINVAL);
@@ -635,12 +617,6 @@ rte_cryptodev_start(uint8_t dev_id)
 
 	CDEV_LOG_DEBUG("Start dev_id=%" PRIu8, dev_id);
 
-	/*
-	 * This function is only safe when called from the primary process
-	 * in a multi-process setup
-	 */
-	RTE_PROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);
-
 	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return (-EINVAL);
@@ -670,12 +646,6 @@ rte_cryptodev_stop(uint8_t dev_id)
 {
 	struct rte_cryptodev *dev;
 
-	/*
-	 * This function is only safe when called from the primary process
-	 * in a multi-process setup
-	 */
-	RTE_PROC_PRIMARY_OR_RET();
-
 	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return;
@@ -701,12 +671,6 @@ rte_cryptodev_close(uint8_t dev_id)
 	struct rte_cryptodev *dev;
 	int retval;
 
-	/*
-	 * This function is only safe when called from the primary process
-	 * in a multi-process setup
-	 */
-	RTE_PROC_PRIMARY_OR_ERR_RET(-EINVAL);
-
 	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -1;
@@ -747,12 +711,6 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 {
 	struct rte_cryptodev *dev;
 
-	/*
-	 * This function is only safe when called from the primary process
-	 * in a multi-process setup
-	 */
-	RTE_PROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);
-
 	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return (-EINVAL);
-- 
1.7.4.1

  parent reply	other threads:[~2016-01-05 16:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-23 12:19 [dpdk-dev] [PATCH 1/3] librte_ether: remove RTE_PROC_PRIMARY_OR_ERR_RET and RTE_PROC_PRIMARY_OR_RET Reshma Pattan
2015-12-23 12:19 ` [dpdk-dev] [PATCH 2/3] librte_cryptodev: remove RTE_PROC_PRIMARY_OR_RET Reshma Pattan
2015-12-23 12:19 ` [dpdk-dev] [PATCH 3/3] librte_ether: fix rte_eth_dev_configure Reshma Pattan
2015-12-24  8:01 ` [dpdk-dev] [PATCH 1/3] librte_ether: remove RTE_PROC_PRIMARY_OR_ERR_RET and RTE_PROC_PRIMARY_OR_RET Qiu, Michael
2015-12-24 17:40   ` Pattan, Reshma
2015-12-28  4:40     ` Qiu, Michael
2016-01-05 10:58 ` [dpdk-dev] [PATCH v2 " Reshma Pattan
2016-01-05 16:34 ` [dpdk-dev] [PATCH v3 0/3] fix RTE_PROC_PRIMARY_OR_ERR_RET RTE_PROC_PRIMARY_OR_RET Reshma Pattan
2016-01-05 16:34   ` [dpdk-dev] [PATCH v3 1/3] librte_ether: remove RTE_PROC_PRIMARY_OR_ERR_RET and RTE_PROC_PRIMARY_OR_RET Reshma Pattan
2016-01-05 16:34   ` Reshma Pattan [this message]
2016-01-05 16:34   ` [dpdk-dev] [PATCH v3 3/3] librte_ether: fix rte_eth_dev_configure Reshma Pattan
2016-01-06 13:41   ` [dpdk-dev] [PATCH v3 0/3] fix RTE_PROC_PRIMARY_OR_ERR_RET RTE_PROC_PRIMARY_OR_RET Ananyev, Konstantin
2016-02-24 18:25     ` Thomas Monjalon
2016-02-05  9:43   ` Thomas Monjalon
2016-02-05 14:58     ` Pattan, Reshma
2016-02-05 15:05       ` Thomas Monjalon

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=1452011698-27354-3-git-send-email-reshma.pattan@intel.com \
    --to=reshma.pattan@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=thomas.monjalon@6wind.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).