From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0083.outbound.protection.outlook.com [104.47.32.83]) by dpdk.org (Postfix) with ESMTP id 6C913FAE2 for ; Fri, 3 Mar 2017 18:30:22 +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=L9vWYSAOFW97nw+5qr+1b6zUTvuKF4l1HatI2k933sY=; b=ltYUx1LlbJ0HXzuB3QHkMoeEEFjDuJBc4CxAZnzBq3sSShjNkqQEZwOq3dZZuiWG6nv8Ol8Yd7/ksoPyIH8XC+II7DSF+dMJYXWwjBUgRuHvRSnaNK0UBdkrXH3Z5d/RWvoQFP3lX25fCMxiUxkqVN068QVKmT8hh5WOUFpc5iA= 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.localdomain (14.140.2.178) by BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.933.12; Fri, 3 Mar 2017 17:30:17 +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: Fri, 3 Mar 2017 22:58:03 +0530 Message-Id: <1488562101-6658-22-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1488562101-6658-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1488562101-6658-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: BMXPR01CA0021.INDPRD01.PROD.OUTLOOK.COM (10.174.214.159) To BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) X-MS-Office365-Filtering-Correlation-Id: a33ece59-b7d0-4ed3-29d8-08d4625af7eb X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 3:5FLGpCWuPI1A2yuFZOqdeklHamNYAgCo1XH8+6u4x0f9LdoWrPz02CJqOoJ1Hwt+B0JFdj9MU1lHXoazhEOLCm6wJchJxkNiauRi1zZ8e/d6v6QnjaasUU+RFSnupluVJVUDCoHmQxe/IQX1ZQ8DgG5+LxaPjyAcjVM/wSAUMWfytU5fd3Wp+8I14wsPAVzvARTJXH79L5RamYADwSj16kzTJ7r/3v3eHC4Vv5zRCkc7uDdna7CCPF2APMekZnuRKr63lI2CdEYmXYTOKzsTcw==; 25:59+0Omu/KJa34geMnJHo95vc68IYBIcrtW2XDmijnrm531Dd/wqX5R2qjdaNsi7TgPfEOmesrRhScFzrnuesGWm0k0YMwMJcVuhKoheGhX6kNhsyEzBsAEKtZr7up4BE462m19Am1b3/JrG67f0/LHiLYRQ6vCBcrXrmt32P7nXi6v1lQCdji9/GL8rcPnjOZpi1dkogrdujE++wD8v38K8Gfjr2oi9YEJY+kLKIpGZzqlgbwJTtTOAydfZPnEMvo2yfKUuESw+KaTIJl2m3wYWme5sFbBIFbQBkr0fH+qh37ceoOwp8Cb//d3sywvZedJxuy3vrpA7YLVAoKF/E2yM/3785gjI1cDlBO++Ycfv+pkTR2vQN8pBsuIl8T1MlFUHQeQfx27czixe19t8rKodd0moRaxyw1tuIS8ogrJl1GDXC6xIsZkgVjFdssGTpD/dUJzp674S5OI4leo9sFQ== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 31:mbI0yb4w/m3JUbdfKUSpwa3crZ2c92g5GhTrRZ9JiD5sE6B+Mu9dJukmsjAMmlX8OAByfB4K85GZ8D2fV5WDQ2zB/Yj3shyGrLh7vYnM0mpXY7Yil+4ZCeQzUOXiK7b05farkrE37vq00K/f0jUe8LYheluHE3vvUecrACfLHPNrFs2n0QKAsnNy4bDHbomcnAJVxmdjcz3DNKS0zjJdFy2Ek38WgTAVkiUlZW11xA4fqIiO4KX1uDK+RgiZAfFNKyZzUPmi+oMoF5dpPliKBA==; 20:6/3x5cyaBLWRMGJnGScr77ebl94bRXl7KYlZeBvDW6fsNGL34Ss39lnyLJxYZrZXWjQ0lIOPPuvm1368n1k5jyCGqO2gZ27dylpzcciOJ9DJMyloFWVX73UQumIre6x1n+hNOUAgN7cKKwdieTQV8WaKwzqV3hWlEWGHWy73D+UhfzdmAcPyB+c+kB64t9ENKpQ+PQ3wyruzuxaE+KCWzcWBX0nXE5RW9+CUxpb2/2ZvJbMHjenHErWZnhzsZSJNkfe0LFymDntlGwTP60WKp4hj7yPk/XdLiAjzhpZN5wkiEP1WDNq8vzjvEHNxl52ubPXKN4HMCBo5A9lCgxMZ+KRswRsYJMyrEEi3m3zADW8c5SkbhcmmS45eludGpq7s1db7Bk4ADQlm+8ICxAd/3Wgc8roCJZPRdC3Bnx2rp93kq2vClDphjKK6iUdYeK3QVapkuoxNsms+i/F2bS0Opww2iFnLWCdWKiZgn6b7hIOHpHRxAEmRtEdRb6MUaFKbREoa4iasYPinLz4k/mQwhtgPWDhJzIYbO/gvl5/kXjrlnet497mh7bhS4+5BLaR4eW6Qq5NIN4p8oFUbqxCQ1M4xDDpSyQ/b9dNNDv5oi2g= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123555025)(20161123560025)(20161123562025)(20161123558025)(20161123564025)(6072148); SRVR:BN3PR0701MB1719; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 4:0AcjyRocG9w4E33SqdhWkBqCIJYax2fd82iNUqPbCmxrR9FPsaFOG07KZVbCDApLUhv2QYOoALErlaa0+A7eggUF8pxhe4OWVBk12cGV1Mhwatts+lhFeqLz99dSqAxhCyrnG6FUZvVjZ7FZRofikfpFHEiXw3uJbDebubHaqzGbb1dmFhN9KnOcfMR+vAIGoc0f2PNHGOkmp7zeQ+qMLcMgIZP/pEgL/mdP1iNqZqUk6xxHfvWt0EafxymIUZBcnYrGoTySpTApbz8fmVIOkOwPWHv3Ttrc1ZCOGuuCyvW9Lyg6OZH5Zxy4cyqVJCAsFv5pJLdQM/e2Uo+4uJUUOF3jNVafZqdgGlg9sq+luOkRWGyfwN0FNMgVWqnMiGMWGx6m+gOBoyv2n0ZwrjMzorXruG/WWoaE68CV0RGeY0NBjfpgA2X3tstE0FAGKHaOMPl1F2otG1xex3TqwDlGXxYDbPL8BeNZTBZ4ebzHjaboDILcJgnyRvDu4zxTWDbA9L8ZnN2qfz6R6Re4WoH6PD+cT7Se7aYULSnzuQP+8TYC93k5eMUhml5IHPVOdGSRkE2Q1yWz/f0M/QtSWkYg0hAci9BvrGDpzIPN7n1ue9I= X-Forefront-PRVS: 0235CBE7D0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(39450400003)(3846002)(50986999)(6116002)(36756003)(81166006)(6512007)(97736004)(2361001)(2351001)(6506006)(575784001)(5660300001)(42186005)(50226002)(8676002)(6666003)(106356001)(8656002)(2950100002)(2906002)(25786008)(47776003)(6486002)(76176999)(33646002)(7736002)(107886003)(42882006)(66066001)(110136004)(4326008)(38730400002)(6916009)(305945005)(48376002)(92566002)(5009440100003)(5003940100001)(50466002)(189998001)(53936002)(7099028)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1719; H:localhost.localdomain.localdomain; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1719; 23:/Bnge2IgeEGs69IdJoswi/2p8nsmWwld6KqzgBc?= =?us-ascii?Q?hne4xGyoEut5IQxqIX0MMzha05neuTn97avB2Ufzskm+AqjcWM6bZmuizwK9?= =?us-ascii?Q?NgoZw3HyZRnH03+O01wgVtfHvNW4VCUBka/ryAgOCi1VLL2zAOHa3SmuTqGT?= =?us-ascii?Q?1Ngq501TCh67UwtPKkRbjTTE+HPxw7LxuD4Ih7hYNe5++kHP25k/Pcl3+tj/?= =?us-ascii?Q?9XdJr0wNppGUZfcNLqc02NTju5zgwEjMI5ZCKp6VddtNItMKGSYwEoHZWWsB?= =?us-ascii?Q?eqfx77rpLyoOd278SI1n4daqQZk2GVRExpoVD1hox+iW67XRM7F6k6xVWs86?= =?us-ascii?Q?vlwyjnpcvp897H09DI+cV4cSrNwXREFVuydP/au2veot+xzv82i6T51G2uEX?= =?us-ascii?Q?0SNQswbTlNKBjR3cm4nZCzsrgociw6XSHDbkp8KeSNqjn0dsu5l74XRrHoqb?= =?us-ascii?Q?n6rJ42DMZT4BZJuZ5/xbEWmyoEK1HcgAFXFk3gjD/vZEI3PKJcsrWd54n443?= =?us-ascii?Q?MDs5RvON9ht198Fvon12LhVECVva7xhNpGIpj3KyZhGoXOcw68nEWpwvwitG?= =?us-ascii?Q?3K5S3EPZFQ3xlJVkiTjml1RtREitfEpWbZL3bu+EU4aOnAscsBtCy2Xq0emD?= =?us-ascii?Q?bE3l5S/8uNMQw4JtKqXGgKnzq63xpidUXpP28W/5qOF6vednIP+405Euw3rx?= =?us-ascii?Q?bikQEHusIhXoenC/zhv9820kQNdF877h1dG6et0a48r0otvHnJazjjKukV+0?= =?us-ascii?Q?FMP+uQ9nuqme2gUDHkd0dITwhEZiFcVvQZvOGBMDB9xL1C7MUAQXuE9g8+Mc?= =?us-ascii?Q?hKtf177GMBndjccokTidNCHzuLgToBZwizYtI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qytycaXqpyu+oNsOwyNSy1u28FgAB1HcJaa5TFISqobwdXinpo/HU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 7:LEk9PnBcIghJxi017PfV+wqNADGOW7KJYqC8GH+suO2OnBmwJfgG4l9pVZZ/dv8asLfBPdN3dO8oUzJOZH8nu45r+fBqWIk3zZTTfnIFdNGBgRgV9UJeU9t2lYveRJxlilVqPR1vqt8RFt+XVYBnHqGcbvGuk9CoN6WjkWQ+nkW179dNpFhKuQ7pcWLC0TJ179mwaasQiJ5Xt1DDD3UL+ZmrvgQy0ON7AemIFBGYhjaADT7GFAv6wh6nZaeRYOZSrOyd/1vQ7B80tflKjqgxdbj/nHaY5eJMLTddsovP/Nbg4khDVOtECy87jJPHSsemPr67EvViU5wUj4cm5W7caw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2017 17:30:17.9856 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1719 Subject: [dpdk-dev] [PATCH 21/39] 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, 03 Mar 2017 17:30:22 -0000 Signed-off-by: Jerin Jacob Signed-off-by: Santosh Shukla --- 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 26c84c8..94a0eb8 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -421,6 +421,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, @@ -436,6 +478,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