Skip to content

Commit dc30936

Browse files
reshmapattanThomas Monjalon
authored andcommitted
cryptodev: allow full control from secondary process
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> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
1 parent 525e478 commit dc30936

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

lib/librte_cryptodev/rte_cryptodev.c

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -532,12 +532,6 @@ rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id)
532532
{
533533
struct rte_cryptodev *dev;
534534

535-
/*
536-
* This function is only safe when called from the primary process
537-
* in a multi-process setup
538-
*/
539-
RTE_PROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);
540-
541535
if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
542536
CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
543537
return -EINVAL;
@@ -560,12 +554,6 @@ rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id)
560554
{
561555
struct rte_cryptodev *dev;
562556

563-
/*
564-
* This function is only safe when called from the primary process
565-
* in a multi-process setup
566-
*/
567-
RTE_PROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);
568-
569557
if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
570558
CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
571559
return -EINVAL;
@@ -593,12 +581,6 @@ rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
593581
struct rte_cryptodev *dev;
594582
int diag;
595583

596-
/*
597-
* This function is only safe when called from the primary process
598-
* in a multi-process setup
599-
*/
600-
RTE_PROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);
601-
602584
if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
603585
CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
604586
return -EINVAL;
@@ -635,12 +617,6 @@ rte_cryptodev_start(uint8_t dev_id)
635617

636618
CDEV_LOG_DEBUG("Start dev_id=%" PRIu8, dev_id);
637619

638-
/*
639-
* This function is only safe when called from the primary process
640-
* in a multi-process setup
641-
*/
642-
RTE_PROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);
643-
644620
if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
645621
CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
646622
return -EINVAL;
@@ -670,12 +646,6 @@ rte_cryptodev_stop(uint8_t dev_id)
670646
{
671647
struct rte_cryptodev *dev;
672648

673-
/*
674-
* This function is only safe when called from the primary process
675-
* in a multi-process setup
676-
*/
677-
RTE_PROC_PRIMARY_OR_RET();
678-
679649
if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
680650
CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
681651
return;
@@ -701,12 +671,6 @@ rte_cryptodev_close(uint8_t dev_id)
701671
struct rte_cryptodev *dev;
702672
int retval;
703673

704-
/*
705-
* This function is only safe when called from the primary process
706-
* in a multi-process setup
707-
*/
708-
RTE_PROC_PRIMARY_OR_ERR_RET(-EINVAL);
709-
710674
if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
711675
CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
712676
return -1;
@@ -747,12 +711,6 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
747711
{
748712
struct rte_cryptodev *dev;
749713

750-
/*
751-
* This function is only safe when called from the primary process
752-
* in a multi-process setup
753-
*/
754-
RTE_PROC_PRIMARY_OR_ERR_RET(-E_RTE_SECONDARY);
755-
756714
if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
757715
CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
758716
return -EINVAL;

0 commit comments

Comments
 (0)