From patchwork Wed May 5 16:34:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Jurgens X-Patchwork-Id: 1474434 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=) 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 4Fb2Nk2sNFz9sW1; Thu, 6 May 2021 02:34:30 +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 1leKTi-0002C7-CQ; Wed, 05 May 2021 16:34:26 +0000 Received: from mail-il-dmz.mellanox.com ([193.47.165.129] helo=mellanox.co.il) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1leKTg-0002Bp-Mb for kernel-team@lists.ubuntu.com; Wed, 05 May 2021 16:34:24 +0000 Received: from Internal Mail-Server by MTLPINE1 (envelope-from danielj@nvidia.com) with SMTP; 5 May 2021 19:34:23 +0300 Received: from sw-mtx-hparm-003.mtx.labs.mlnx. (sw-mtx-hparm-003.mtx.labs.mlnx [10.9.151.78]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 145GYMMR001559; Wed, 5 May 2021 19:34:22 +0300 From: Daniel Jurgens To: kernel-team@lists.ubuntu.com Subject: [SRU][F:linux-bluefield][PATCH 0/4] Connection tracking fixes Date: Wed, 5 May 2021 19:34:18 +0300 Message-Id: <1620232462-140953-1-git-send-email-danielj@nvidia.com> X-Mailer: git-send-email 1.8.3.1 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: vlad@nvidia.com, danielj@nvidia.com MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" These patches aren't neccsarily related, but are order dependent, so sending as a series. SRU justification for each are provided below. Alaa Hleihel (2): net/sched: act_ct: Make tcf_ct_flow_table_restore_skb inline netfilter: flowtable: Make nf_flow_table_offload_add/del_cb inline SRU Justification: The patches are for removing module dependency between software module and driver module. * Explain the bug(s) Without the patches there is a dependency between mlx5_core, act_ct and nf_flow_table. * brief explanation of fixes The fix is moving used function from c source file to header file. * How to test Check module dependency with modinfo, lsmod, etc. * What it could break. If a sofwtare module doesn't exists, i.e. disabling in .config. then the driver module, mlx5_core, in this case will fail to load. Paul Blakey (1): netfilter: flowtable: Use rw sem as flow block lock SRU Justification: Increase flow insertion rate by using rw lock instead of mutex on the flow block. * Explain the bug(s) Insertion rate is done in multiple threads but there is a mutex lock between looking for the flow block which slows things down. So use a rw lock and take a read lock which is sufficient. * brief explanation of fixes Use a rw lock on the flow block. * How to test CT offload and check insertion rate of 5 tuples rules. * What it could break. Flow insertion rate. Roi Dayan (1): netfilter: flowtable: Free block_cb when being deleted SRU Justification: Free block_cb memory when asked to be deleted * Explain the bug(s) Missing memory cleanup. * brief explanation of fixes Free the memory * How to test Can be tested with kmemleak. Do ct offload then stop and clean tc ct rules and scan kmemleak. * What it could break. Memleak. include/net/netfilter/nf_flow_table.h | 51 +++++++++++++++++++++++++++++++---- include/net/tc_act/tc_ct.h | 11 +++++++- net/netfilter/nf_flow_table_core.c | 46 +------------------------------ net/netfilter/nf_flow_table_offload.c | 4 +-- net/sched/act_ct.c | 11 -------- 5 files changed, 59 insertions(+), 64 deletions(-) Acked-by: Tim Gardner