From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2FCAAA04C7; Tue, 15 Sep 2020 20:57:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2FACB1C0C6; Tue, 15 Sep 2020 20:57:17 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 1F1971C0C2 for ; Tue, 15 Sep 2020 20:57:14 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08FIuOXK009531 for ; Tue, 15 Sep 2020 11:57:14 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : content-type : mime-version; s=pfpt0220; bh=FKH1aadeGa29m5WW8cxJW1GsVRsDcOXR/d4ddO/ST5A=; b=JL/ChW5dzOhONAU5b4n67C3hygzEwHE5eimtcDe9V/cA6UTs7pk3MGOOtOkK7beJtZq/ mf6LxKGgNpjM0gNj736C6mLeVYfUq3mQ7FYGxZqu7QSDVLmAgdJOSlnrAlQ2t2+tbQ+v uOaxB1QaUxbfCuPVJ3xUCCNx7b0gRrxqtWyMa1Oyxo9OojQCLU6WOZSA8sBj9jDjlH2p i94gSBfDbLq/QKgGfmjV2mZrMhJndfZnDtS9iF7m+tF+K/BaAiJmKPrgXcvAFYHT/xrH Bnx2TzNL7TjsTRYERb+t1Qjqd1jr0LMBNoxAo+HEFSZxGcbSCeVqrC+ju5U3LuMhvpwo ig== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 33gupq2mwk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 15 Sep 2020 11:57:13 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 15 Sep 2020 11:57:11 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Tue, 15 Sep 2020 11:57:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lHJYNw4SfUCYMcKTvxRIzdx1sF1sfJf6TiBE8O4Aoqj+6dIcvj6lFBZ3lWybZ6ABBVUI1ELMZI7LtMPhygYmY2RGQSGFU/S9QhuR32wfDJ4cS+Fxx7rHci+kEvIf+K9TRwtnZAcMZDhDGc0/Dl2Hoag6Lti22jbRZMNvbd6Z1ujMlQ0EKYHSYUZRmzWCEhvDDDUE2gGHMwBIFOgbSJerd3uMjmitah5YexZbUeQ8WmEEQA47lTqez3RyQx9eUxzHGw97fMX9ajrZjBdjN/TZRRiomO4DM6ZKtjmuJoTsyFRk7ou2Hn+GGm8J2GJMsOMEtW/yDY4viTzpNbl5kj80Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FKH1aadeGa29m5WW8cxJW1GsVRsDcOXR/d4ddO/ST5A=; b=CDe4kIMf1Kvtd6moZhYT6/Cxa+2CxTAVqwxSyQDv6sELDpKrcPfWbRXSkqIdBkqLS/FFrJTrawYHw5uHoOAAUfwQA0cc4L+UNEyAz7NVHFnX014oK3Q3VHEitH2mjubTQUtbmVuX4TfWeRf4UtDyOMf/Or9uT9TMljXWooB7f/UNf84bAJRma4b5rOrc+vRq8527PZKp3vZ5VVq08Jmw1xMdIfFmxSsMiJjA439nskoQ/oE8Yy8VvC85S9n+yxyrYo8HoSzgqXrZBc12EWz59s3/9qXytxykQz9lkVkGF2Ehk/chdL443w/9h2FFca42N9p0NL2LIe1si+r2a+I43g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FKH1aadeGa29m5WW8cxJW1GsVRsDcOXR/d4ddO/ST5A=; b=FXcSlBWZ7tWch2I9KKfdrT2gsfsyk3g07SidNoF5WXiiwHe9QSMd4+O5xSwUjxfyJs3DbddUsG9AC4FQUdpff+dbitrJIc58gujm+t2fuzd8YQqaXYbW25G8Ca7Xk1K1SjsWoH72AXDdCmXfDvAgsOTx7cE2ycNTw3EAI5zHEoU= Received: from MWHPR18MB1070.namprd18.prod.outlook.com (2603:10b6:300:a5::11) by MW3PR18MB3643.namprd18.prod.outlook.com (2603:10b6:303:5a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Tue, 15 Sep 2020 18:57:09 +0000 Received: from MWHPR18MB1070.namprd18.prod.outlook.com ([fe80::4838:1132:399f:ea55]) by MWHPR18MB1070.namprd18.prod.outlook.com ([fe80::4838:1132:399f:ea55%12]) with mapi id 15.20.3370.019; Tue, 15 Sep 2020 18:57:09 +0000 From: Harman Kalra To: Pavan Nikhilesh , Jerin Jacob CC: Date: Wed, 16 Sep 2020 00:26:43 +0530 Message-ID: <1600196207-31258-1-git-send-email-hkalra@marvell.com> X-Mailer: git-send-email 2.7.4 Content-Type: text/plain X-ClientProxiedBy: BMXPR01CA0070.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:2c::34) To MWHPR18MB1070.namprd18.prod.outlook.com (2603:10b6:300:a5::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from hkarlara-OptiPlex-3046.marvell.com (115.113.156.2) by BMXPR01CA0070.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:2c::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3370.16 via Frontend Transport; Tue, 15 Sep 2020 18:57:07 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [115.113.156.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ec303af8-28a1-4169-f862-08d859a925be X-MS-TrafficTypeDiagnostic: MW3PR18MB3643: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aMMV+kIDo2/vgijL5a524c1J61mowdfliOkMpmfxVp6QEkRUZwncAi08F50X0lNkC6QhrZthxN0+HDPWy6UB1DfVo15+CHdJ/bO+6WZf0FXqfzlRHg4AXtg8pRU39/UlF76+fDpL+GYGc33YOyp5YI/YkgXM9umxagEMQ/T9wu4VlyuJvwIVYCaBByoE9vUxzOTZTGNwo1o9MlZ7X5oNBeSeEc1yV2sZIneI2RqOF12AfrRoPPCWUf/gzYbliCfdk4hC6u0U3/ilFMihg9jsRb5UUMjXbNhn4lS19zVt6bvDO2a5okgMW5vWAe02RzDUx+WrfObjZWn/gb6P/wtOBg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR18MB1070.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(366004)(376002)(396003)(346002)(2906002)(8676002)(83380400001)(186003)(16526019)(66946007)(66476007)(8936002)(52116002)(5660300002)(66556008)(7696005)(55236004)(6666004)(86362001)(956004)(478600001)(6486002)(2616005)(110136005)(6636002)(316002)(36756003)(4326008)(26005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: qYIXNPraZJQgqhpWqXptduEdsPdW2lwlO3umCwbQ5jxyodTMBvaBZC+jXIAreA5nrC9PDuv5FO49hITaEVwDmqY9clCVLQOO5xJek1qWlFqQa6o1TfFe4kgEP6lQh7znej+Zvan+UaDDlgbDszR8mfYebFDpCJb9SzFZZzWZb6btsoTwWO9jT/Q9bpleNNxwlGYS0aK8T0o/XjARYWvZZpsNGfBqSpwtHOn+XmeBWSJqq6E7cPcLqzSoEuPMqeQr2IjRwIw6v/vxIM+QupTH+TZs7TqooYsSqjtae5C6a04JAEhPTvUpsew6bXuSljjDHvgC6g8EdSd5r+73YS+sJsZGw5+Vc0TtwYKv3jSWgTnyT0yk/7EWf05DFHXWb2HN/47aq3dkT/8Jtt0UkAdE921zR+jm9zHFDrNG77D+jooaKakZ0SSfbK6HTIWbANRuKVCNhPKTf4FuYeg6H8zPpt744inqAXOfOcns7fyerOffydt0o6Ng1MagHOY2Rh0AhAG8evjL/tNccLiv5bRM83YWfrttDAOot9NQc6ptjW6EN7HMphQUvpb9xHJ1wPsUrN8X7+NzU25hLjlXeySYrHFjuKwPpshnDxz+lOp3N6DwGHYU/TeKPLYoclo3XnTfE7cPX1uKTf2OixnigqU4xA== X-MS-Exchange-CrossTenant-Network-Message-Id: ec303af8-28a1-4169-f862-08d859a925be X-MS-Exchange-CrossTenant-AuthSource: MWHPR18MB1070.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2020 18:57:09.4301 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tgWsZ82u1rQ2XNU+8efKTWfUZLGzL2QptCYkCQ85UArU15UlzrEiR6sJ4c4nDdVTuVvrF9UbNH6ewgHM/CjC1w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR18MB3643 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-09-15_13:2020-09-15, 2020-09-15 signatures=0 Subject: [dpdk-dev] [PATCH 1/4] event/octeontx2: add switch tag flush op 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Pavan Nikhilesh Add SWTAG flush operation at the end of transmit sequence to immediately release the tag held by the core. Reuse Tag address to check SWTAG completion status. Signed-off-by: Pavan Nikhilesh --- drivers/event/octeontx2/otx2_evdev.c | 2 +- drivers/event/octeontx2/otx2_evdev.h | 18 +++++++++--------- drivers/event/octeontx2/otx2_worker.h | 27 +++++++++++++-------------- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/drivers/event/octeontx2/otx2_evdev.c b/drivers/event/octeontx2/otx2_evdev.c index b8b57c388..faf8a5f17 100644 --- a/drivers/event/octeontx2/otx2_evdev.c +++ b/drivers/event/octeontx2/otx2_evdev.c @@ -771,7 +771,7 @@ sso_set_port_ops(struct otx2_ssogws *ws, uintptr_t base) ws->tag_op = base + SSOW_LF_GWS_TAG; ws->wqp_op = base + SSOW_LF_GWS_WQP; ws->getwrk_op = base + SSOW_LF_GWS_OP_GET_WORK; - ws->swtp_op = base + SSOW_LF_GWS_SWTP; + ws->swtag_flush_op = base + SSOW_LF_GWS_OP_SWTAG_FLUSH; ws->swtag_norm_op = base + SSOW_LF_GWS_OP_SWTAG_NORM; ws->swtag_desched_op = base + SSOW_LF_GWS_OP_SWTAG_DESCHED; } diff --git a/drivers/event/octeontx2/otx2_evdev.h b/drivers/event/octeontx2/otx2_evdev.h index 873724dd4..9577d867d 100644 --- a/drivers/event/octeontx2/otx2_evdev.h +++ b/drivers/event/octeontx2/otx2_evdev.h @@ -162,15 +162,15 @@ struct otx2_sso_evdev { struct otx2_timesync_info *tstamp; } __rte_cache_aligned; -#define OTX2_SSOGWS_OPS \ - /* WS ops */ \ - uintptr_t getwrk_op; \ - uintptr_t tag_op; \ - uintptr_t wqp_op; \ - uintptr_t swtp_op; \ - uintptr_t swtag_norm_op; \ - uintptr_t swtag_desched_op; \ - uint8_t cur_tt; \ +#define OTX2_SSOGWS_OPS \ + /* WS ops */ \ + uintptr_t getwrk_op; \ + uintptr_t tag_op; \ + uintptr_t wqp_op; \ + uintptr_t swtag_flush_op; \ + uintptr_t swtag_norm_op; \ + uintptr_t swtag_desched_op; \ + uint8_t cur_tt; \ uint8_t cur_grp /* Event port aka GWS */ diff --git a/drivers/event/octeontx2/otx2_worker.h b/drivers/event/octeontx2/otx2_worker.h index 924ff7ff4..1bf8afedf 100644 --- a/drivers/event/octeontx2/otx2_worker.h +++ b/drivers/event/octeontx2/otx2_worker.h @@ -190,8 +190,7 @@ otx2_ssogws_swtag_untag(struct otx2_ssogws *ws) static __rte_always_inline void otx2_ssogws_swtag_flush(struct otx2_ssogws *ws) { - otx2_write64(0, OTX2_SSOW_GET_BASE_ADDR(ws->getwrk_op) + - SSOW_LF_GWS_OP_SWTAG_FLUSH); + otx2_write64(0, ws->swtag_flush_op); ws->cur_tt = SSO_SYNC_EMPTY; } @@ -208,20 +207,18 @@ otx2_ssogws_swtag_wait(struct otx2_ssogws *ws) #ifdef RTE_ARCH_ARM64 uint64_t swtp; - asm volatile ( - " ldr %[swtb], [%[swtp_loc]] \n" - " cbz %[swtb], done%= \n" - " sevl \n" - "rty%=: wfe \n" - " ldr %[swtb], [%[swtp_loc]] \n" - " cbnz %[swtb], rty%= \n" - "done%=: \n" - : [swtb] "=&r" (swtp) - : [swtp_loc] "r" (ws->swtp_op) - ); + asm volatile(" ldr %[swtb], [%[swtp_loc]] \n" + " tbz %[swtb], 62, done%= \n" + " sevl \n" + "rty%=: wfe \n" + " ldr %[swtb], [%[swtp_loc]] \n" + " tbnz %[swtb], 62, rty%= \n" + "done%=: \n" + : [swtb] "=&r" (swtp) + : [swtp_loc] "r" (ws->tag_op)); #else /* Wait for the SWTAG/SWTAG_FULL operation */ - while (otx2_read64(ws->swtp_op)) + while (otx2_read64(ws->tag_op) & BIT_ULL(62)) ; #endif } @@ -309,6 +306,8 @@ otx2_ssogws_event_tx(struct otx2_ssogws *ws, struct rte_event ev[], otx2_nix_xmit_one(cmd, txq->lmt_addr, txq->io_addr, flags); } + otx2_write64(0, ws->swtag_flush_op); + return 1; } -- 2.18.0