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 B5E3F41CC4; Fri, 17 Feb 2023 22:59:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9011940F18; Fri, 17 Feb 2023 22:59:30 +0100 (CET) Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) by mails.dpdk.org (Postfix) with ESMTP id CE78240EE3 for ; Fri, 17 Feb 2023 22:59:28 +0100 (CET) Received: by mail-qt1-f175.google.com with SMTP id r6so2131416qtx.10 for ; Fri, 17 Feb 2023 13:59:28 -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:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QmTzqMem0FzNrNF522PJnU3Cu7oGAAMXleMtlUhmjcI=; b=w2YdB/aHEtyotMF3MqjYtSpGcsFaJPEMXyWTFCZue7q1xoSX7fAN8v81DRhaajb6+x bQXf4lAEYyQEDQ/cqCVeu/b648f/VF6S+Vznecdf+DyBy/Y2D6tmiYv7MhWCR9LrYUFJ fjubWHhyDuVUjWKPmkhXYcIR5T11fJ4Eol801rsQCDvK+muJH8RrZkEyzUX8PdKcfxu4 h29QI5sVqs9+rDGuaCp4Geax3wcmn2inUj7LGzhzVfMlkPGJo3cVfd0sUngUThPcyS8t mXXDolMpbgnRJvljz1EpE1/hp+DZ1dzA0Dma6BppvVF1NTJbeKintIMp/3GA21AVo1bw bC0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QmTzqMem0FzNrNF522PJnU3Cu7oGAAMXleMtlUhmjcI=; b=QupfNN9WQQPJEZaxop8mBftU2GO9L9kefPi++8MXsYjz8YcSgBCJmGB4TVXew7fsQz xJiYtL39zhwWm6Woocb0wCORKRZFuxOyresWa15dwwGCuKV/CeB/BDMYJxq7PopSl7YO LdfiXX28ru9vpFgpXaWy//Gdd26jd0+Ll+yk/Qu75dy5RhoOltacxqFbPEbzG3Ag2jT4 O22MnDVp+Vk33npzHqzBNQ39QmfIy+X/OaMbaM9n+G9p6goDFapHhWduH00zrqSA2J0G WLmDlKgO3NsEjXvoPFEigtiPNktaXPVAjS/0Rchr0g9dAUxZD7gDawDivNMAb+8xYJY7 BIDw== X-Gm-Message-State: AO0yUKVKyFSzfVOCvq4qqdNYsyRqJqi07zzFEH0dvJ7VUrFq0BO4t2Rh FJ98/xjTSOqB9XtwuL48X0wK3VtvjXP9eWrH X-Google-Smtp-Source: AK7set+J/AiGGYepIBPu+UVEq20/KRFdGUc5sNK5TucYzU5D/crvLYIJqWy2um/8lilm6j4Ii5076w== X-Received: by 2002:a05:622a:1104:b0:3b8:4adb:c604 with SMTP id e4-20020a05622a110400b003b84adbc604mr269qty.14.1676671167451; Fri, 17 Feb 2023 13:59:27 -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 m126-20020a378a84000000b0073b587194d0sm4029328qkd.104.2023.02.17.13.59.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 13:59:26 -0800 (PST) From: Ed Czeck To: dev@dpdk.org, ferruh.yigit@amd.com Cc: stephen@networkplumber.org, John Miller , Shepard Siegel , Anatoly Burakov Subject: [PATCH v2 1/3] net/ark: support secondary process Date: Fri, 17 Feb 2023 16:59:21 -0500 Message-Id: <20230217215923.2561685-1-ed.czeck@atomicrules.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230217160039.2487085-1-ed.czeck@atomicrules.com> References: <20230217160039.2487085-1-ed.czeck@atomicrules.com> 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 --- v2: * Use standard logging --- 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..d237e80cf4 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) + ARK_PMD_LOG(DEBUG, "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