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 8A943A0C61 for ; Fri, 5 Nov 2021 07:11:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7A6EB4111D; Fri, 5 Nov 2021 07:11:22 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2070.outbound.protection.outlook.com [40.107.237.70]) by mails.dpdk.org (Postfix) with ESMTP id 1F64D40151; Fri, 5 Nov 2021 07:11:20 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dhBIS/TUnoUjWb92TtT9aWq99hcOIvZjX+ozqabiX1RKI1524uo9r/pfjh9C7newM9o41S01FbDUbCPmvdgTr054PzNoDT9w/tQ6zyf7sJYl+3JVzCHqCo9dv/fIxRBDvl67RfP9XiTlRQWhejx2bCsP19QT0f0VjYMVDsrM7/mbYMIZadPV8PvI6sPJnHPZAL1Un3YNBTRvATgdiw/bLJZwIFDD7+m4BuDFJNlbwgRx66Ra5s7hfeitVlDRJwqj0tW7mbE6563CasSEputvDMdEAoK37euSSSl7JOnV2KV5+F4yBxKDEEezQ43rKBZp5ocVtRag0HM+NAqBZeUM9Q== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=X7hREDri5TW5ZKAkT7OO9Fe+reA9oCARAQOAJtO9D6s=; b=MASod2PDjSnpMS7bAn61H51NYB/GUqiypVuxtdMWaXLgILy/X130rtHj51yxmSapKLD0lMHvQ/ddPdSwoz0xttZZSeNde2CpJo+UszZsaJHAwb9FOTKky6Vfpr1KR+pOhmU0KEvhjrpCA4xSN2ZlSTFfg65oQ48HAPJ9u5T+OT8N6hEAx4qquDn+6H+rI2poWLzMvSck+UpWTU3H6wYzNOmp9XOGSIT1qViZDMZ0JuG/Q6bVl43LiXFNTuKHfRRt0D/apMlclCL5Htce56Lpy2JCpdyaGUDbEgOvWc/e1eN1IVPs6S3Muq/Zr8qPCu4iF9MOo7FZ2/S6Ov1ppU+IsA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=6wind.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine 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=X7hREDri5TW5ZKAkT7OO9Fe+reA9oCARAQOAJtO9D6s=; b=MAAHeOC3cWVTMb5632l2DZmWgI0c56zbf0gcwH5bzMlO2MKnhFTxYXPJ+BkTmxT85sASQKM5yJB0DsxEFllNIi9Em8WMrpVTKC7McgYYUahyo2hNb+t2mKveHjJuRFzg4nRCA55rF3/iiWqnlV5I1jqGCU/tf4Oldca4J4NXrDMI+ON4Q3KRmv6hPMreU1jzcSQQGC4G5aU5uD18VEI8NkLr465e55Xx3NlQb9GL7KK/qlO1mvNjQEZT3ipgGjQm2ou9N5gyeXzcPsgrM86pyqibIAM+8QjVgwwbskUhY59sWRLmiu0kiNqhaq4NsR1T3sJ9Mw6kp2VA3JCsvTTQDA== Received: from MWHPR03CA0007.namprd03.prod.outlook.com (2603:10b6:300:117::17) by MW2PR12MB4684.namprd12.prod.outlook.com (2603:10b6:302:13::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Fri, 5 Nov 2021 06:11:14 +0000 Received: from CO1NAM11FT056.eop-nam11.prod.protection.outlook.com (2603:10b6:300:117:cafe::48) by MWHPR03CA0007.outlook.office365.com (2603:10b6:300:117::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Fri, 5 Nov 2021 06:11:14 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; 6wind.com; dkim=none (message not signed) header.d=none;6wind.com; 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 CO1NAM11FT056.mail.protection.outlook.com (10.13.175.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Fri, 5 Nov 2021 06:11:13 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 5 Nov 2021 06:11:11 +0000 From: Bing Zhao To: , CC: , , , , Date: Fri, 5 Nov 2021 08:10:57 +0200 Message-ID: <20211105061057.121797-1-bingz@nvidia.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5502b14c-7d69-4287-71ff-08d9a023124d X-MS-TrafficTypeDiagnostic: MW2PR12MB4684: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x+sBDGN+Oa7gx/Ey2ZZ86SvBc4xUGxNfqIxZZpT217LwSi0BwoW6MgLo8qfpSlz9eFyvoSiBOgX2ge/1y2cJkokFoUufJ7Hodi7IB1PxPydD9BhYGlHM12iho8/m1d6W5PlMAR3mOAMc3Tajlll8AH0jYjQULXSc9mMwUsP09+g0kwpwIhfxakNhcN7x0XZswiyPJuAMR6ReuZGfgB/xfbJVnJfKhfysG7LGbPj0TRDN31esbEDpdNRzl7wtJzNmPIZVO5m6ACe433GgazvghF8boFJDLxHbQv1s0750DDdzS3exYOwXB2pwQRYrrSMnz6uxynBn30RTqsfD9/Q3PsfIR0JpVgUFLIyMH8pkVQAKXYCKZthZjsYRGvzWzc7y11UEkbx1/hM3SLgCPvszZo8MIDihxhyNbw4M/O2QbwUU261XducE6JWIZJKmJ2olkkAiy4c11Zt3I9LLjcsWX9HP2atMI30f6+ZNfZ9JDwFudFFzOEURlpgLLxxQaUbPKhv/6wEfrmZbSE3j4m2lzuyAqy0fdmnbfQli9RYC0aYJtMWMUVe8MLJGl8xSEkd5hIQPV59Drd8Et7cW/NVXL95B1Mjm6+CcJmNLYEU6A9JlAyWTP9ESI7pg3sILYBLe0ZD4ljNLQhhxZj0KRlExhAJ/qDT7lQfNZBT5Zpqjo3eCvcbyV5uQSQ/sX+dYI2z0GobcpigEHfhYbECeRFcuKA== 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)(36840700001)(46966006)(54906003)(1076003)(6666004)(15650500001)(5660300002)(55016002)(26005)(316002)(2616005)(83380400001)(4326008)(426003)(2906002)(86362001)(16526019)(110136005)(8936002)(6636002)(82310400003)(36756003)(186003)(36860700001)(356005)(70206006)(508600001)(70586007)(336012)(7696005)(7636003)(8676002)(47076005)(6286002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Nov 2021 06:11:13.9591 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5502b14c-7d69-4287-71ff-08d9a023124d 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: CO1NAM11FT056.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR12MB4684 Subject: [dpdk-stable] [PATCH] net/mlx5: fix the RETA update without stopping device 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" The global redirection table is used to create the default flow rules for the ingress traffic with the lowest priority. It is also used to create the default RSS rule in the destination table when there is a tunnel offload. To update the RETA in-flight, there is no restriction in the ethdev API. In the previous implementation of mlx5, a port restart was needed to make the new configuration take effect. The restart is heavy, e.g., all the queues will be released and reallocated, users' rules will be flushed. Since the restart is internal, there is a risk to crash the application when some change in the ethdev is introduced but no workaround is done in mlx5 PMD. The users' rules, including the default miss rule for tunnul offload, should not be impacted by the RETA update. It is improper to flush all rules when updating RETA. With this patch, only the default rules will be flushed and re-created with the new table configuration. Fixes: 3f2fe392bd49 ("net/mlx5: fix crash during RETA update") Cc: nelio.laranjeiro@6wind.com Cc: stable@dpdk.org Signed-off-by: Bing Zhao Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_rss.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c index 75af05b7b0..e2b478b75c 100644 --- a/drivers/net/mlx5/mlx5_rss.c +++ b/drivers/net/mlx5/mlx5_rss.c @@ -218,12 +218,6 @@ mlx5_dev_rss_reta_update(struct rte_eth_dev *dev, MLX5_ASSERT(reta_conf[idx].reta[pos] < priv->rxqs_n); (*priv->reta_idx)[i] = reta_conf[idx].reta[pos]; } - priv->skip_default_rss_reta = 1; - - if (dev->data->dev_started) { - mlx5_dev_stop(dev); - return mlx5_dev_start(dev); - } - return 0; + return mlx5_traffic_restart(dev); } -- 2.27.0