From patchwork Sun Apr 11 11:45:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roi Dayan X-Patchwork-Id: 1464792 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) 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: 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=P0VqpErc; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FJ96t4378z9sW1; Sun, 11 Apr 2021 21:45:58 +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 1lVYXL-0004K2-Bk; Sun, 11 Apr 2021 11:45:55 +0000 Received: from mail-bn8nam12on2059.outbound.protection.outlook.com ([40.107.237.59] helo=NAM12-BN8-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 1lVYXI-0004Ik-MR for kernel-team@lists.ubuntu.com; Sun, 11 Apr 2021 11:45:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YwNpmGKzDa6+YuyogdHmOcPocr/27TbOHkvpZBjtDW4kV0fPE8ICcgkAI/eP0cYfSqNEHMAdEG3UkosgfBpJ7hbsnYuECaWNLcRTM7lJ6tMx5Qa6HWw6b6iCHRcbJJY4yg92YrZAkAGeGUbYtIFryMfWXy7MT4DjWAJ1Lz2DYii7ealzQ4yc091BoFoAmrF0Z5QrubEf/Ju7O/yDkMIhzxZDC5Z93R1bK/bNDtAHVTzFGBJ0A8zfzRsPl6J7OHaG6+ALJHFZ2Ja0Xu2Q35EmjlIE/Hv8ay60kTAxZPT842UZ+6gY6fILgsl3B1CgOaTUf5IUKYaHeFLiWe1gfDPuqA== 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=JZ8j6+Cr/8KtkDzCSEHOlNl+GXZDtJNGO6uSbDyQzFM=; b=HeORGRG1jHSHUTmvrlEcCffVl9GjzOT68iNSGLD0/ouQbMY71LQ/Hgh/Bp8USeCxwOGLCVqMnUSNCJqxHne8KBstMdmGyWln99+IhNnad/z54xTQoMOb+LZHtG3Htx09deepnn0QFglTyQTqthV8IstZTVikI7Mngb7fHg3PXlh7PWRMOsqly8aAS8wIRBhYc7uDobg0k+mqahy9TJZ6JqvEKV3eqg62/z4J+NaDykUrTs4ZzWlginrs0p403Eb1UCsK7C26ZPtzwb1pHmfrX20b0Wt1aSr6Tu+cN+4Jsujr78+mVW0hEfSLALBaZByrcl8o6lGtqPZ6A609YQurkA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.36) smtp.rcpttodomain=canonical.com 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=JZ8j6+Cr/8KtkDzCSEHOlNl+GXZDtJNGO6uSbDyQzFM=; b=P0VqpErcTGDWWbY26H5AJ8TMGD2afoyN60D04ei1PIZnXeZYOslmjx8tfaAQuyexMpoDklOHuOkU0OqNOvHo1GOzcKLGpiZQzv3IONlc9hOROvBOzV1+28Z7NQHboG91geXM4Cls67xA31lYpSTBANvptjy1P01jeiBpG/h3Dqj36MaEVK/pBk3dWhMdJQjaDZmghyq7cd9seRa+CIvoDpx1HBJxf3odeT+nZd5eZL5A2y4mnnAL0a6XYcvEpW2tWGcg/QHsAA41fL56WaFm8+M5r9xCtSOjH52UfeaIsBRiGOGzRjHw7MbGr766s0OT3mSYFpP+qSm/hO/bHqXdwQ== Received: from DM6PR02CA0101.namprd02.prod.outlook.com (2603:10b6:5:1f4::42) by SN6PR12MB4718.namprd12.prod.outlook.com (2603:10b6:805:ee::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.17; Sun, 11 Apr 2021 11:45:50 +0000 Received: from DM6NAM11FT050.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1f4:cafe::86) by DM6PR02CA0101.outlook.office365.com (2603:10b6:5:1f4::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.17 via Frontend Transport; Sun, 11 Apr 2021 11:45:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.36) smtp.mailfrom=nvidia.com; canonical.com; dkim=none (message not signed) header.d=none;canonical.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.36 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.36; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.36) by DM6NAM11FT050.mail.protection.outlook.com (10.13.173.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4020.17 via Frontend Transport; Sun, 11 Apr 2021 11:45:49 +0000 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 11 Apr 2021 11:45:48 +0000 Received: from dev-r-vrt-138.mtr.labs.mlnx (172.20.145.6) by mail.nvidia.com (172.20.187.18) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sun, 11 Apr 2021 11:45:47 +0000 From: Roi Dayan To: Subject: [SRU][F:linux-bluefield][PATCH 0/2] reduce memory bloat and aging active ct conns Date: Sun, 11 Apr 2021 14:45:41 +0300 Message-ID: <20210411114543.2003514-1-roid@nvidia.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 92b9587e-3d65-4b19-4744-08d8fcdf5a9d X-MS-TrafficTypeDiagnostic: SN6PR12MB4718: 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: H4mHTNVHpNOlMlVbI7ONdOD2us302L0aOFlZNiZrrlRri5imyxuabky9QtrUBx7zmW+8OAy6qpI6GKuiysPmvs9H40CssUcMCQhgQKW7fAXLnFIClGrPzVaOcfvjCP7yih10jCQ68V7vHRnvSGduWrPn1FOV2JBlGb7WcORnbegqDkmpXngVES090DcohGAWWKSPJhEA/y9gdwjLl1Ha1vhGk0BDX8zTEYtAuLcKWTu9f7ZpA+C4PLw7PqgHaHPRIWsAu8qRV8aBDZQhPZuwYRQ0c2UGYEAkmFBR9sar1//mzWVHiHDGqND9k9SGPw/HgEzpcc/f13mkupFhuvCWABR/d2iPl+8zcpNFwVBGpu8evHc3HxqxBD4tUic8ozi1oclN4GiuaUwF9ChPWS4Oak6NMR/hggEpSaoEQB+r349/7Au0k1z4tzYLknhD7Nder0jQGd6bf3ofrpfqWp5jlt77NOhxoCV0FmYz36HLYjMg1qe6UrH9Z/oOl79FvzreanWdMNwDl5DzDNyJDN1JXiqdMGGbZwP4t3o3jbsxBZzfktbTmJDi+ckepT33vRLdcPfW6ngUuFpJ+TPaHnE9UB2HOG54zkQE2b7MymzE5eEoo181uvEW5Gt7GRVE3ymDMKcV4q7TRqbyNp++h0PPzHh8m/Uc97w9RI9AwCeMm8qtwmBWoo9z43nCX9vIz8PKKU+yKkgqDNEpB5X6PnS/zOvsQJi3pbPXfdywhtkWXKI= X-Forefront-Antispam-Report: CIP:216.228.112.36; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid05.nvidia.com; CAT:NONE; SFS:(4636009)(39860400002)(346002)(396003)(136003)(376002)(46966006)(36840700001)(86362001)(83380400001)(26005)(47076005)(36756003)(356005)(7636003)(186003)(478600001)(6666004)(70206006)(70586007)(82740400003)(1076003)(426003)(36906005)(36860700001)(8936002)(2616005)(316002)(8676002)(5660300002)(966005)(82310400003)(4326008)(6916009)(2906002)(54906003)(336012); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2021 11:45:49.9929 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 92b9587e-3d65-4b19-4744-08d8fcdf5a9d 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.36]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT050.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR12MB4718 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: Vladimir Sokolovsky , Daniel Jurgens Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1922678 SRU Justification: The patches are fixing a possible memory hog and aging active ct conns. * Explain the bug(s) Memory bloat and aging active ct conns can happen from any stress test as we have a single workqueue for handling the ct offload conns for add/del/stats actions. * brief explanation of fixes The fix is splitting add/del/stats for diff workqueue and also we set a limit for add work entries. The first patch is already upstream. * How to test Testing was done with just stress traffic with lots of conns different 5-tuple. * What it could break. Can take a lot of memory for a long time and also causing active conns to age out when not necessary. Oz Shlomo (1): netfilter: flowtable: separate replace, destroy and stats to different workqueues Roi Dayan (1): UBUNTU: SAUCE: netfilter: nf_flow_table_offload: Limit work entries on offload add wq net/netfilter/nf_flow_table_offload.c | 56 +++++++++++++++++++++++---- 1 file changed, 48 insertions(+), 8 deletions(-) Acked-by: Stefan Bader Acked-by: Tim Gardner