From patchwork Sun Jun 4 13:55:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liming Sun X-Patchwork-Id: 1790098 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=sECKonq3; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QYyvN1YgXz20Tj for ; Sun, 4 Jun 2023 23:56:14 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1q5oD9-00084n-HM; Sun, 04 Jun 2023 13:55:59 +0000 Received: from mail-dm6nam12on2088.outbound.protection.outlook.com ([40.107.243.88] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1q5oD6-00084J-Hy for kernel-team@lists.ubuntu.com; Sun, 04 Jun 2023 13:55:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NCkjPWlP67LDzIaa0UbG9JxvbZxU8IAynQcusonZYdjuXtYYKli9239IZdFpHRg1EfaPpob4m/vzIwPFs9xa3/s3Ce3bZ+izDI4zptY31fAXqjMGQLyqwyqcmSl83Zw7/vc6wetTSehJBH2FlMJoK+fRTVAu+3FFS9HSj2xA/fPmiMJPMLIJFFTURaVLRntmw592jDLXV18ZeO9u+yW0FNfi14iZf/+KmTFsV81/SuwhI6rwIOA0bOHMcBb80ddF9SaTaNt7eE0XnSNgIHCO/aDbibDRnPe/REoUgoFQtvpCtHyjRvSKd7P+vc55b+MYfH4ieAoplEHAlUcdK/xL9w== 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=hBMbYamiYL3kHb7qB+UWuc66qw5WLYlwyhr27U2DcCc=; b=mGos/9gTm6QlLUehvk9x33ZQMw5c545lNrMtItrzv5wVhtbXsH3a9ACWLqXK8tyr1meeScndL3eFhYrGHQXniPFZd/ELQMekAxTHZrIZu5Tnq8buT+YgzStiOsw5SbEE5xDO3pzuR980kyrD93mMp0QOIp7GNq7JxBNJysBz/uoFTpHOg3KL2jpYMHTnzidrgF6OiEHadj66tAEodWSYZyNea1d6w0NmhwaBr0QC+iLjL4Rm9eRsC7OBdY9MFY7VXF1CZTkNIwGUXP2nAFuMXpIrqS4wfFUxBRRM1H2u5D2/IO7fMocYMheqOmjfMAyDbIookcH2BouTFfjz0maCSw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=lists.ubuntu.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=hBMbYamiYL3kHb7qB+UWuc66qw5WLYlwyhr27U2DcCc=; b=sECKonq3+QZ+r929xj9hY1HEZdc90qEPUopp5dQTrCs8VT0b+TZ55tSmjxi/JMOZUWIJO84pR+MxKQ98iSavaz50p9HtZ3EkdRa2AamI2IRLsNdnXL94xOu+PNXHAsMaI/csqv60ozH9/frbs0RW0Jus5tWvCN2Am9gikIIMV30esgZvVc+r9Wp68AKek8Ex3hKa8TpZRyKl5xenvqEDk0pXwDjCPycIpxyYTpQYn0cJxy7v5YReKvNce3dqzyMFzyJmJnvvVnlVRoVOwMufqkjfkegq2281vGR87sYbk47fZgw73WmkzS2zm5HUhXkd8udKMwGrLET+9Y9p10LbYQ== Received: from SA0PR11CA0163.namprd11.prod.outlook.com (2603:10b6:806:1bb::18) by BL0PR12MB4884.namprd12.prod.outlook.com (2603:10b6:208:1ca::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.31; Sun, 4 Jun 2023 13:55:52 +0000 Received: from SA2PEPF00001508.namprd04.prod.outlook.com (2603:10b6:806:1bb:cafe::1d) by SA0PR11CA0163.outlook.office365.com (2603:10b6:806:1bb::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.32 via Frontend Transport; Sun, 4 Jun 2023 13:55:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by SA2PEPF00001508.mail.protection.outlook.com (10.167.242.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.14 via Frontend Transport; Sun, 4 Jun 2023 13:55:51 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Sun, 4 Jun 2023 06:55:40 -0700 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Sun, 4 Jun 2023 06:55:40 -0700 Received: from vdi.nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Sun, 4 Jun 2023 06:55:39 -0700 From: Liming Sun To: Subject: [PATCH v1 0/2] [SRU][F:linux-bluefield][PATCH v1 0/2] UBUNTU: SAUCE: mlxbf-tmfifo: robust fix to drop over-sized packet or no Rx descriptors Date: Sun, 4 Jun 2023 09:55:28 -0400 Message-ID: X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00001508:EE_|BL0PR12MB4884:EE_ X-MS-Office365-Filtering-Correlation-Id: 1a1f5338-1610-457a-2568-08db650368cf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: APyQzn2RoFMvd1wZ24DSBFbMsF4tDrETr3yC5qqO3EfpKpBfLvK8MNH47ZxWQ/XFjPae58vbD4nppSOD5kYLQu4dVNxjQDepXbauAwEJAIniXj3TscebWJQTuRR1nDHfLAkZNx/p+wmLHjS081UIwWsCE73mt6FE9Bi/17MJkrISWsU0ZOQW4IM5YkDig3/4eD/CQYNWVhP3QyNiQqY8KNCg3MrihXGlI5HoWBs/1D4Ow+K2lzI0TZ4FfbCr1qD6ICD1QImpxs858kWJcqjU0zm8u51BSqUVYSSM5UaKapSIU/hTto4CwkHUumfDYRmUCzKZtt4zNLiqYW4pouLlZzEjG/U73qqbu5fgcxFCocsvQ2m/qEsZrQeqahEsvZO1gC87cj7/BRAhfMkIuBKNdXmZGK3apsV7U5hCgVLI7XkCBKHAcJGPbn2LtTEOyIGhdsBLKstTPhh6W73BxJTI4bKNBJXwySJRFNEXC0yDldv+t6eMGEhgAGl8rEnB69dgf1qrpW6zQpofe2cXnxDhp93TrRTemVOkzzOsd1ti2rs0FYf5hsVBsFp7vbJhTYeznqoiPLByy3dSXTv0j844RrUZj5DbYZWOE4MqaAIvk70giDDobkbS8QtpLAO4bscNlZolpO8a6Wj06o424gTm+5phq9iSWRTDzjZfsQ+1YpPPftbj7aoIc9NLQPRC3ZwE5tyUQuk7GHQsOPI+HGOJ3fiPcMejV/WfP8GisNeTqZFrnVTHbQULp4vvS7JjSq0yMIR2xu+8UEu2czQIxAq6JdsV6WPWxCM0lu/bKJsq0RM= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(39850400004)(376002)(396003)(346002)(136003)(451199021)(40470700004)(46966006)(36840700001)(40460700003)(478600001)(8936002)(8676002)(5660300002)(36756003)(2906002)(86362001)(82310400005)(4326008)(6916009)(70206006)(70586007)(316002)(82740400003)(40480700001)(7636003)(356005)(41300700001)(83380400001)(47076005)(2616005)(26005)(186003)(107886003)(426003)(336012)(36860700001)(7696005)(966005)(6666004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2023 13:55:51.9520 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1a1f5338-1610-457a-2568-08db650368cf X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF00001508.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4884 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Sun Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2021749 SRU Justification: [Impact] This change is needed to avoid potential tmfifo console stuck when network interface is down or receiving oversized packets. [Fix] Drop the Rx packets in the above cases. Since tmfifo is shared resource for both console and networking. Dropping such network packets can continue to process the fifo and avoid console stuck. [Test Case] Same functionality and testing as on BlueField-1/2/3. No functionality change. Add negative tests: - 'ifconfig tmfifo_net0 down' on ARM side during traffic, then verify rshim console doesn't stuck. - Config MTU to 4000 on rshim host and send oversized packet with command 'ping 192.168.100.2 -s 2000". It shouldn't cause any stuck. [Regression Potential] Same behavior from user perspective. Liming Sun (2): mlxbf-tmfifo: Drop the Rx packet if no more descriptors mlxbf-tmfifo: Drop jumbo frames drivers/platform/mellanox/mlxbf-tmfifo.c | 98 +++++++++++++++++------- 1 file changed, 71 insertions(+), 27 deletions(-) Acked-by: Tim Gardner Acked-by: Bartlomiej Zolnierkiewicz