From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0066.outbound.protection.outlook.com [104.47.34.66]) by dpdk.org (Postfix) with ESMTP id C4C7F1B717 for ; Fri, 13 Oct 2017 16:52:42 +0200 (CEST) Received: from CY4PR03CA0016.namprd03.prod.outlook.com (10.168.162.26) by BN6PR03MB2690.namprd03.prod.outlook.com (10.173.144.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Fri, 13 Oct 2017 14:52:41 +0000 Received: from BN1AFFO11FD006.protection.gbl (2a01:111:f400:7c10::139) by CY4PR03CA0016.outlook.office365.com (2603:10b6:903:33::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7 via Frontend Transport; Fri, 13 Oct 2017 14:52:41 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD006.mail.protection.outlook.com (10.58.52.66) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Fri, 13 Oct 2017 14:52:40 +0000 Received: from [10.214.249.170] ([10.214.249.170]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v9DEqaWO021042; Fri, 13 Oct 2017 07:52:36 -0700 To: "Rao, Nikhil" , Nipun Gupta , References: <1507657887-11366-1-git-send-email-nipun.gupta@nxp.com> <1507828729-18194-1-git-send-email-nipun.gupta@nxp.com> <1507828729-18194-3-git-send-email-nipun.gupta@nxp.com> <7e7200d2-04cb-2d06-6895-7e3b33178d7c@intel.com> CC: From: Hemant Agrawal Message-ID: <8c99f2ee-ba4b-c119-ac48-2f84c48db1d3@nxp.com> Date: Fri, 13 Oct 2017 20:22:35 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <7e7200d2-04cb-2d06-6895-7e3b33178d7c@intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131523799606152238; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39860400002)(39380400002)(376002)(346002)(2980300002)(1110001)(1109001)(3190300001)(339900001)(199003)(377454003)(24454002)(189002)(86362001)(31696002)(229853002)(5890100001)(68736007)(104016004)(2950100002)(31686004)(230700001)(65826007)(5660300001)(33646002)(189998001)(8676002)(93886005)(356003)(4326008)(81166006)(81156014)(106466001)(105606002)(53936002)(8656003)(8936002)(64126003)(77096006)(76176999)(65956001)(65806001)(47776003)(50466002)(305945005)(6246003)(54356999)(316002)(110136005)(83506001)(85426001)(2906002)(50986999)(58126008)(498600001)(97736004)(23676002)(36756003)(53546010); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2690; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD006; 1:p6G232Owv5wwPLFKyQsZzPIBjufWJ6HKNbHXYPCPGBQEZIIHn6bAHbFp9yJB3h99Yjy82H6GebRN4W3WV22GftPXZkgCyVoFeciFS0vB39h1fAnAGumUVAK3RKY6hpyX X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d27eb75b-ca10-4caf-fe6e-08d5124a0d67 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:BN6PR03MB2690; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2690; 3:mYvGgVBZ54Aa1dpQ5YMsAV0EcfaZmdjbiHPOfocD/GNhhpmdsvCoFB7LFUc7jxg4zfzz72Aa49ASh/tMnLk/GMZrjHq+7x7XBOYSJYCbuH5Tm5f1Upz4q59w77hMePUeXl4vYzpibaO3fzUtjBkdJzYCgK5J9zHyWBlEYURKrQiQEvp9VjUsgdNmoZflCYXUfkAcMKJpax8gSJdovHZTP9ZLkgbHUxSZ+R7K7t0j5v/zEnQiadBeBGzE1ihKQIonw9aQXf+uxvrZKdg3RR+A9nUDP2vZAcTpd/urOYae6yRVKWnPjVIynQJfcPaZMy3ZExzn2fxqRsWjUb4UabMnNOMQI7LDK2n+Gr7zdUtCtj4=; 25:asFaZxVeMM1j2gnuIumgMJ6bXs/RMQzP7SMv3c1Y1fyAETTrH0vm3jVpV1/SY4PXScrkdF52/9h5Sqa8an725N4Ry3Gm+UOZFCBpyB3IT30qetDnSC6pLN8c3zWdgMHnYcrou08CC+tBsejpZw/ju+DeLklVUxjXP6/x11TBTPCkTJUL9/cXH9knLde0950x0HOqGWQ5TOpjDLJuJvJGiXsLz6FTlUPCdhWbGhzy/EIrNgVA++EQL5sci6I5ExRrGr6z7HYk3nqwlfJDMEOQ4bqJQJlx+WEK4qZAIWOqojdYmHi+sz8i1uLPsG/cixhbxB/rM1fmDbF6IhsiN3fGvg== X-MS-TrafficTypeDiagnostic: BN6PR03MB2690: X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2690; 31:10TKMz49d9XUsPO3btc6wplLgiVRBD7EoAF3ssor2RDe5rB/Sg1ZsaPYC0GTWGMLnPwYOQpchrxp1UJaoGEwM/igEzaeD1CcHTMkvRbogsW08lGYVBqlsiQJ+no1+oXpHjeiM+NdCyJpX3sRssd/G1jcnPBMg38eVrx4NRRd1I9pOqwEttCE3i8H0mC6kN0UNZw1AixrsarJXRPk6WfZCYcAn3FabjTKL9NJLKQezNo=; 4:t8N9ZsIMmzVJi1nHb1urQtZpeoBoAnmfOYC/ajhhcULWHKf2KY1OrXHOsImWmlxkHdf3oHWOXekIiGl4m5Ei9iJuXdzD9tb5ymAUBQ22NwldxM5Gwuza9D+B3e9dhhU9XAaXUD3axqjSYg1zHpYc6Rr7g945ELT6fu2H5Sqz4/1W7SPyNDU99iR6t+8vz73QtIsHbe+LkPI0ZTYNcjXxtRhHxwNz5+QNTueYlbQY5Sd5/TcHDI/yznPGIM9NidAGkLfA5JpJ6U8/3I6iWsxZ2fFbMlFal68QHWQRcupaUNiZWXDedU1cGBpHHgWzjuDsfkkA6AGOW80YDZ1DRia2MWwyWwHqrkCWzM8vjo8S+9yqLz+FexHOteS7Y+mK/DND X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(100000703101)(100105400095)(6055026)(6096035)(20161123565025)(20161123556025)(20161123561025)(20161123559100)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123563025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR03MB2690; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR03MB2690; X-Forefront-PRVS: 04599F3534 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjAzTUIyNjkwOzIzOjcyc1piWFFGeVJVRTJvRzJWTktRRElER0Yz?= =?utf-8?B?ZXc3Mi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ndHp4WC81YkJPS1B1NkMxWGZi?= =?utf-8?B?U1BCZ1RseWxXWitnZC8zMzc3d1dUZnRkSjgzVGJCdjY2NC9BV2RTZS82UW84?= =?utf-8?B?QjRrbEEyWWFRPT0=?= X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2690; 6:hAcshzihmCJ4sQBazC5D5TEhB36PUo9NQodyosSm/428sAgcA2rEfCpTkyE4UG0cj39yOEcwH+Kb7NDza0IKLbpXpCHQD/jmeQbcWn315QtDGg1ZKaO3wMDm7laFTtBinV+i7MBUl91YlMPCkOrFUBHTPjsBZ8GNN+AQe3LpPiRAZ5mnjyN1XQFeVAFtYvfEeS30DyLxaamjTJ9xKXAQNUuYb0qiOxp49bA40RbNifzO7bgKaAY1SC2i77bNvf8F+jrTCSVx+F1glFit2/gnuSTXCpS0EjcIBdhKu98mRe/9jXVIJz2QlIAOa4GmEOWYdc3rqxABoeIlAU/71Poc3Q==; 5:+RsieiSTDEx1EakLz5uEVqXf7iGkl+uXdmmFlLBCtWnwoYj72CN+W7mkb5iJnEpgikmY+KtyKev1ny6xMLmPHkvo9PkrulHLuJPyVouMEP6Axecg51B3QgC77Mu1Qw2eYjo0ErPnV7jvt1rN4eeCgA==; 24:iRqnGiDHoDe8VOHWkl9hD4FtNlGVODI9K3E0MNwT1nFucS6M4KO0FeVucrEsZmmdB5LI94Za/YkhXgfUW4PhYOK2Tlw9vJadJAb5d42sePM=; 7:mnGC8KPXHzRFfsYFtfKCigbQcAaRNNNxOIRG6v4aRisck+cxtMbs3pkpVp4zn4FywQnl5ugiT9vD/UkLqo5l/bp7q3ViYERbcVfBSIcjueWbnNWk0dt2BG3EcdouGZVWgKOvt4KC7Td3DXKWBQhA8os9vMNctRAcBIS+fkqmM07mjj5+YWQ7uQi+nf8U6cPAJMYWt22nRbStLgrW7LWFQU5DIKWyVa49jfJ1jrJuVI0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2017 14:52:40.1628 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2690 Subject: Re: [dpdk-dev] [PATCH v2 3/4] event/dpaa2: support event eth adapter 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: , X-List-Received-Date: Fri, 13 Oct 2017 14:52:43 -0000 On 10/13/2017 11:27 AM, Rao, Nikhil wrote: > On 10/12/2017 10:48 PM, Nipun Gupta wrote: >> Signed-off-by: Nipun Gupta >> --- >> drivers/event/Makefile | 4 +- >> drivers/event/dpaa2/Makefile | 2 + >> drivers/event/dpaa2/dpaa2_eventdev.c | 151 >> ++++++++++++++++++++++++++++++++++- >> drivers/event/dpaa2/dpaa2_eventdev.h | 8 ++ >> 4 files changed, 162 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/event/Makefile b/drivers/event/Makefile >> index 3f6b898..accba6e 100644 >> --- a/drivers/event/Makefile >> +++ b/drivers/event/Makefile >> @@ -31,7 +31,7 @@ >> include $(RTE_SDK)/mk/rte.vars.mk >> -core-libs := librte_eal librte_eventdev >> +core-libs := librte_eal librte_ether librte_eventdev >> DIRS-$(CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV) += skeleton >> DEPDIRS-skeleton = $(core-libs) >> @@ -40,6 +40,6 @@ DEPDIRS-sw = $(core-libs) librte_kvargs librte_ring >> DIRS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += octeontx >> DEPDIRS-octeontx = $(core-libs) >> DIRS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_EVENTDEV) += dpaa2 >> -DEPDIRS-dpaa2 = $(core-libs) librte_bus_fslmc >> +DEPDIRS-dpaa2 = $(core-libs) librte_bus_fslmc librte_pmd_dpaa2 >> include $(RTE_SDK)/mk/rte.subdir.mk >> diff --git a/drivers/event/dpaa2/Makefile b/drivers/event/dpaa2/Makefile >> index 3497d09..2d1d7c4 100644 >> --- a/drivers/event/dpaa2/Makefile >> +++ b/drivers/event/dpaa2/Makefile >> @@ -45,6 +45,8 @@ CFLAGS += -I$(RTE_SDK)/drivers/bus/fslmc/portal >> CFLAGS += -I$(RTE_SDK)/drivers/mempool/dpaa2 >> CFLAGS += -I$(RTE_SDK)/drivers/event/dpaa2 >> CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal >> +CFLAGS += -I$(RTE_SDK)/drivers/net/dpaa2 >> +CFLAGS += -I$(RTE_SDK)/drivers/net/dpaa2/mc >> # versioning export map >> EXPORT_MAP := rte_pmd_dpaa2_event_version.map >> diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c >> b/drivers/event/dpaa2/dpaa2_eventdev.c >> index 8a6a3e3..ee3a164 100644 >> --- a/drivers/event/dpaa2/dpaa2_eventdev.c >> +++ b/drivers/event/dpaa2/dpaa2_eventdev.c >> @@ -53,11 +53,14 @@ >> #include >> #include >> #include >> +#include >> +#include >> #include >> #include >> #include >> #include >> +#include >> #include "dpaa2_eventdev.h" >> #include >> #include >> @@ -557,6 +560,147 @@ static void dpaa2_eventdev_process_atomic(struct >> qbman_swp *swp, >> RTE_SET_USED(f); >> } >> +static int >> +dpaa2_eventdev_eth_caps_get(const struct rte_eventdev *dev, >> + const struct rte_eth_dev *eth_dev, >> + uint32_t *caps) >> +{ >> + const char *ethdev_driver = eth_dev->device->driver->name; >> + >> + PMD_DRV_FUNC_TRACE(); >> + >> + RTE_SET_USED(dev); >> + >> + if (!strcmp(ethdev_driver, "net_dpaa2")) >> + *caps = RTE_EVENT_ETH_RX_ADAPTER_DPAA2_CAP; >> + else >> + *caps = RTE_EVENT_ETH_RX_ADAPTER_SW_CAP; >> + >> + return 0; >> +} >> + >> +static int >> +dpaa2_eventdev_eth_queue_add_all(const struct rte_eventdev *dev, >> + const struct rte_eth_dev *eth_dev, >> + const struct rte_event_eth_rx_adapter_queue_conf *queue_conf) >> +{ >> + struct dpaa2_eventdev *priv = dev->data->dev_private; >> + uint8_t ev_qid = queue_conf->ev.queue_id; >> + uint16_t dpcon_id = priv->evq_info[ev_qid].dpcon->dpcon_id; >> + int i, ret; >> + >> + PMD_DRV_FUNC_TRACE(); >> + >> + for (i = 0; i < eth_dev->data->nb_rx_queues; i++) { >> + ret = dpaa2_eth_eventq_attach(eth_dev, i, >> + dpcon_id, queue_conf); >> + if (ret) { >> + PMD_DRV_ERR("dpaa2_eth_eventq_attach failed: ret %d\n", >> + ret); >> + goto fail; >> + } >> + } >> + return 0; >> +fail: >> + for (i = (i - 1); i >= 0 ; i--) >> + dpaa2_eth_eventq_detach(eth_dev, i); >> + >> + return ret; >> +} >> + >> +static int >> +dpaa2_eventdev_eth_queue_add(const struct rte_eventdev *dev, >> + const struct rte_eth_dev *eth_dev, >> + int32_t rx_queue_id, >> + const struct rte_event_eth_rx_adapter_queue_conf *queue_conf) >> +{ >> + struct dpaa2_eventdev *priv = dev->data->dev_private; >> + uint8_t ev_qid = queue_conf->ev.queue_id; >> + uint16_t dpcon_id = priv->evq_info[ev_qid].dpcon->dpcon_id; >> + int ret; >> + >> + PMD_DRV_FUNC_TRACE(); >> + >> + if (rx_queue_id == -1) >> + return dpaa2_eventdev_eth_queue_add_all(dev, >> + eth_dev, queue_conf); >> + >> + ret = dpaa2_eth_eventq_attach(eth_dev, rx_queue_id, >> + dpcon_id, queue_conf); >> + if (ret) { >> + PMD_DRV_ERR("dpaa2_eth_eventq_attach failed: ret: %d\n", ret); >> + return ret; >> + } >> + return 0; >> +} >> + >> +static int >> +dpaa2_eventdev_eth_queue_del_all(const struct rte_eventdev *dev, >> + const struct rte_eth_dev *eth_dev) >> +{ >> + int i, ret; >> + >> + PMD_DRV_FUNC_TRACE(); >> + >> + RTE_SET_USED(dev); >> + >> + for (i = 0; i < eth_dev->data->nb_rx_queues; i++) { >> + ret = dpaa2_eth_eventq_detach(eth_dev, i); >> + if (ret) { >> + PMD_DRV_ERR("dpaa2_eth_eventq_detach failed: ret %d\n", >> + ret); >> + return ret; >> + } >> + } >> + >> + return 0; >> +} >> + >> +static int >> +dpaa2_eventdev_eth_queue_del(const struct rte_eventdev *dev, >> + const struct rte_eth_dev *eth_dev, >> + int32_t rx_queue_id) >> +{ >> + int ret; >> + >> + PMD_DRV_FUNC_TRACE(); >> + >> + if (rx_queue_id == -1) >> + return dpaa2_eventdev_eth_queue_del_all(dev, eth_dev); >> + >> + ret = dpaa2_eth_eventq_detach(eth_dev, rx_queue_id); >> + if (ret) { >> + PMD_DRV_ERR("dpaa2_eth_eventq_detach failed: ret: %d\n", ret); >> + return ret; >> + } >> + >> + return 0; >> +} >> + >> +static int >> +dpaa2_eventdev_eth_start(const struct rte_eventdev *dev, >> + const struct rte_eth_dev *eth_dev) >> +{ >> + PMD_DRV_FUNC_TRACE(); >> + >> + RTE_SET_USED(dev); >> + RTE_SET_USED(eth_dev); >> + >> + return 0; >> +} >> + >> +static int >> +dpaa2_eventdev_eth_stop(const struct rte_eventdev *dev, >> + const struct rte_eth_dev *eth_dev) >> +{ >> + PMD_DRV_FUNC_TRACE(); >> + >> + RTE_SET_USED(dev); >> + RTE_SET_USED(eth_dev); >> + >> + return 0; >> +} >> + >> static const struct rte_eventdev_ops dpaa2_eventdev_ops = { >> .dev_infos_get = dpaa2_eventdev_info_get, >> .dev_configure = dpaa2_eventdev_configure, >> @@ -572,7 +716,12 @@ static void dpaa2_eventdev_process_atomic(struct >> qbman_swp *swp, >> .port_link = dpaa2_eventdev_port_link, >> .port_unlink = dpaa2_eventdev_port_unlink, >> .timeout_ticks = dpaa2_eventdev_timeout_ticks, >> - .dump = dpaa2_eventdev_dump >> + .dump = dpaa2_eventdev_dump, >> + .eth_rx_adapter_caps_get = dpaa2_eventdev_eth_caps_get, >> + .eth_rx_adapter_queue_add = dpaa2_eventdev_eth_queue_add, >> + .eth_rx_adapter_queue_del = dpaa2_eventdev_eth_queue_del, >> + .eth_rx_adapter_start = dpaa2_eventdev_eth_start, >> + .eth_rx_adapter_stop = dpaa2_eventdev_eth_stop, >> }; >> static int >> diff --git a/drivers/event/dpaa2/dpaa2_eventdev.h >> b/drivers/event/dpaa2/dpaa2_eventdev.h >> index f79f78a..ae8e07e 100644 >> --- a/drivers/event/dpaa2/dpaa2_eventdev.h >> +++ b/drivers/event/dpaa2/dpaa2_eventdev.h >> @@ -74,6 +74,14 @@ enum { >> DPAA2_EVENT_DPCI_MAX_QUEUES >> }; >> +#define RTE_EVENT_ETH_RX_ADAPTER_DPAA2_CAP \ >> + (RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT | \ >> + RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ | \ >> + RTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID) >> +/**< Ethernet Rx adapter cap to return If the packet transfers from >> + * the ethdev to eventdev with DPAA2 devices. >> + */ >> + >> struct dpaa2_dpcon_dev { >> TAILQ_ENTRY(dpaa2_dpcon_dev) next; >> struct fsl_mc_io dpcon; >> > > Reviewed-by: Nikhil Rao > Acked-by: Hemant Agrawal