From patchwork Sat Feb 4 22:02:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xin Long X-Patchwork-Id: 1737575 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=openvswitch.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=K3pKILzh; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P8RNR0Prtz23j3 for ; Sun, 5 Feb 2023 09:03:01 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 3C76C60BD2; Sat, 4 Feb 2023 22:02:59 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3C76C60BD2 Authentication-Results: smtp3.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=K3pKILzh X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b3FFp60eqgzK; Sat, 4 Feb 2023 22:02:58 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 76DB560BB9; Sat, 4 Feb 2023 22:02:57 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 76DB560BB9 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1E7C4C0032; Sat, 4 Feb 2023 22:02:57 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 910FEC002B for ; Sat, 4 Feb 2023 22:02:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 4BDBE41A4A for ; Sat, 4 Feb 2023 22:02:55 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 4BDBE41A4A Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=K3pKILzh X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X1fNk9b14GcX for ; Sat, 4 Feb 2023 22:02:54 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 5887941A38 Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) by smtp4.osuosl.org (Postfix) with ESMTPS id 5887941A38 for ; Sat, 4 Feb 2023 22:02:54 +0000 (UTC) Received: by mail-qt1-x82f.google.com with SMTP id g7so9277028qto.11 for ; Sat, 04 Feb 2023 14:02:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=lQp4LVk/4b2FzptlpI9PWAg/BVnyMUI45zZl3tp4l5A=; b=K3pKILzhw+vY3oo0gTAWxymz8bau31+gxN0nYGpaaLSMiZHkAfKknM/F784gtToVzE iJN+D/QzHRU9SKnlc+Lc+7ll7uNSVrxFgKJZD+TV5ofXHK+pmtBkLKe6QbMUpUl9gYTf 9qR1T+XjEGBZ0X/RhYbTpxyBNsLkSVAzHBm4T+7lBZVKPbIz9KUoWjr3T9x6+nT8BzSj Rh2rLy74/s/MHiPmmLM3P9Y0f31US3bXmeN+IJeF9lgQzkd5Ds+dBao/am7sWe2qGI2S gPOi7o2R6HXSRZyCcPTv39AuFRW3F+DVSyKaXLxe1C8ph10tjixaVG8Kjk+C6hGTKiku ZTDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lQp4LVk/4b2FzptlpI9PWAg/BVnyMUI45zZl3tp4l5A=; b=1vzVRzYTX6Y57SIQQiZ4PzTuXkkNOeLN/iYWuqS0emuQxWZv4hBU1wiUxAGpDdXkxY NEU4k+YnY5Z/3I4PXqY/Fv+C7/eEEuPUT0iZJG2mpFsuGOUXTaksr5+oQmhqsjEolZhK wIBEKLAjyu+l0PtHkjQVhtWU3FSXM/K2yw1SITreaMhQXy5qHXMO8yvV7TwLMkd5N5Sr 1eA8MlcYrkYLYNAghTaMevLgY+fsEGno/I+wTDtYTQujJvpKsXO3Y+UAJBhsttzT5CRr WceWYE9GwgiIt4kWOAMufJojdsV0SYIFArLsW4z/Fjpg/SUodziR8Dzk+L1S4rFtOlLX +R1g== X-Gm-Message-State: AO0yUKUWDBOLpK0Gb4sndkZelw1+eqfeH+2i5KothITe/uW+Umyzf78a Qipmn/lDnLPsjKmdCEGqF7U= X-Google-Smtp-Source: AK7set/XQHV3FoniOuEqugGew4FFHp8L5z0VLitzNyzsMHCp16Z2MYRTSnvYGypb9bFd1BOJY2pQ0Q== X-Received: by 2002:ac8:7e8f:0:b0:3a8:e35:258f with SMTP id w15-20020ac87e8f000000b003a80e35258fmr29559374qtj.31.1675548173169; Sat, 04 Feb 2023 14:02:53 -0800 (PST) Received: from wsfd-netdev15.ntdv.lab.eng.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id dm40-20020a05620a1d6800b006fef61300fesm4423061qkb.16.2023.02.04.14.02.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Feb 2023 14:02:52 -0800 (PST) From: Xin Long To: network dev , dev@openvswitch.org Date: Sat, 4 Feb 2023 17:02:46 -0500 Message-Id: X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Cc: Marcelo Ricardo Leitner , Jiri Pirko , Florian Westphal , Jamal Hadi Salim , Ilya Maximets , Eric Dumazet , Cong Wang , kuba@kernel.org, Paolo Abeni , davem@davemloft.net, Pablo Neira Ayuso Subject: [ovs-dev] [PATCH net-next 0/5] net: move more duplicate code of ovs and tc conntrack into nf_conntrack_ovs X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" We've moved some duplicate code into nf_nat_ovs in: "net: eliminate the duplicate code in the ct nat functions of ovs and tc" This patchset addresses more code duplication in the conntrack of ovs and tc then creates nf_conntrack_ovs for them, and four functions will be extracted and moved into it: nf_ct_handle_fragments() nf_ct_skb_network_trim() nf_ct_helper() nf_ct_add_helper() Xin Long (5): net: create nf_conntrack_ovs for ovs and tc use net: extract nf_ct_skb_network_trim function to nf_conntrack_ovs openvswitch: move key and ovs_cb update out of handle_fragments net: sched: move frag check and tc_skb_cb update out of handle_fragments net: extract nf_ct_handle_fragments to nf_conntrack_ovs include/net/netfilter/nf_conntrack.h | 4 + net/netfilter/Kconfig | 6 + net/netfilter/Makefile | 1 + net/netfilter/nf_conntrack_helper.c | 98 --------------- net/netfilter/nf_conntrack_ovs.c | 178 +++++++++++++++++++++++++++ net/openvswitch/Kconfig | 1 + net/openvswitch/conntrack.c | 80 ++---------- net/sched/Kconfig | 1 + net/sched/act_ct.c | 76 ++---------- 9 files changed, 210 insertions(+), 235 deletions(-) create mode 100644 net/netfilter/nf_conntrack_ovs.c