From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0078.outbound.protection.outlook.com [104.47.38.78]) by dpdk.org (Postfix) with ESMTP id B4D03293B for ; Mon, 6 Feb 2017 09:33:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=KsqAFvhrgEJwBsGVENLO6W2ZfXWTHXZ6KnShgLtoIYY=; b=GuL0j7ZorrrRBpuoqlQ3nqPJXp8UWhCk2c+6nj22JxG0ZiCpg5ApRVIjQO7on/+VIHP6RXHXF4mcBoSicz95F5SiiqapV6RVRHSO1DwxdyoxLUncXe1oJ2zL7s193N9/dRm3wo/kFetR4ykM5Ke+kSQden2PFV302g56tqsjTCc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (122.171.53.66) by CY1PR0701MB1726.namprd07.prod.outlook.com (10.163.21.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Mon, 6 Feb 2017 08:33:09 +0000 Date: Mon, 6 Feb 2017 14:02:55 +0530 From: Jerin Jacob To: Harry van Haaren CC: , Bruce Richardson Message-ID: <20170206083254.GD25242@localhost.localdomain> References: <1484580885-148524-1-git-send-email-harry.van.haaren@intel.com> <1485879273-86228-1-git-send-email-harry.van.haaren@intel.com> <1485879273-86228-4-git-send-email-harry.van.haaren@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1485879273-86228-4-git-send-email-harry.van.haaren@intel.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [122.171.53.66] X-ClientProxiedBy: MA1PR01CA0032.INDPRD01.PROD.OUTLOOK.COM (10.164.117.39) To CY1PR0701MB1726.namprd07.prod.outlook.com (10.163.21.140) X-MS-Office365-Filtering-Correlation-Id: 46f8c70e-0710-4cb9-4ed2-08d44e6ac90b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY1PR0701MB1726; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 3:Tac4xr/57jNZ59h3tCBhRNvsKbJZbC/665i37Aq3A0S8Yfv72ULlZCZJvDQ+nF+pZmDs+AyA1paY7K/iEHj65+EStzyjMuBDlnXz4ckKdIEAHEIb7vSqIv+aX1e7+HXwV3mCCr74nd6dbjJtFnJlCgTflmpmeYz9uerJHYy0eR3/5bdW/8H7lCN/39ngwV5LI8sFPTPnEnFSirAQ4mJYbV/S+X8Wem9juW9PH5ImMbRdh5flzRM5TVRKj1N/E6wxCTtJ9qg9KY28vdvhDF48OA==; 25:TkhCPfiYjZgHJ0pqivYmu8fVHwZZ66iX/txlHfNnrvrBC4Oqpo8m3MqaOdBV+Qk2lXwrnRJqBh8AYmHAjNtkG1uy+OtfOruVOPtTwJY5wifN7SMWzfa7KMJgsYDFukgl0p1nR1W+EkwPD0LPuXkL6wSwWFSv5uBfSTlLf135w6XN43N3Vd/91I6QpcWwT3XJnIU5i4UKXWG8X/MSHXNoCpmeXiHU1djJFCHoAv03IYNzRsZLeea81lnx6H4x96FbpEG7sPsCTMSh4H9kTuCwAXKB6t++tONeG3O5LNw2M2xqpioJ2JpU6OL0TcBd4m8HsOE931Ha2yaC3uc7w51bz/zUm//vVKV9xs4KzPSqtkI8mnS4nNbUc89hktR++xN3dbVXw3bTsxEe7USR9arHC1D06BfkF7EhFAaoutUfwJQsVCMlMKdNpm1RTKDwwGAv X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 31:9Dmh+MNz4KBlj7vLwJV+tVp4NB/tUQawHzI7o0CjULvgEBp31mtxHjrZDQiQv+yLGDIiTqqo677UruN5VpOGguKNolWP5AelxK4N64CHKFB6Me0XpHNKTvqCIa5xQH4nZ4ZNQuyWTnXQdb61P7jb7YA8J4zhguQy1i9fPZk+09E0s8XdVS6rIBEcDq9JwUmNEATtpKbRwukk9kR1ccayakLwmULhzUw8f7+lhXEpb8l1uzT+6OT6eBV9+ASCEVuNUx4cNHTaP0+Y8ESOhXosqg==; 20:aaMhC5ABSsRSTFVcZCXPe3v6trNhbrI875HwYPsPKu8R+hCSwzW/6potLDEqIiW3qvCl2Wbt5jSyhLJS20qgfAheWTPeX1SsxCrjNnmfJZ0iIAkPTMhre6opYQ5iYjVAG4rw8/ZP8pzoV5lP6RK3A5XKnMKMk8Pr2BuHl050xtJEh/kfrABVz+KNk/ejeMsZBk2m/R60EPXlSPalS1ieF36k5qeNnlh+bAS8EGEC9+hhPm2+kOXA5BeFhZWURUzQBQ6czNYTGBX4NROTX8v5J3UzJMIWEWXfI8fsMn5ZL68orAE0LUHhRLpmBM34ZJzmUdjrcOpT0dfjyALOhKN1+ZHMjVTFtiUics8FwQcL+i4l3R+0bIvtUC4AsB00pekwVYbf7fUOlfBKNj0VUQLsbL4nhqgJoGX6xvlShaUEg8JHI76JtQeTx3l+vgSttBJaWbpZbH5KcdB8Q3jk+QgApnmXx1cKRjhQ2OVrpUkOeaw4jis57I0ciTIhZFoIYJ9URym0S9Y3rjapxH8WE6kpY20gbxyHCNhFZv9uBBelOQLdkgbuK1Qn08UMNIt9Hsq9JNFUMm2uZUjfiRNn3OmrXlMizRyUY6VndjbKyU5hcDY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(20170203043)(3002001)(10201501046)(6041248)(20161123564025)(20161123558025)(20161123560025)(20161123562025)(20161123555025)(6072148); SRVR:CY1PR0701MB1726; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0701MB1726; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 4:Z1bXH6+uv7eEq/vNP4Cgo52xGsKYIYWkTBbsIj4CgChhd0ByXeQMZFdgmp4yhy5z/8EkVwBAwa3nJVZycuTu4MmxIeAZfSydW5ULXMP1GnvEayWgXsXDPeBffCY1OI4TL2slNVMZSoTUb/9DjEXG4jj7iYa6uWKJpKb40yNhHgyEXI5UlviEHhvGl96Hi8kn7zhZM19p0qnuSzFIBxURhamjTpXj1wUBjxKK1G25a2Md1mEoWIZ+TDae3LJ7snnKP4gmblyZQKrL2EzpJGihtWNDS+QEh8bsAZ9XJ9F6Nb1Ktn9oJU2dmdHefnQAixpyMF4+eoH4ypSwBRnDoOHLoQiZMKeLMFKB2fJ8dimsCQn5C9Ps338V5laca6Z6bAgxAlGN/W6J+0DIO9M8GKcbWOSTGdPfeXXkn3JN1ycUEMWbqyM2qfosk1jeG6qfq2coqFzbTxcfUKdtIsIP+UOIioiaehxaJ2D2wlHxhYYV2PTWrfZwOop/dq+soDTCrGqYLwr2/cf0PayTGS7XBQtpTMbJ5fN2wst/d1PCcRKjV4e84PYpP7geAyFNiNwb8b1aPNy/ruPBhABJ+ilzUrpLB3H1VSk+vg1g+RtO30GNp5jscl2jUQu3NmVIjUEExkPRBgahzWsJ95yL1X7TpamI8PY0UXWOXS3KSpU7xQPN+xk= X-Forefront-PRVS: 0210479ED8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(39450400003)(24454002)(189002)(199003)(38730400001)(66066001)(966004)(61506002)(101416001)(15395725005)(83506001)(229853002)(305945005)(7736002)(189998001)(33656002)(42186005)(68736007)(25786008)(97756001)(92566002)(50466002)(55016002)(46406003)(4326007)(2906002)(6246003)(54906002)(9686003)(6306002)(54356999)(76176999)(23726003)(6116002)(3846002)(6506006)(81166006)(81156014)(47776003)(50986999)(1076002)(8676002)(5660300001)(6916009)(2950100002)(6666003)(106356001)(105586002)(110136003)(42882006)(4001350100001)(53936002)(97736004)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1726; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1726; 23:D2fcL7qe3ZnvOX26fKftC0E0hQ3PcC6ooRZ5cj3?= =?us-ascii?Q?2Sppy+kbBRWYNYrFk0nJyqU3wEEkawj7N/1TL2KxnMsgzM0tMDsrslOUqQvT?= =?us-ascii?Q?+Y0ulDgcGQlkUZKWBgNgVoSjyLiEn0QEhmsxGMWZ8XjH8m3/9MG5pVBtrMIq?= =?us-ascii?Q?Za3KIYLwFyfiIrxVFKujJd/DeIjSY6RSF69r3AClakDcpE5NSBMFK04xdHWw?= =?us-ascii?Q?GTdmmTTIiJqOwJrNVs/f0ry8Vhi7qv3zOGJ64hyNAkQ1VwB/d2MyH7no91C7?= =?us-ascii?Q?RQRD28P5OhtDR6rP+Rcb1OqTRyFHdGr+WaEYgeWUVdGjkyWIiEfV+x3EuuaX?= =?us-ascii?Q?vBSAoRqwhgAUG+mrcxEwGrOTIUOxdSyqXtRlWCt6WVcDk0Kg9DPmBTD1vXse?= =?us-ascii?Q?MT9bf6ufKBfdVkBL3QaKXpR+SpiX+l3wmdm9vgp0ehT3j3skayHHEj340r4N?= =?us-ascii?Q?VlLvI6kSJnGVyJuAjW0NfjhPg98JXdUVe51sYSZSXlxgIYF6AwQAbFW+cAFW?= =?us-ascii?Q?0lIO6B1jZPM4iXpFNcP9JNBKwc+B3ZaalBj3trz0c1ob/TGGmOMg1UId1JPY?= =?us-ascii?Q?SaWYNaylmI1z0b1YCvznRP8vTfm5gOyXDKfN99MJDoWvYaMDZsToqD8uCh31?= =?us-ascii?Q?zr0phT8pdONwLiOnfVvmaHt0hUXXA60wjReEbKFs5sd6YK111WfEsRes5U85?= =?us-ascii?Q?jxDjzvXRZNaydirRAbiv+56zKwovj3j8QkkOW3Acojp8+0Z8l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OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2017 08:33:09.5668 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1726 Subject: Re: [dpdk-dev] [PATCH v2 03/15] event/sw: add new software-only eventdev driver 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: Mon, 06 Feb 2017 08:33:14 -0000 On Tue, Jan 31, 2017 at 04:14:21PM +0000, Harry van Haaren wrote: > From: Bruce Richardson > > This adds the minimal changes to allow a SW eventdev implementation to > be compiled, linked and created at run time. The eventdev does nothing, > but can be created via vdev on commandline, e.g. > > sudo ./x86_64-native-linuxapp-gcc/app/test --vdev=event_sw0 > ... > PMD: Creating eventdev sw device event_sw0, numa_node=0, sched_quanta=128 > RTE>> Like other PMDs, I think, we need to add PMD specific documentation at doc/guides/eventdevs/sw.rst? reference: http://dpdk.org/browse/next/dpdk-next-crypto/tree/doc/guides/cryptodevs/zuc.rst > > Signed-off-by: Bruce Richardson > Signed-off-by: Harry van Haaren > +# library dependencies > +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += lib/librte_eal > +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += lib/librte_eventdev > +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += lib/librte_kvargs > +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += lib/librte_ring > + > +include $(RTE_SDK)/mk/rte.lib.mk > diff --git a/drivers/event/sw/rte_pmd_evdev_sw_version.map b/drivers/event/sw/rte_pmd_evdev_sw_version.map > new file mode 100644 > index 0000000..1f84b68 > --- /dev/null > +++ b/drivers/event/sw/rte_pmd_evdev_sw_version.map > @@ -0,0 +1,3 @@ > +DPDK_17.02 { DPDK_17.05 > + local: *; > +}; > diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c > new file mode 100644 > index 0000000..d60f00f > --- /dev/null > +++ b/drivers/event/sw/sw_evdev.c > @@ -0,0 +1,178 @@ > +/*- > + * BSD LICENSE > + * > + * Copyright(c) 2016-2017 Intel Corporation. All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * > + * * Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * * Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in > + * the documentation and/or other materials provided with the > + * distribution. > + * * Neither the name of Intel Corporation nor the names of its > + * contributors may be used to endorse or promote products derived > + * from this software without specific prior written permission. > + * > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > + } > + > + RTE_LOG(INFO, PMD, > + "Creating eventdev sw device %s, numa_node=%d, sched_quanta=%d, credit_quanta=%d\n", > + name, socket_id, sched_quanta, credit_quanta); > + > + dev = rte_event_pmd_vdev_init(name, > + sizeof(struct sw_evdev), socket_id); > + if (dev == NULL) { > + printf("eventdev vdev init() failed"); IMO, We need to avoid using printf for error reporting.I guess there are multiple instance of the same in the patch series. > + return -EFAULT; > + } > + dev->dev_ops = &evdev_sw_ops; > + > + sw = dev->data->dev_private; > + sw->data = dev->data; > + > + /* copy values passed from vdev command line to instance */ > + sw->credit_update_quanta = credit_quanta; > + sw->sched_quanta = sched_quanta; > + > + return 0; > +} > + > +static int > +sw_remove(const char *name) > +{ > + if (name == NULL) > + return -EINVAL; > + > + RTE_LOG(INFO, PMD, "Closing eventdev sw device %s\n", name); > + /* TODO unregister eventdev and release memzone */ I have sent a patch to address this. > + > + return 0; > +} > +