From patchwork Thu Dec 27 06:23:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 154552 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp6604817ljp; Wed, 26 Dec 2018 22:24:02 -0800 (PST) X-Google-Smtp-Source: AFSGD/WFxt6yUZ8ucuwFiFHSn6JIlJ78kQI5zgKzzCMgpXuUrYRAFQ6GXL6Imucuw8nKvSt3lxYS X-Received: by 2002:a1c:1b8d:: with SMTP id b135mr20388719wmb.115.1545891842092; Wed, 26 Dec 2018 22:24:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545891842; cv=none; d=google.com; s=arc-20160816; b=JJo6ZvXVVaNJ8y2as8GSVXX90AHbnxNMHA1MmqVtQEgvJhkDRpwN+8pkhB5sshILJC PkbEVNYWonWy/BCupzRqixzHd9XG+E625pcJF3HWqDqOXJNU1Ce4q9mwq/3LiFdW6+iD nxBgGdMUYhJzdOj5JXpD/7qz6gA5KXXzrp4ZxKzA+4E5pHu6lH/XctfV7FsYhJ8Fq7z3 oiAgXV7sU9KgMrS6G7YAk2HHF4l1nO6JrBJfEI1JFKH5NaHx79fQBdb7gaV1JvNSUxny TKbBvOMA3tQ7daMkq1K9GrTPkQjj3H9aTN+Olw25y2fffrf9h9B2tXvtJC7zkp+7PJUy EiiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:mime-version :content-transfer-encoding:spamdiagnosticmetadata :spamdiagnosticoutput:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:cc:to:from :dkim-signature; bh=6yMzxLZNcNqV6V7f+K7K/x9jYdWbUKqz8/iLU3i2EIY=; b=namKJVFcz2Xr4QjPmFEFA7ymzQCx9cumeJ75PavLmuoYmNsHcRGiZii4uVxwsfATKN uWydSEbGW3vvAXT91T+ABvir545caEFDzfQN5r71NTyPa4rvMu6aynPoi+a6vZtf0wAY UE8xby6Etn54zPanh89eIZ95EoXXTTQhzrPBZ4Su7eZHZFv2CGF9Mssdt4RLCtG99oU0 ch+u9YvQT7zDFCxC+JMst43QpC0RcPUlsYBtjs/ljAyZDR2U95063i1W/DMDKki3Ccs6 fFzyx1sTfPuhM+PR6XhhYXyNSkSiXeZoOsSo97HqlV4aRUZRiEn/c+JJY8X1aEmZflqe 1gIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=xuyw2qbz; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id n6si18056889wrw.334.2018.12.26.22.24.01; Wed, 26 Dec 2018 22:24:02 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=xuyw2qbz; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AFD7456A3; Thu, 27 Dec 2018 07:23:10 +0100 (CET) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140084.outbound.protection.outlook.com [40.107.14.84]) by dpdk.org (Postfix) with ESMTP id 06B664CE4; Thu, 27 Dec 2018 07:23:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6yMzxLZNcNqV6V7f+K7K/x9jYdWbUKqz8/iLU3i2EIY=; b=xuyw2qbzryDMr5HjBiLlKKlNJ2TpiRWY5hO/OKH9kAAUBBesyNHffUMInSkuWWwVxl4ogKuH2s/MohnKiGczSRfM+rDFBtykxupzjz+ORs5lae7SdmPpVaflcNaRRH2pailHW/SNDGvtubJcPaOWL8OZpbiP+Zt9wN1M0xvTruE= Received: from VI1PR0401MB2541.eurprd04.prod.outlook.com (10.168.65.19) by VI1PR0401MB2382.eurprd04.prod.outlook.com (10.169.134.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1471.20; Thu, 27 Dec 2018 06:23:02 +0000 Received: from VI1PR0401MB2541.eurprd04.prod.outlook.com ([fe80::555e:164:f8f0:dbb4]) by VI1PR0401MB2541.eurprd04.prod.outlook.com ([fe80::555e:164:f8f0:dbb4%2]) with mapi id 15.20.1471.019; Thu, 27 Dec 2018 06:23:02 +0000 From: Hemant Agrawal To: "dev@dpdk.org" CC: "ferruh.yigit@intel.com" , Shreyansh Jain , "stable@dpdk.org" Thread-Topic: [PATCH 07/20] net/dpaa2: fix device init for secondary process Thread-Index: AQHUnaye6bo6ysjQ+0GW0Kcr9YUv4w== Date: Thu, 27 Dec 2018 06:23:01 +0000 Message-ID: <20181227062233.30781-8-hemant.agrawal@nxp.com> References: <20181227062233.30781-1-hemant.agrawal@nxp.com> In-Reply-To: <20181227062233.30781-1-hemant.agrawal@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [14.143.30.134] x-mailer: git-send-email 2.17.1 x-clientproxiedby: BM1PR01CA0120.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:40::14) To VI1PR0401MB2541.eurprd04.prod.outlook.com (2603:10a6:800:56::19) authentication-results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0401MB2382; 6:YSBIhe3NEIv74FQoWq8KMLkiBmbqYHRP5a1/Rrm53484A8/Ka4jCjBqRu45RronTPdYycXjEnX8GatWhQWfK+LARl5lgAn2017m+ZxREsWNjkoWj1jqdYQaUTgsD2/hUgQkuCoYGjV21oImHlQvSfF9MocvCSr+0BLDQSnx1ixCLjXz+r9tnHPJljizm0/ETSXerLzlyLLhuKldICGNtJ7vphYdrlWuXfmvrV0vWGJK4pzBNAUmcqATK6XsnJ29yxdVJy7WIJGzaE1yzf8GouL5StR6xHs8ZyTpz4hKw/FSq5aYikArcsvvRuaR4ep5WRwH5pK7VOtxPLIpxKCeToBcIjujWso5ut6MGairS+T86Vg020sqU3EVCEcveS5+LsUoSnIURc2PYobpKtvgvIJH9Ouue1/0zNiaGrvlOHIlZR2jR05+73ubC0vtU/ksH70J5U46Q03xUzII5wlWy/A==; 5:yYxmUrbZt287h/0Ke3sNxYADZXCoZ8mAIWXkZv9kiclNOlkGWN0Ftl7YhEMg3hsh090ex9fSYwonTOOTVgj75ZVOn4PK9GYIkHKx27QLiv2RpvkFNunxtJFJU6bz0pgKGot8m/3BCoFoSxteRe6oXOqcO/QaFg2GDbkqn1grJis=; 7:UNdvMvY6bDUUIGJMbPLLVYzGJkHwYUgJtu81EilGtq1ewZkmwlDTgkZCvS2Ms83vYSDLOHZhc5SU/KSxtnCKm1/EbtKEgR6WRmXUlG5N+aCXZjD7uW+EztS8p77HJzfCys+FaBX5VZkjuz4EOKanEw== x-ms-office365-filtering-correlation-id: 9b7304df-a473-4e21-a198-08d66bc3c0b4 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0401MB2382; x-ms-traffictypediagnostic: VI1PR0401MB2382: x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(3230021)(908002)(999002)(5005026)(6040522)(2401047)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231475)(944501520)(52105112)(6055026)(6041310)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:VI1PR0401MB2382; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0401MB2382; x-forefront-prvs: 0899B47777 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(136003)(396003)(366004)(376002)(39860400002)(346002)(199004)(189003)(5660300001)(1076003)(26005)(76176011)(186003)(71200400001)(256004)(25786009)(105586002)(4326008)(6436002)(305945005)(11346002)(106356001)(14444005)(446003)(44832011)(476003)(7736002)(55236004)(102836004)(78486014)(486006)(386003)(68736007)(52116002)(86362001)(6506007)(2616005)(71190400001)(66066001)(316002)(54906003)(6116002)(3846002)(2906002)(14454004)(36756003)(99286004)(50226002)(8936002)(1730700003)(81156014)(81166006)(8676002)(6512007)(53936002)(478600001)(97736004)(6486002)(6916009)(5640700003)(2351001)(2501003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2382; H:VI1PR0401MB2541.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: qA16ZuOgMdOXbqd/4wAqKUG/Jey7NQ+MXICdM5Pd3HT6Gw3J7J9zdiJJNH0c5cPi+yT1EO25lnY/joMWXMILGgj5h/47qitJ60+luzFUGBYvjLXfmp4FGeHpN2TqtR66KfUUTEmvwEwI1Ht41PlNzLzmDQrVTAvcbmY1oWiqSqGpb84JntSIsLvoeYd2l3QFDxd/8SN4HkD0eP3KUPBMnN32la+Il9NMT4h0pX3UK5gyDyGvqc2qZtMWVoHnPCOy+vVIxePQjVauWQNxWd/L4Fp2jZVnIUZ8Svv1ik9n2X6ogLD9qXouHDIsTJJvy/Gt spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9b7304df-a473-4e21-a198-08d66bc3c0b4 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Dec 2018 06:23:01.9736 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2382 Subject: [dpdk-dev] [PATCH 07/20] net/dpaa2: fix device init 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" In order to support I/O from secondary process, the burst APIs and OPS APIs shall be mapped/plugged. Fixes: c147eae01cb3 ("net/dpaa2: introduce NXP DPAA2 driver") Cc: stable@dpdk.org Signed-off-by: Shreyansh Jain --- drivers/net/dpaa2/dpaa2_ethdev.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 8d4ea1bca..39f85ae7b 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -1918,8 +1918,15 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev) PMD_INIT_FUNC_TRACE(); /* For secondary processes, the primary has done all the work */ - if (rte_eal_process_type() != RTE_PROC_PRIMARY) + if (rte_eal_process_type() != RTE_PROC_PRIMARY) { + /* In case of secondary, only burst and ops API need to be + * plugged. + */ + eth_dev->dev_ops = &dpaa2_ethdev_ops; + eth_dev->rx_pkt_burst = dpaa2_dev_prefetch_rx; + eth_dev->tx_pkt_burst = dpaa2_dev_tx; return 0; + } dpaa2_dev = container_of(dev, struct rte_dpaa2_device, device);