From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4C672A04F7; Sat, 21 Dec 2019 02:42:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C55F91F1C; Sat, 21 Dec 2019 02:42:00 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 2165B1C01 for ; Sat, 21 Dec 2019 02:41:58 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBL1eb2s020965; Fri, 20 Dec 2019 17:41:57 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=stW0YU7Y6J79jV4OdY/N7cvgZO5qqN7cEBXsuEFVTRg=; b=sGPk9oR9rHvc1NkqkJZmHwK1M45QJMW7OqIbLxmPdAIveVJZdFr/66nFPv3d/MNPTZGR BPdDld0PcbZeERHHb4r9w3CghE/Xvzkcf4cZ5IGoyM0MGwNGyQoL96tDTnVnbW3fgzbz rK6+bZhw89MCcZBLJV3KdBqQ8BN+Gr0dsraUx2tGLYMhnuqUvh4ZOFd0csMp9SXEooEr KFEGxu1UczCb6t2z1PkXP/phFXUbxea6sUT/rbMn+QL18t0rSDTfkzS/7gI9q4VZ5RUJ ajtmMXHZqFIMk3+6GE5SPIx6c6DFjZDzXykesGwcgHQraLC230CCga1YhKJgqb94MQpD dw== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2x10ncspph-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 20 Dec 2019 17:41:57 -0800 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 20 Dec 2019 17:41:55 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 20 Dec 2019 17:41:55 -0800 Received: from irv1user08.caveonetworks.com (unknown [10.104.116.105]) by maili.marvell.com (Postfix) with ESMTP id E34523F7040; Fri, 20 Dec 2019 17:41:55 -0800 (PST) Received: (from rmody@localhost) by irv1user08.caveonetworks.com (8.14.4/8.14.4/Submit) id xBL1ftqd029848; Fri, 20 Dec 2019 17:41:55 -0800 X-Authentication-Warning: irv1user08.caveonetworks.com: rmody set sender to rmody@marvell.com using -f From: Rasesh Mody To: , , CC: Rasesh Mody , , Date: Fri, 20 Dec 2019 17:41:46 -0800 Message-ID: <20191221014146.29795-1-rmody@marvell.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-20_07:2019-12-17,2019-12-20 signatures=0 Subject: [dpdk-dev] [PATCH] net/bnx2x: add support for secondary process X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Skip the device re-initialization for secondary process. Cc: stable@dpdk.com Signed-off-by: Rasesh Mody --- drivers/net/bnx2x/bnx2x_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index 20b045ff87..7864b5b80a 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -598,6 +598,11 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf) eth_dev->dev_ops = is_vf ? &bnx2xvf_eth_dev_ops : &bnx2x_eth_dev_ops; + if (rte_eal_process_type() != RTE_PROC_PRIMARY) { + PMD_DRV_LOG(ERR, sc, "Skipping device init from secondary process"); + return 0; + } + rte_eth_copy_pci_info(eth_dev, pci_dev); sc->pcie_bus = pci_dev->addr.bus; -- 2.18.0