From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0082.outbound.protection.outlook.com [104.47.40.82]) by dpdk.org (Postfix) with ESMTP id 7C13B2C31 for ; Fri, 31 Mar 2017 21:36:52 +0200 (CEST) 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=R5fuw3MukDNeyO7krupm2XJpyRU6dZ7oztLlQlGe1jg=; b=EL6QLrhWcdl03vA0xMHDebT4+3u1HKui2P0x6MsYYfBl7Xx/x26vbHI4lJ/P/JHnsjmNXU+dju5+o/tUv9Y3bBogDwhxvpbSAuHwtV6S5uPqy2FqySMdlD6Sgzf4xnbBmCiDuCSWrzVjSz0TFFWoWEMiTSQ2Df0mwPEY+XC9GAg= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain (14.140.2.178) by BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14; Fri, 31 Mar 2017 19:36:46 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: thomas.monjalon@6wind.com, bruce.richardson@intel.com, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, gage.eads@intel.com, nipun.gupta@nxp.com, santosh.shukla@caviumnetworks.com, Jerin Jacob Date: Sat, 1 Apr 2017 01:04:45 +0530 Message-Id: <1490988905-12584-19-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1490988905-12584-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1488562101-6658-1-git-send-email-jerin.jacob@caviumnetworks.com> <1490988905-12584-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: MAXPR01CA0058.INDPRD01.PROD.OUTLOOK.COM (10.164.146.158) To BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) X-MS-Office365-Filtering-Correlation-Id: 93ce7be4-de59-4b2c-5c0e-08d4786d4681 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 3:yYNG0w/DfkClTaPrDWYqYc/eIjktuy4yww8sd7EYUZvFpYajsKzsjLetzfoBPpsG2mtWzpHiFbRszn8v1CTEw4t1vcp4wA8ASQnRzDITQLJ3K0VD19bFbelqcffZ9Ms2DJ2vORaVNHBTUdket1sO6WbSKR9kxUjmTYLogit+eIPcMdHoGj9ym8Rk0WMr3dCDB/b7+3p+o3QAWigzMfDrKkZD5dGBG9nmSP2pc5LlsGbVoaMi0+pfwn1ijjO2or5YtsScL3iXTkIn+0wWXfGM7RyFwUVF6WAFLnwQur1Qgw6mEJEA+UnB09wm/Fx98ycDcSf2RiN12zDdnmo41x0Cgw==; 25:ZDo8zUR0dRk0XW9F/d/FZ1/CgZlw28c06Gvg3jK+f0yE2dJK1OktzXKb2wV8CavFXpp3M2myLUJib4eikQlw9Lf+m+Tr+TtHichcs8v8LPZtzXjU5WjoAqXtqm10hNEmBwiT35craEzecT0MWCakoH667a3KTKeDFFox+eUnWLTcOvwmhD1LtiX6+iQqwDAzl/+yPlKvI55VTVrQ8urdUfU7CbI/a5GQysxLyxrE8nwl2nd7UC1mIKcbMObInWgDS8vBw/l/3/DR3kiZpWV5Nrk+M5W1TU6Hbp5pylTKa5UgrgMkL/BJUr2cxLvjKIPlTuRv3+dtbVdYSK+l86hKSBLilGxyq+YnvqQyTMJNRVSKTCJAYmUfZ7IdC9Mz2xgCqOxq6FCmEdiy0TkiXwu01rNtJc43XbrnX5T38BbT8RKSpSZEX46sQST95+WGnzUPgYI7Dyy/2uus3njMup8hCw== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 31:cvPEqF0pcm5zMfnJJzYpMSwdRuv0NW6M8Laiam9qBlQEF/DPXW5O6lCugu/2FQ/fS1B0LPqejrkVD7WyNH8+zgLqOdWQ3aaVEN00DAem/k0/2nOCMB5i77HwWAArF5oc1a9AaxI/B93E3fcUSYkNKI8yvp6WKKw05s6du75qEYgnYUEXU+1s43FZ7C4ss3uExV3ArdvszJbYUyq3RFUOYNG0cSUCGDAbuYPHU5x6oTU=; 20:npBxBYlmR2xNDZESD/Yn96xh261uekK1KUYyg+HeAo2ex6alocG1Re1gg6SFS/ZVbDiEzO7a9eKCOWgjZBOAoHD2vdHJ1e5qkYlZjNZbDGDDPerLbhiVXQXyRIDKee1FMgMECIyOTsv2jOW09XGkoMuCtNbQ9EIIJ23yvYMN9jFmofDq4jF3V6ww8Rh5IXjuM8IjfuKWr73KFv4G7Z6vNHk8ohSOwIT+cRc5bXfvtbpa7wwWggVNz6KvLULyyBXv6yC/aYSjTOXcWF7mg4rMDAjedP49qbVhTcIuPDl7PNJAYKzhkKLL0UAZicBPLRnta3Dv1gUyPupWB28MLXOG6VdPhvMThoOuDFSVoHCLtHxbaZuP2VZkevXsQ0mFvGPhUJZLWpzM3sK2xyiDKLfyXONeH+TJvgAURFjbPDoTA85EXfHyVmVL7X4m5bPELytIyd7QlC9CmFo9XPcDiuxma2o3jFnVjG8E/uj3Qbn3Lz1pLKzat+Je8xlLuwcrmNY7qqfEQxAhrZ5VDg3+Oqr0O6qnkhlytvKr5jSu2CtCvnBpHCG/WF0Pk1ccb7eC3/xhtl4O7tZ6/sBvaOQcHGea2lYzDR1yFU+qYve+W9xVrG8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(93006095)(3002001)(6041248)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(20161123560025)(20161123564025)(6072148); SRVR:BY1PR0701MB1723; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 4:uogYaRGwF51OoOz0uvYwIHXx9wCnYrSD4xU0e3GrkSUpe76LKdp0EAA1jhH9V+Vaapdd2TlyAy7Zi74Pm+3rdXTwU6OyItkpdWzLBbbDG2rbSdfhj1PAM1GVDn1pXcCa5x+Hr2LKdslZOYSWzCh9DinNDDjoNNUJqhR6Z0wK5250LwuLVh+LwcfUoBuXODMnybckWWGaxjYBW+VTjjNPa18Q9YSKPO0U2YstUl714/SUhXnYiqsVyUMUydCyrOZmQKmVls2iXi4X7jMOVAx3covwCcLqGWoKQNX9xSYtXzqPj6ERKBCetpgqNijb0Pev5BQJB/Hf6qnXdqBNok+4nI/IFYCH0d2/DRKvHgmZE4Zuko41+RW8cjyslp3wmdLdKccBfmhQA8AV6eK87d7U/gtvT38ur3eWfqaa4pOHBNp/NZUZZu86HY8gCJa2aCOMmHwrOzt71WMp5helNKYZktrEB5qhrp1yZA9QPsCBUxqPkoSEZwN36+D4Faj3gD+6Dg4bJ4a7mklgtPThtGPGAqZF+SUC3lSNcc0QlnOtQKHqcT9iGRk6pDZZwKLmRZE/NCVURboS9UzcWyEZV5Ck3tkpolCKeKS2XWZlyad7oXtQgbtPxYs6qysBZ2Ce7Og/92g6hrp81j0KOe8aRjj8I91vJoPuA+TAJiRHHrdb2QPgv93wmA6BT6akLrZ3zgFGAQbCyw2xtHlT5O7VkqU9y91l4rOWklShcz8eRD90xYEvYSqXIjwzl0zSq7IuL4d/ X-Forefront-PRVS: 02638D901B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(39450400003)(39410400002)(39400400002)(39850400002)(39840400002)(38730400002)(8676002)(107886003)(110136004)(50466002)(189998001)(305945005)(6506006)(36756003)(50226002)(25786009)(48376002)(8656002)(6486002)(7736002)(2950100002)(5660300001)(53936002)(81156014)(81166006)(3846002)(42882006)(6916009)(6116002)(6512007)(42186005)(33646002)(2361001)(2351001)(76176999)(50986999)(5003940100001)(47776003)(2906002)(5009440100003)(4326008)(66066001)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1723; H:localhost.localdomain; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1723; 23:3un/kexcY6IHCUPyw26QE0rhiQRP0XbVJmup+9E?= =?us-ascii?Q?R4Gvf0dwlVb/e1cteYHzM/KvQ7tWGhSe0E6uv0oCff/xrG0q/2Wk6XD4QUfI?= =?us-ascii?Q?Nvj7KttjtjJWyUn0WSbVq6fs/+xe6slkwVZojvVpXDcqCUUIw58qYpc7luWr?= =?us-ascii?Q?5zDuxn6+awAeJGeP6LiNB7Sa9obMoMTjL/imjNBlCco0FQdBPkGcxHXVJVGc?= =?us-ascii?Q?1Af/6QtNhZt1zyqwgYIoozUhg56uHuZ/RBt9ne3HPIkLk8EyrSb91I2icrEj?= =?us-ascii?Q?QQcIp7MILQQMWwuXR5D1Z7gd0Eu44nIbimTkYntMy3sJvVAM21g/l/v19bZx?= =?us-ascii?Q?xCCb8nUjGcCF4gHyKUewLelDnQYrNi2fsK53yWKqE5ReWFTsV1eZu0RtLFoX?= =?us-ascii?Q?q6JUawUWij/VDzSxw+nnTtKmmQLRyxOFHa72kX3gw2WWEFbZDsRH86A8Br8v?= =?us-ascii?Q?H6Yjp4gElWdOjgPsDlvwwf11S+9xm9ZijsD+q1yQQTGhsNLwMtW67/V5m56w?= =?us-ascii?Q?IbKhlxFNyqsVlJyUFSZaRg8BFk/9sO+//ogruaT6hHUjJ/cMTZannqI5Mfb8?= =?us-ascii?Q?ET+FVl05lxTLJyvOnEELkXr+l5si6OLV2BT5pUM1Jcv2PtedipC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cdnYdrkbJg3j5Mwl6vZZp70ISRPN945MSzjwOksYGFyEbjVJOZ2WNyJHIoXKZjJ31Pw==; 5:BUllSZIPkKMEGnT7Ls1zShYcoORl5Z0jMyzLeE0Lnc68wjLqgOxIQO4CgLG65xVky+vId5z/tkPyAobbzjLpd5gCJZOHEBInVgWaMYrhj8LVJh1BGiCT9qEfxDBD0WQMORj2MjLVJ5cFklSnuDm++pYMMwmDsidN5SbTC2mvzkw=; 24:dZ+QQ4/+az9aplQ0/L6ALD5EQ5DqgDPnrfpy+BEj/FdOzgwnIcBv+ovlwkFHdYLMFtiLipn9nyeZvDvFOzvsO71yZ+m0cqwPFp6MIjrAkmo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 7:lXzD1CRiCJe2ugUh5OdgbTEM3B1q0pOBILglOUQ7lhiw++fp7Zfh2eE7Yd08K65UuHmex4EhXzkkUjYx9/6qxImdi1tE0J4Cn1DYYlUEobKIxzMTPEBv0QtbAi6sPGAV8dS7G3hod1w5OKJIBqCXLClaiLgzxkBegtdPIx177NoVyExJBH38ECeCKaEKAHZiDBBZ6Iu/NRpw0blx6h9lLtglWNGUTaD2oJYXHmP3qLoYe2I6MWHqQwvW6/9K8PMFIPbWUP6FqxdlPaAj6wpz3BLje05Nvt3t1tFdHjxsWTCHcAjqNwyaWJ2mVGTpfQe2U0wkY7LTPvGSHr8m2FKKKg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2017 19:36:46.3955 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1723 Subject: [dpdk-dev] [PATCH v2 18/38] event/octeontx: add stop and close function 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, 31 Mar 2017 19:36:53 -0000 Signed-off-by: Jerin Jacob Signed-off-by: Santosh Shukla Acked-by: Gage Eads --- drivers/event/octeontx/ssovf_evdev.c | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c index 0db3252..d4d8724 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -426,6 +426,48 @@ ssovf_start(struct rte_eventdev *dev) ssovf_fastpath_fns_set(dev); return 0; } + +static void +ssovf_stop(struct rte_eventdev *dev) +{ + struct ssovf_evdev *edev = ssovf_pmd_priv(dev); + struct ssows *ws; + uint8_t *base; + uint8_t i; + + ssovf_func_trace(); + for (i = 0; i < edev->nb_event_ports; i++) { + ws = dev->data->ports[i]; + ssows_reset(ws); + ws->swtag_req = 0; + } + + for (i = 0; i < edev->nb_event_queues; i++) { + /* Consume all the events through HWS0 */ + ssows_flush_events(dev->data->ports[0], i); + + base = octeontx_ssovf_bar(OCTEONTX_SSO_GROUP, i, 0); + base += SSO_VHGRP_QCTL; + ssovf_write64(0, base); /* Disable SSO group */ + } +} + +static int +ssovf_close(struct rte_eventdev *dev) +{ + struct ssovf_evdev *edev = ssovf_pmd_priv(dev); + uint8_t all_queues[RTE_EVENT_MAX_QUEUES_PER_DEV]; + uint8_t i; + + for (i = 0; i < edev->nb_event_queues; i++) + all_queues[i] = i; + + for (i = 0; i < edev->nb_event_ports; i++) + ssovf_port_unlink(dev, dev->data->ports[i], all_queues, + edev->nb_event_queues); + return 0; +} + /* Initialize and register event driver with DPDK Application */ static const struct rte_eventdev_ops ssovf_ops = { .dev_infos_get = ssovf_info_get, @@ -441,6 +483,8 @@ static const struct rte_eventdev_ops ssovf_ops = { .timeout_ticks = ssovf_timeout_ticks, .dump = ssovf_dump, .dev_start = ssovf_start, + .dev_stop = ssovf_stop, + .dev_close = ssovf_close }; static int -- 2.5.5