From patchwork Tue Mar 3 12:52:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Blakey X-Patchwork-Id: 1248351 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=mellanox.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 48Wxkj3DT6z9sPg for ; Tue, 3 Mar 2020 23:53:01 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728925AbgCCMw6 (ORCPT ); Tue, 3 Mar 2020 07:52:58 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:53289 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728056AbgCCMw6 (ORCPT ); Tue, 3 Mar 2020 07:52:58 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from paulb@mellanox.com) with ESMTPS (AES256-SHA encrypted); 3 Mar 2020 14:52:56 +0200 Received: from reg-r-vrt-019-120.mtr.labs.mlnx (reg-r-vrt-019-120.mtr.labs.mlnx [10.213.19.120]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 023Cqu3r009481; Tue, 3 Mar 2020 14:52:56 +0200 From: Paul Blakey To: Paul Blakey , Saeed Mahameed , Oz Shlomo , Jakub Kicinski , Vlad Buslov , David Miller , "netdev@vger.kernel.org" , Jiri Pirko , Roi Dayan Subject: [PATCH net-next v3 0/3] act_ct: Software offload of conntrack_in Date: Tue, 3 Mar 2020 14:52:50 +0200 Message-Id: <1583239973-3728-1-git-send-email-paulb@mellanox.com> X-Mailer: git-send-email 1.8.4.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This series adds software offload of connections with an established ct state using the NF flow table offload infrastructure, so once such flows are offloaded, they will not pass through conntrack again, and instead act_ct will restore the conntrack info metadata on the skb to the state it had on the offload event - established. Act_ct maintains an FT instance per ct zone. Flow table entries are created, per ct connection, when connections enter an established state and deleted otherwise. Once an entry is created, the FT assumes ownership of the entry, and manages it's aging. On the datapath, first lookup the skb in the zone's FT before going into conntrack, and if a matching flow is found, restore the conntrack info metadata on the skb, and skip calling conntrack. Note that this patchset is part of the connection tracking offload feature. Hardware offload of connections with an established ct state series will follow this one. Changelog: v1->v2: Removed now unused netfilter patches Paul Blakey (3): net/sched: act_ct: Create nf flow table per zone net/sched: act_ct: Offload established connections to flow table net/sched: act_ct: Software offload of established flows include/net/tc_act/tc_ct.h | 2 + net/sched/Kconfig | 2 +- net/sched/act_ct.c | 353 ++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 355 insertions(+), 2 deletions(-)