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 C05D241CC1; Fri, 17 Feb 2023 16:48:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5835340EE3; Fri, 17 Feb 2023 16:48:08 +0100 (CET) Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) by mails.dpdk.org (Postfix) with ESMTP id D1EA440EE1 for ; Fri, 17 Feb 2023 16:48:07 +0100 (CET) Received: by mail-qv1-f42.google.com with SMTP id fn4so776000qvb.12 for ; Fri, 17 Feb 2023 07:48:07 -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=1uxxPHrQ1GROKOV4IDYpg97hIWELgAIB/j29GttXC1S9c8J0j8NowwdSE4OO2+2g6P z8Ux11P1bOxlQUjv8lTHSXQ+TZ7+52ThbeHkmAhmYNa8/gSonDafVLCFBrlIZEG/lLa0 F5eKHH3+VRAJpWQquGe8jRxFIV2RPj1rbOQYL1ycr0xJ+zM0aVvJRYdPJqpWuaZtils8 50L98+2oYJrGJDXiNYzAVATRHBJWfwJ4/2H5OMqDfJBvvl1523h+/0NTpHbcE8OxjAjg woKuAmXcsFoEd+Q+evHEYyv7P4t4HZkMzgA5Qe0gYSX9P/Y5K7bFAgosC+hAqL5edehP DZUA== 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=rj4ZUq9tVZFmzP5taZoRo0TfuIl539fke/hWjdsmNRHmiGNTfNpmp/yat/H2k4JJGc uyzBJUtVkWNLQNqqVSimUC4uSiSiqxJt/Gaw4tp1Jfazn2EaoHXuHjCESyqyupG2GM3r 1CAc+0lRY0eheV2Pqy0alkk42YEUjDyIW+JlnV1czspdWwGQ4G9lJ9TlIdBaysfvr8Nr axRbPmRq3LsOREYGjamC229DywFUH4IRXH5Ke4gufUpTkz3mcBTlJRRUDkamW+Phe2+N 0jfqQUV/2tO3GLwNaOvHf+x/GErW4W4nIdKUqMMg1ORuJYPYX9Y1cudAYZ8b+Lb8uQyz MrkA== X-Gm-Message-State: AO0yUKWCCduBPTXGSA1DKQoX8n169XuvbA6MMcFrERObZLz2u8+Ck2P8 Nd4DciK4wBQom2tENKek6Ipv6n6aDEAgUVxk X-Google-Smtp-Source: AK7set9Ecx6E0lyMv9KGkUvTGbepoYdjfdm98tpkFkGaKU3qDnU6vqoJ5FW4PPkBM0cTPErMcYc5BQ== X-Received: by 2002:a05:6214:5091:b0:56c:4c11:553 with SMTP id kk17-20020a056214509100b0056c4c110553mr9127528qvb.19.1676648886606; Fri, 17 Feb 2023 07:48:06 -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 o73-20020a37414c000000b007195af894e7sm3440904qka.76.2023.02.17.07.48.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 07:48:05 -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 10:47:56 -0500 Message-Id: <20230217154759.2484937-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