From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0079.outbound.protection.outlook.com [104.47.36.79]) by dpdk.org (Postfix) with ESMTP id 7154F8DA9 for ; Fri, 15 Jun 2018 07:44:58 +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:X-MS-Exchange-SenderADCheck; bh=TqWTqH9RWKt0y5vD7mmJFLuLbPz8MehFDf0QlVyb6gk=; b=HEgZ5ink0E/GJxo7eDOlZSKjL+7wL+G2+IIPzShtxh5O98+EU3Ga/KqpE+V7tqiNixzhazObTagFjOO1PW90Wgjzs8irh8M80/qregR1ZJPInVxXZAcOpSRvicVtjWIcINcBxk6fgwywO6SXha22+ImYNr55rxF8eoA3Qy1/kQI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from localhost.localdomain (111.93.218.67) by BN6PR07MB3457.namprd07.prod.outlook.com (2603:10b6:405:64::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.17; Fri, 15 Jun 2018 05:44:44 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Fri, 15 Jun 2018 11:14:06 +0530 Message-Id: <20180615054406.22113-1-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: SG2PR04CA0138.apcprd04.prod.outlook.com (2603:1096:3:16::22) To BN6PR07MB3457.namprd07.prod.outlook.com (2603:10b6:405:64::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 035bd665-41f2-40b9-1816-08d5d28319be X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:BN6PR07MB3457; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3457; 3:KqmDQm72cFDklgLlNHxoCPPQ8ZM5xO2dWtm9IXXrHEw7HbjyPc+wJgqqNW/ROk/fXEZwJPMa0Iqg805OzGqmqFJojQvrnqCvEwsHSADV+88Zh4gkH/f37az/UmQucqx32iDvxPnvy8oQGrfp8lNIxT/hV/OmbqNwsCnbhUpbO1JwpR19eufEb6vtJP8O0Xlp1RGQFD96xmAw01stwRxLNRdEml7ZN5U2Hwwmc9wq3YStVnCXucilJ+wKAZYRji3w; 25:NFsBCBGuMi/rgYePOpgaJsIs0kGkUv/eSi0Lr1k3CRDfiWnbA7kL7C4h0zNMIH3jW5JszEUi/OH8I4vvmt+fLnxrS7pey6Qc9ZkjiOLTzGPlbLclpb8jsjcVYB9WaEC5lurCpGtoFstvn82AmHP+XqWSwQZ9mQnaFxTEw018oJUs7+8cdxEYDkXcBlWanMtLq0FQWz/ndIEQVe2YQPkel0IeCyHBGC6ld2RXXRjtqe7/Iz4SGTv96JyH/4glZpuhBSI6H7M3lvjzxu/7L80KG9DqP6JENIKFeNDZgaSD2TicFYHh52RGaAI5g0NS9acui8ZFNRwZu1Qx0BR4vwWnBQ==; 31:lOL8zhw44t7YMBwQvVWrJXw7mxhA8SvxnYuMxKMkMJP5j2u3UxGRPsSUmoX6RY+y/OsILUBv+zgZTlfyU6sQzSxGY7BR3I7r2yqPbNyb662M0FoptQyajbx6UwgohgNmrj8s9mNhLVtdOb3plK1+x5m1A9S3JQ1r893z1DxjM4OZ3qZYFgihdBKitfzw0+hMoRLR1OlEpgqtAhIn43vnYDadwT7dJjVBF7Kr7HiX4GQ= X-MS-TrafficTypeDiagnostic: BN6PR07MB3457: X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3457; 20:gwsW+w9Ls1nhIWyGNBc+cJNekk53t3v030tlNNYVmlRuK5RXMud6miWnWjj9zinL++lZoDSpLolw6EwxvwDls5HTCEt+Kg83uLT1iyYLYE15d0EEjUk1u6hwoITVsDuoLKgVO2S3UZlS17+IpLm2RfirUnRw9D+rc9Kc0zVhczG4nMy1Gl02K0Ln9Olh0O0G4KGjS7gfhfhaJmlhuZRX2aSVW0GsqrF01MxlN/AFMtfGf/EBJB83bVpuzXCoyg6XwDA/JUuCK+NpMs1b418UC4GW98e+54cYpGdkzHQlpiM8+bwFEnligW6UBP8oWtPvK04eAVzSOmPrAhc/DLj2Y/q99gOaDzHIozN/S6/4kruKDJsYOZI+P41CxuU2/le79bJ/izriJbXcNwUZOvw4Yhcw/+zyQjc3X72xmNtDDRPIDdZ6pnc5RIkSEEiT0qmyUsCWGv8S9VgIy4bT9uP3ILglvYyp7Kr6+L0kEJRILNiHgzQ1OPYWqfz8x2gYrmIBIGGNuTc0nHMCre1iwxzRMMUFyHZMgT641NfjjREatYigIExJCewJHAj4uLovuqGb83cgKZtih1ZKxBrDvgSO7n5iC7EWoYLB8O084AnlDyk=; 4:arwPbD5v5u9w+TWofDBidpDFNVSdSA2LUtxQjBG6RC4yS5pHKE0KIjMN+5hpq/312kJqqACSvdD9CuESiODZdYlZTI4wZW9cA1htk5Srdi2gvtm+ci7wBl0hilHTSCbguz6nLBaxEJJkqQaE4UTZGQZVFSytXQ65dlX5pojxD4SDiP1H06017q9oXZiKWHQIqMg/q6YTAresfd6QQtjX07kSk3sH8d+VzrycMhc3wZ2SjR9rH0dYq3qI0H+dgPd1q5foTyajpmmKU4pwMzvl7A== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231254)(944501410)(52105095)(3002001)(93006095)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123564045)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:BN6PR07MB3457; BCL:0; PCL:0; RULEID:; SRVR:BN6PR07MB3457; X-Forefront-PRVS: 0704670F76 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(39380400002)(39860400002)(346002)(396003)(376002)(366004)(189003)(199004)(476003)(6666003)(1857600001)(25786009)(6636002)(66066001)(2906002)(52116002)(956004)(2616005)(486006)(575784001)(51416003)(2361001)(81166006)(8676002)(81156014)(8936002)(7736002)(305945005)(2351001)(34206002)(4326008)(47776003)(72206003)(16526019)(478600001)(106356001)(5660300001)(97736004)(107886003)(6512007)(37006003)(105586002)(59450400001)(53936002)(26005)(6506007)(1076002)(6116002)(3846002)(5009440100003)(316002)(16586007)(48376002)(386003)(50226002)(50466002)(42882007)(68736007)(6486002)(36756003)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3457; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR07MB3457; 23:Zn6i+PNhVA5J0DSvmVomCajhL2DcX1or91VLeYyVE?= =?us-ascii?Q?Ny3NeqpZV4+uGHmF1ZC99aw+es1Ch1HRAlpVKeQFwjmv2CbYlrXLPa9lZWBL?= =?us-ascii?Q?RDtyPEaSIGWHQ3t9cxpmNTWmEvmyVvseRN9qYSDeM+9tO+QpefHhmLWH4XAw?= =?us-ascii?Q?Csi0DBshh8djm2e5ehCOqWGuihO2p8l9nL9GAZMKFgGd9y4RFgTf+S1/1cGq?= =?us-ascii?Q?kkPNAYFikEwORT5FaC694DA0SriidDU+XZZsuzqlYqLr4IZxNmKI/iI5ZfOU?= =?us-ascii?Q?c40uPleHRRcx8DIW5XD5KQ1NFo/jgMifctc8U16aQ85rrYtz19rgHDFXJ/KU?= =?us-ascii?Q?853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fBLOCfV4YGTbNgUy4OzwoQVyxO4cdBpBD7D5DYGWDliJDsI0g=; 24:xmw5n6AjZhybeeir1K7x2a+OA9jJTrqoqxIzF5M3bEGZjRgyf5BoYif8Yjg1cEdZj+xS3kPZu1cun7HjDyjRMXmw7WjHgOF+pbiwoY9hf+M= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3457; 7:qWboe+BGKGHP0SnT34umueMCkxlLhQJzajr/Gb60BPh90biEavUubiSJQTkTpJ8IAWyb35w8T419Sd+K79eM7tJh4LaE4lKloUfYbr/X9A0xSrF3FFqLq0a4bAFXjF7EiKVTO9xb+2hXf8PuGHcxgUVR+Xt5mIYTE3mCGG7oCSwYF3Q+JKpCkJOa2E8BN00dujGlCViWJRoJG1j/fHH3ZESFEQWBmwoKlzQdcvHxJIU/ifT9ruNOmCaBE6beqStg X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2018 05:44:44.1058 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 035bd665-41f2-40b9-1816-08d5d28319be X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3457 Subject: [dpdk-dev] [PATCH] event/octeontx: fix flush callback 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, 15 Jun 2018 05:44:58 -0000 When event queues are being flushed the getwork operation used to extract events should be a grouped getwork operation to the specific event queue. Fixes: 8384f0e039ea ("event/octeontx: support device stop flush callback") Signed-off-by: Pavan Nikhilesh --- drivers/event/octeontx/ssovf_worker.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/event/octeontx/ssovf_worker.c b/drivers/event/octeontx/ssovf_worker.c index d8bbc7149..fffa9024d 100644 --- a/drivers/event/octeontx/ssovf_worker.c +++ b/drivers/event/octeontx/ssovf_worker.c @@ -204,6 +204,8 @@ ssows_flush_events(struct ssows *ws, uint8_t queue_id, uint32_t reg_off; struct rte_event ev; uint64_t enable, aq_cnt = 1, cq_ds_cnt = 1; + uint64_t get_work0, get_work1; + uint64_t sched_type_queue; uint8_t *base = ssovf_bar(OCTEONTX_SSO_GROUP, queue_id, 0); enable = ssovf_read64(base + SSO_VHGRP_QCTL); @@ -219,7 +221,20 @@ ssows_flush_events(struct ssows *ws, uint8_t queue_id, cq_ds_cnt = ssovf_read64(base + SSO_VHGRP_INT_CNT); /* Extract cq and ds count */ cq_ds_cnt &= 0x1FFF1FFF0000; - ssows_get_work(ws, &ev); + + ssovf_load_pair(get_work0, get_work1, ws->base + reg_off); + + sched_type_queue = (get_work0 >> 32) & 0xfff; + ws->cur_tt = sched_type_queue & 0x3; + ws->cur_grp = sched_type_queue >> 2; + sched_type_queue = sched_type_queue << 38; + ev.event = sched_type_queue | (get_work0 & 0xffffffff); + if (get_work1 && ev.event_type == RTE_EVENT_TYPE_ETHDEV) + ev.mbuf = ssovf_octeontx_wqe_to_pkt(get_work1, + (ev.event >> 20) & 0x7F); + else + ev.u64 = get_work1; + if (fn != NULL && ev.u64 != 0) fn(arg, ev); } -- 2.17.1