From patchwork Tue Jan 23 12:16:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pablo Neira Ayuso X-Patchwork-Id: 864747 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zQnNF1MFmz9t3p for ; Tue, 23 Jan 2018 23:16:45 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751420AbeAWMQj (ORCPT ); Tue, 23 Jan 2018 07:16:39 -0500 Received: from mail.us.es ([193.147.175.20]:44816 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751323AbeAWMQe (ORCPT ); Tue, 23 Jan 2018 07:16:34 -0500 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id 2477C2519A9 for ; Tue, 23 Jan 2018 13:16:33 +0100 (CET) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 117ACDA7F7 for ; Tue, 23 Jan 2018 13:16:33 +0100 (CET) Received: by antivirus1-rhel7.int (Postfix, from userid 99) id 10827DA729; Tue, 23 Jan 2018 13:16:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on antivirus1-rhel7.int X-Spam-Level: X-Spam-Status: No, score=-108.2 required=7.5 tests=ALL_TRUSTED,BAYES_50, SMTPAUTH_US2,USER_IN_WHITELIST autolearn=disabled version=3.4.1 Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 0DBF1DA809 for ; Tue, 23 Jan 2018 13:16:31 +0100 (CET) Received: from 192.168.1.97 (192.168.1.97) by antivirus1-rhel7.int (F-Secure/fsigk_smtp/550/antivirus1-rhel7.int); Tue, 23 Jan 2018 13:16:31 +0100 (CET) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/antivirus1-rhel7.int) Received: from salvia.here (129.166.216.87.static.jazztel.es [87.216.166.129]) (Authenticated sender: pneira@us.es) by entrada.int (Postfix) with ESMTPA id C8FCB41E4817 for ; Tue, 23 Jan 2018 13:16:30 +0100 (CET) X-SMTPAUTHUS: auth mail.us.es From: Pablo Neira Ayuso To: netfilter-devel@vger.kernel.org Subject: [PATCH nft 6/6] doc: nft: document flowtable Date: Tue, 23 Jan 2018 13:16:22 +0100 Message-Id: <20180123121622.16287-6-pablo@netfilter.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180123121622.16287-1-pablo@netfilter.org> References: <20180123121622.16287-1-pablo@netfilter.org> X-Virus-Scanned: ClamAV using ClamSMTP Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Document the new flowtable objects available since Linux kernel 4.16-rc. Signed-off-by: Pablo Neira Ayuso --- doc/nft.xml | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/doc/nft.xml b/doc/nft.xml index 9e979af3c280..1b901c17b5a0 100644 --- a/doc/nft.xml +++ b/doc/nft.xml @@ -1160,6 +1160,91 @@ filter input iif $int_ifs accept + Flowtables + + + + add + create + + flowtable + family + table + flowtable + + hook hook + priority priority ; + devices = { device[,...] } ; + + + + + delete + list + + flowtable + family + table + flowtable + + + + + Flowtables allow you to accelerate packet forwarding in software. + Flowtables entries are represented through a tuple that is composed of the + input interface, source and destination address, source and destination + port; and layer 3/4 protocols. Each entry also caches the destination + interface and the gateway address - to update the destination link-layer + address - to forward packets. The ttl and hoplimit fields are also + decremented. Hence, flowtables provides an alternative path that allow + packets to bypass the classic forwarding path. Flowtables reside in the + ingress hook, that is located before the prerouting hook. You can select + what flows you want to offload through the flow offload + expression from the forward chain. Flowtables are + identified by their address family and their name. The address family + must be one of + + + ip + ip6 + inet + . + + The inet address family is a dummy family which is used to create + hybrid IPv4/IPv6 tables. + + When no address family is specified, ip is used by default. + + + + + + + + Add a new flowtable for the given family with the given name. + + + + + + + + Delete the specified flowtable. + + + + + + + + List all flowtables. + + + + + + + Stateful objects @@ -4917,6 +5002,24 @@ add rule nat prerouting tcp dport 22 redirect to :2222 + + + Flow offload statement + + A flow offload statement allows us to select what flows + you want to accelerate forwarding through layer 3 network + stack bypass. You have to specify the flowtable name where + you want to offload this flow. + + + + flow offload + @flowtable + + + + + Queue statement