From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C3A4C282C3 for ; Fri, 25 Jan 2019 02:33:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5CE20218D0 for ; Fri, 25 Jan 2019 02:33:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728571AbfAYCdJ (ORCPT ); Thu, 24 Jan 2019 21:33:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38366 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728471AbfAYCdJ (ORCPT ); Thu, 24 Jan 2019 21:33:09 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A0239FDFF; Fri, 25 Jan 2019 02:33:08 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-7.gru2.redhat.com [10.97.116.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B4C06601AC; Fri, 25 Jan 2019 02:33:04 +0000 (UTC) Received: by localhost.localdomain (Postfix, from userid 1000) id DDB76180CDE; Fri, 25 Jan 2019 00:33:02 -0200 (-02) From: Marcelo Ricardo Leitner To: Guy Shattah , Marcelo Leitner , Aaron Conole , John Hurley , Simon Horman , Justin Pettit , Gregory Rose , Eelco Chaudron , Flavio Leitner , Florian Westphal , Jiri Pirko , Rashid Khan , Sushil Kulkarni , Andy Gospodarek , Roi Dayan , Yossi Kuperman , Or Gerlitz , Rony Efraim , "davem@davemloft.net" Cc: netdev@vger.kernel.org Subject: [RFC PATCH 0/6] Initial, PoC implementation of sw datapath of tc+CT Date: Fri, 25 Jan 2019 00:32:29 -0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 25 Jan 2019 02:33:08 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org We have been working on the sw datapath of tc+CT. We may not have much yet, but this should help to shed some light on what is needed, sw-datapath-wise speaking. Lets grease the wheels! Some key features are still missing like proper handling of conntrack labels, indexing all CT entries on a given act_ct action (so that we can purge them if the action is removed) and properly match on ct_state. All in all, if anything in there is not aligned with the planning RFC PATCH, is because it is still in progress, but fell free to highlight it anyway. A LOT more will be needed for handling the offloading. With these patches, this construction: ./tc filter del dev veth1 ingress ./tc filter add dev veth1 ingress proto ip \ matchall \ action ct zone 1 commit \ action goto chain 100 ./tc filter add dev veth1 ingress proto ip chain 100 \ flower ct_zone 2 \ action drop ./tc filter add dev veth1 ingress proto ip chain 100 \ flower ct_zone 1 \ action drop works, in the sense that replaying a tcp packet gets dropped by the last rule on chain 100, while the first one misses it. Regarding the goto chain used here, yes, that action has to be done within the ct action (as described in the planning and in the FIXME tag in 3rd patch). Marcelo Ricardo Leitner (6): flow_dissector: add support for matching on ConnTrack net/sched: flower: add support for matching on ConnTrack net/sched: add CT action net/sched: act_ct: add support for force flag net/sched: act_ct: add support for clear flag net/sched: act_ct: allow sending a packet through conntrack multiple times include/net/flow_dissector.h | 17 + include/net/tc_act/tc_ct.h | 29 ++ include/uapi/linux/netfilter/xt_connlabel.h | 5 + include/uapi/linux/pkt_cls.h | 9 + include/uapi/linux/tc_act/tc_ct.h | 38 ++ net/core/flow_dissector.c | 25 ++ net/sched/Kconfig | 6 + net/sched/Makefile | 1 + net/sched/act_ct.c | 385 ++++++++++++++++++++ net/sched/cls_flower.c | 33 ++ 10 files changed, 548 insertions(+) create mode 100644 include/net/tc_act/tc_ct.h create mode 100644 include/uapi/linux/tc_act/tc_ct.h create mode 100644 net/sched/act_ct.c -- 2.20.1