From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 529A141CC1; Fri, 17 Feb 2023 17:00:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 369D94161A; Fri, 17 Feb 2023 17:00:46 +0100 (CET) Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) by mails.dpdk.org (Postfix) with ESMTP id CA5D440EE3 for ; Fri, 17 Feb 2023 17:00:44 +0100 (CET) Received: by mail-qv1-f52.google.com with SMTP id qh27so1603714qvb.2 for ; Fri, 17 Feb 2023 08:00:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atomicrules-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=FqQjCru+Men6Cl9eZ9QW3zP7vhgpg2FxEGvPPXFQMLU=; b=FyWwFJn861pL/kav1boeSvvV4u++GPQMoLPlL/OPQyL9XoMh/IfbYPxvkwycq7nNUK O1FzXVZAO6fB0xEJT7tuDa8iarGQSBZte+KNQS6EK/Yg2WfMcTm8XIuYz34MsYKye0MS hNdt2IsZLDvKqRY/fihDZKF3Ufg0ALqaGxHtnApKwuhXHpBDrNhKn0YmtIX/j01tPcJM l+bDmqIBhqFOxovdW3NStd2oqaU3HmygQAY4TEoHNCHwn+EqXXMpdicbaR6xjSJLvR7W dEiZs7X8u9Ymt+qK1t3e0L4Jkxl4FuMjIQDnXXNYUpnG/pflqYKmWa1XQhpYI709SFdw X0ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FqQjCru+Men6Cl9eZ9QW3zP7vhgpg2FxEGvPPXFQMLU=; b=29JmAkyeX71cLWM88gh9nEpSI5LOxBEElk44bOPfhFBpIaOvZaF5K/1et8SepJaU34 wgNdrL96By+0SZtWElKZ7ptAu0MN4xCA55M+7033+NTHXh02124kCaYx79FDzEYalaY0 fov4cqCCqEv/xT0jrfepuBJG89TZrwKQPYIUm9MiFdATu2ykkmv0EIm9xODLLocD4zIL ucBA7yt4HeKCOC/k1rw7dEIi6s6z4bdvspriXb2wmomhpI3RLuPJDzjL+oG6IrtFuk8X Yerrlh7U0CanvsfVLAmq6HDbeOrgYuyIJPZem4V1/4ThDMX1LKhxNI80cYMifGrUsgBp 0OPw== X-Gm-Message-State: AO0yUKVG5cJ9lEL0BrRk2btr8dwi7CbdCfzjt7lbzDBtp0uBckmUUtyk 0r94rBGpUf7gQvfeA7BaeM7PdZ3BVjMO0Viu X-Google-Smtp-Source: AK7set9Z3TZGDXD3YYkceCSmYFT5W/XDdfBUUdMSLSlOKgyEw0AhpHuzd3liENSPV+mcrdZ4d65hoA== X-Received: by 2002:ad4:5fc8:0:b0:56e:a756:919 with SMTP id jq8-20020ad45fc8000000b0056ea7560919mr1233791qvb.47.1676649643334; Fri, 17 Feb 2023 08:00:43 -0800 (PST) Received: from z690.czeck.local (pool-173-48-111-149.bstnma.fios.verizon.net. [173.48.111.149]) by smtp.gmail.com with ESMTPSA id o6-20020a37be06000000b0073b338b4eb1sm3382460qkf.133.2023.02.17.08.00.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 08:00:42 -0800 (PST) From: Ed Czeck To: dev@dpdk.org, ferruh.yigit@amd.com Cc: John Miller , Shepard Siegel , Anatoly Burakov Subject: [PATCH 1/3] net/ark: support secondary process Date: Fri, 17 Feb 2023 11:00:36 -0500 Message-Id: <20230217160039.2487085-1-ed.czeck@atomicrules.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: John Miller disable device configuration for secondary processes Signed-off-by: John Miller --- drivers/net/ark/ark_ethdev.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c index b2995427c8..f96722551e 100644 --- a/drivers/net/ark/ark_ethdev.c +++ b/drivers/net/ark/ark_ethdev.c @@ -147,6 +147,9 @@ eth_ark_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, struct rte_eth_dev *eth_dev; int ret; + if (rte_eal_process_type() == RTE_PROC_SECONDARY) + fprintf(stderr, "ARK probed by secondary process\n"); + eth_dev = rte_eth_dev_pci_allocate(pci_dev, sizeof(struct ark_adapter)); if (eth_dev == NULL) @@ -385,9 +388,11 @@ eth_ark_dev_init(struct rte_eth_dev *dev) 0xcafef00d, ark->sysctrl.t32[4], __func__); /* We are a single function multi-port device. */ - ret = ark_config_device(dev); - if (ret) - return -1; + if (rte_eal_process_type() == RTE_PROC_PRIMARY) { + ret = ark_config_device(dev); + if (ret) + return -1; + } dev->dev_ops = &ark_eth_dev_ops; dev->rx_queue_count = eth_ark_dev_rx_queue_count; -- 2.34.1