From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D5579A0A0E for ; Mon, 10 May 2021 18:19:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF52440147; Mon, 10 May 2021 18:19:56 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2087.outbound.protection.outlook.com [40.107.92.87]) by mails.dpdk.org (Postfix) with ESMTP id 4BC5E4003E for ; Mon, 10 May 2021 18:19:56 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XjWoqDKw5W0yrqY7gS8CHwm00mi8w/DjIDhWuzOwULXd/dq84B04htDQHjPuOMggpVlLN5scly6+0lkuOV1UZQsSc302wlp/gtL/FAjDSzDKM38mSYEj9qPdXBHzDc6Zv5Rw9+Dp0iWrN6G3kONSRfbq+eTNjoopJV/Dw/2b8SCoJlnwusTa4JCkQdYxDwUpby1ZFIcKnpLkEY0DEOJZ/yGhUM1YwJx758x4O5OBbHvd3Ey3AR+xzKtqd+Fp+R4koqtaaMPCMkdhd8g6TOdkiUfrKtY3GYDsPtzzsU4Rs0JHNL1nY1PyP6l5GId4oLEIKkui/b6QClGMxrbqEX/YwQ== 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=v19r6Fv9egd8bjgxoEEnZwP38KJVO1VfkU7wLynOOIk=; b=ktA26bQ4vfBk7k9QAU2A8XiwAi6fWQogWP4m+dzvA94sQOFxRW1u60mrPBJD3Gel+AxR4VuHUP7YzdFFfLo9IXqcUjhtcTyn2Dj2HEKbdqXRYntSp195IW4+DuXWWGjP9UasVRI3KAI+f9q99MiXa6uRE5k8G7b9QpYTE/mvUvYP92mrMuiqFaHHLxgXCDxQ4pKRWfB5luyO0uBJQw01HgNtBDSStBIy8krlw+TMVKjE115q+cJ91rf+rlxPzpxSsM0B0oks5Xd/prKoexhm6NrIk0tol2K5QlE0cLRGlibzBpAW1nNqecy9uo1UIru1MfW4801XGZyR1X2Qg5Q/Yg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=v19r6Fv9egd8bjgxoEEnZwP38KJVO1VfkU7wLynOOIk=; b=DVUzberNuQGCa4BTlo2c1iV/N5v+0ISBdoOcvfCMnE3IawYORLDsoaM6vJcsZcCuHw4Ix9zPJv3gMIGnzGPnvAxAjnFML0aDuO/D/SaIFE2ErpEM+EZCRevy8rykGIl5ISyc4G1B+gf5LT7Y5I96Do5DC/c1gtDk94nPDySehNO0hja5gise/hO50yGnEXzv1zn1Pq77GAmBEh5jZVYiWjJ9j0y0EEh1kNIvDif6VxW5TuML4/cBqj1jXFibZxb0nSn8s4lTH9LXpw8Kp72XV5dG1ow2C79qUvKfPkJQf0XTkYDwuwun4TMRn2NrTuv3+u8glIK9+z9nqqKjiwlc4Q== Received: from DM5PR13CA0058.namprd13.prod.outlook.com (2603:10b6:3:117::20) by BN6PR12MB1297.namprd12.prod.outlook.com (2603:10b6:404:14::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.29; Mon, 10 May 2021 16:19:52 +0000 Received: from DM6NAM11FT028.eop-nam11.prod.protection.outlook.com (2603:10b6:3:117:cafe::82) by DM5PR13CA0058.outlook.office365.com (2603:10b6:3:117::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.20 via Frontend Transport; Mon, 10 May 2021 16:19:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT028.mail.protection.outlook.com (10.13.173.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:19:52 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:19:50 +0000 From: Xueming Li To: Harman Kalra CC: Luca Boccassi , dpdk stable Date: Tue, 11 May 2021 00:01:56 +0800 Message-ID: <20210510160258.30982-167-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f4b52886-0719-46d0-05ab-08d913cf710f X-MS-TrafficTypeDiagnostic: BN6PR12MB1297: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qUpH9fgvq5AXTPDuNP6RMw9i9/Adi0lFTa8VYnozimoDbeIcfTlumn81IgUnROkcWHrHRt0Cylo1UTQazTx67MKD6vd865GjBxpFwagP4kPDj644Lv4fQrZwQTFKsOR2l3Pfjt9zCuTeFQhogWxorUzyf50yFvGZHoYEMKC2Y2r0KEXp5LLJwhg1niaTdyl0koad+6v9dxevEuEFCel6Go/Ed264uDgexup58tn0+zxTXpZxUsw6IsIR3N0yolDnDJ+KGkTPdQbNCqClrzffZ8ROQ5zU++QMTn7b61biYiWV1ti1KuPDu/D7ntvVUCCSB27qEqaXwwCFVRUavVfD3TCBtkCilwTJ+TCS3jnj/sWDJkM0FAawM+IiYhXqn8T8y1GEBEnZfeam+spbnY0Fn7mQP+XnT+c/YtE1ge1Gk+lRDl4Gw5G7wkNWeuE2rwvyGqwHvqWv/NFJ9oXuI1kOxLfhMxVi0abBDgqhCs4Jn6DDKnLFoaGI6RRnOW2Le6sMc/ehUVyUFf8SIUTJ2zx6tNYm7HVT6T8BdD610Z5S3MNuksuKQZ9iryUOEf7wCVFhuni0e19PQH6ku7DdBHSA0WU5wWreC4Kmp7cQkTKyRh2xArOAxjOfHp47wJ1gGYrQ5de4alnxvd7ipjgVpVh5HeTmhR0hvV52uFr2RMkcqixgi3v7H4C0uh0Wp8HhecIcLCrdDptP9fAMbA/Ik7rF+RdjUhhCV4pmXvhVloofjsauWFJsFILE2W0/ejzWIR7+IhYwn5gnjydfWddo8Yycfg== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(396003)(376002)(346002)(136003)(39860400002)(46966006)(36840700001)(6916009)(7636003)(6286002)(478600001)(356005)(70206006)(82310400003)(82740400003)(86362001)(8676002)(83380400001)(70586007)(7696005)(1076003)(2616005)(36756003)(966005)(8936002)(36860700001)(16526019)(5660300002)(54906003)(426003)(53546011)(2906002)(186003)(26005)(4326008)(36906005)(316002)(55016002)(47076005)(336012); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:19:52.4494 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f4b52886-0719-46d0-05ab-08d913cf710f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT028.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1297 Subject: [dpdk-stable] patch 'event/octeontx2: fix device reconfigure for single slot' has been queued to stable release 20.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/12/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/eb30365e9ec6ee135884922052afdf8225247eaa Thanks. Xueming Li --- >From eb30365e9ec6ee135884922052afdf8225247eaa Mon Sep 17 00:00:00 2001 From: Harman Kalra Date: Mon, 5 Apr 2021 21:54:15 +0530 Subject: [PATCH] event/octeontx2: fix device reconfigure for single slot Cc: Luca Boccassi [ upstream commit 340d22cdd14802de3f80859a940dfa178b0de7ca ] When device is re-configured, memory allocated for work slot is freed and new memory is allocated. Due to this we may loose some important configurations/mappings done with initial work slot memory. For example, whenever rte_event_eth_tx_adapter_queue_add is called some important meta i.e. txq handle is stored in work slot structure. If device gets reconfigured after this tx adaptor add, txq to work slot mapping will be lost resulting in seg fault during packet processing, as txq handle could not be retrieved from work slot. Fixes: 67b5f4686459 ("event/octeontx2: add port config functions") Signed-off-by: Harman Kalra --- drivers/event/octeontx2/otx2_evdev.c | 34 +++++++++++++--------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/drivers/event/octeontx2/otx2_evdev.c b/drivers/event/octeontx2/otx2_evdev.c index 0fe014c24a..3afb5a30e7 100644 --- a/drivers/event/octeontx2/otx2_evdev.c +++ b/drivers/event/octeontx2/otx2_evdev.c @@ -883,29 +883,27 @@ sso_configure_ports(const struct rte_eventdev *event_dev) struct otx2_ssogws *ws; uintptr_t base; - /* Free memory prior to re-allocation if needed */ if (event_dev->data->ports[i] != NULL) { ws = event_dev->data->ports[i]; - rte_free(ssogws_get_cookie(ws)); - ws = NULL; - } + } else { + /* Allocate event port memory */ + ws = rte_zmalloc_socket("otx2_sso_ws", + sizeof(struct otx2_ssogws) + + RTE_CACHE_LINE_SIZE, + RTE_CACHE_LINE_SIZE, + event_dev->data->socket_id); + if (ws == NULL) { + otx2_err("Failed to alloc memory for port=%d", + i); + rc = -ENOMEM; + break; + } - /* Allocate event port memory */ - ws = rte_zmalloc_socket("otx2_sso_ws", - sizeof(struct otx2_ssogws) + - RTE_CACHE_LINE_SIZE, - RTE_CACHE_LINE_SIZE, - event_dev->data->socket_id); - if (ws == NULL) { - otx2_err("Failed to alloc memory for port=%d", i); - rc = -ENOMEM; - break; + /* First cache line is reserved for cookie */ + ws = (struct otx2_ssogws *) + ((uint8_t *)ws + RTE_CACHE_LINE_SIZE); } - /* First cache line is reserved for cookie */ - ws = (struct otx2_ssogws *) - ((uint8_t *)ws + RTE_CACHE_LINE_SIZE); - ws->port = i; base = dev->bar2 + (RVU_BLOCK_ADDR_SSOW << 20 | i << 12); sso_set_port_ops(ws, base); -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:30.929227500 +0800 +++ 0168-event-octeontx2-fix-device-reconfigure-for-single-sl.patch 2021-05-10 23:59:26.610000000 +0800 @@ -1 +1 @@ -From 340d22cdd14802de3f80859a940dfa178b0de7ca Mon Sep 17 00:00:00 2001 +From eb30365e9ec6ee135884922052afdf8225247eaa Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 340d22cdd14802de3f80859a940dfa178b0de7ca ] @@ -17 +19,0 @@ -Cc: stable@dpdk.org @@ -25 +27 @@ -index 770a801c4e..cdadbb2b21 100644 +index 0fe014c24a..3afb5a30e7 100644 @@ -28 +30 @@ -@@ -885,29 +885,27 @@ sso_configure_ports(const struct rte_eventdev *event_dev) +@@ -883,29 +883,27 @@ sso_configure_ports(const struct rte_eventdev *event_dev)