On Tue, 19 Apr 2022 22:27:32 +0200
Michał Krawczyk <m...@semihalf.com> wrote:

> Thanks Stephen, indeed the issue reproduces in the secondary process.
> 
> Basically ENA v2.2.1 is not MP aware, meaning it cannot be used safely
> from the secondary process. The main obstacle is the admin queue which
> is used for processing the hardware requests which can be used safely
> only from the primary process. It's not strictly a bug, as we weren't
> exposing 'MP Awareness' in the PMD features list, it's more like a
> lack of proper MP support.
> 
> The latest ENA PMD release should be MP safe. We currently don't have
> PMD backport ready for the older LTS release (but we're planning to do
> so for ENA v2.6.0 on the amzn-drivers repository:
> https://github.com/amzn/amzn-drivers/tree/master/userspace/dpdk). 

I wish that ENA did not have its own versioning scheme.
Driver versions are meaningful only to the driver writer/vendor, they
don't help the end user.

Since backporting is not part of stable process. I suggest doing what
XDP did for 21.11 and earlier releases.

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 634c97acf60d..3778349f3fe9 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -3212,6 +3212,12 @@ static int ena_rx_queue_intr_disable(struct rte_eth_dev 
*dev,
 static int eth_ena_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
        struct rte_pci_device *pci_dev)
 {
+       if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
+               PMD_INIT_LOG(ERR,
+                           "Ena PMD does not support secondary processes\n");
+               return -ENOTSUP;
+       }
+
        return rte_eth_dev_pci_generic_probe(pci_dev,
                sizeof(struct ena_adapter), eth_ena_dev_init);
 }

Reply via email to