From patchwork Sun Feb 4 16:22:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Darrell Ball X-Patchwork-Id: 869046 X-Patchwork-Delegate: ian.stokes@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ovFROQVK"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zZGK65MLmz9s7v for ; Mon, 5 Feb 2018 03:24:58 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 20A48F7D; Sun, 4 Feb 2018 16:23:06 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id B32D6F34 for ; Sun, 4 Feb 2018 16:23:03 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pl0-f66.google.com (mail-pl0-f66.google.com [209.85.160.66]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 7918132F for ; Sun, 4 Feb 2018 16:23:03 +0000 (UTC) Received: by mail-pl0-f66.google.com with SMTP id 11so10122984plc.9 for ; Sun, 04 Feb 2018 08:23:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=eqY3xfujSM48UHy8VlH3MQA8qj90UUAsJIjkL9tyErs=; b=ovFROQVKQobSzoQySrv7ff1l3wPdgc/RC9xXPSfiuRkjxhItBHXRSmWJIEt9/iSy/v aqsMCCi+wApuMSWpgXx6w9Uk8xqMdYhFXwmfe2pEmAYcLe3TgskdKxwpxqArOOnMoOB3 V794FufYPRa3MNNub1EI+z/9E7WB3YctVbuguBg79fvFna4E6Oo8rjzp/fhnbOcfCgIQ yOV1MCZZEuzrK9Fu7bsWulImjYxZq8SUzjFveo3RepgUEG6+7qQ/KnOUKiwWUSiKxDyw HmNL46FwzIckJSzm0PVZIlDu189fFPrKQw354ssjFutGwKGwFF9usvMmASeaw34XWTGD FtYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=eqY3xfujSM48UHy8VlH3MQA8qj90UUAsJIjkL9tyErs=; b=q7bLpyIemZCUD4d9+FrPGCz1y2sWBcS3Em36Pn9iwELi7sJNn2GCumsOMEw0KaBfWR yEEmfrrVwKDVePRoxgVzcTQER+yIDvZc1bFXNj2PliILMkDRC9v9Qezhdh7vr4xnERIX psoS8Eknyz8MM16ot3EYwzOG3pKUhhgiqUGygU2s+d/N7wCLXb5zgB6Bsp6i6a2AfIut yaoZJ8vdxTQFupZBYYi43iSaINmj5eMoR6c69pGCxyj9qLgNGF+fUl/CGKz8xYIUr0+c Z8K2O2nSQjdaPWkMTDijDv4MkVm1Z8rFYcmAqJACFFlxXupd8Si8vpOZ+6oNtxqLmU3M VcZA== X-Gm-Message-State: AKwxytd1fdW1nh7CghA6WhGi+6C0ep+rGGDlzxZVf7sVk0C10xhsqdov p/v1gIcziCrJX1anJt/wLbsGOA== X-Google-Smtp-Source: AH8x224yxtGotnH/hzqwYMxrYUvcwGzNC6iIABKrw51DpzVSKRvHvaKCoayrkAMCr0YguIvZeRHnFA== X-Received: by 2002:a17:902:66e6:: with SMTP id e93-v6mr40479430plk.173.1517761383147; Sun, 04 Feb 2018 08:23:03 -0800 (PST) Received: from ubuntu.localdomain (c-73-162-236-45.hsd1.ca.comcast.net. [73.162.236.45]) by smtp.gmail.com with ESMTPSA id e9sm10109503pgv.14.2018.02.04.08.23.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 04 Feb 2018 08:23:02 -0800 (PST) From: Darrell Ball To: dlu998@gmail.com, dev@openvswitch.org Date: Sun, 4 Feb 2018 08:22:37 -0800 Message-Id: <1517761364-17655-5-git-send-email-dlu998@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1517761364-17655-1-git-send-email-dlu998@gmail.com> References: <1517761364-17655-1-git-send-email-dlu998@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [patch v5 04/11] conntrack: Support fragmentation. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org The conntrack module now calls fragmentation support apis. Signed-off-by: Darrell Ball --- NEWS | 2 ++ lib/conntrack.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/NEWS b/NEWS index 8c360ba..ee1f272 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ Post-v2.9.0 "table#". These are not helpful names for the purpose of accepting and displaying table names, so now tables by default have no names. + - Userspace datapath: + * Add v4/v6 fragmentation support for conntrack. v2.9.0 - xx xxx xxxx -------------------- diff --git a/lib/conntrack.c b/lib/conntrack.c index d34eb32..2894a77 100644 --- a/lib/conntrack.c +++ b/lib/conntrack.c @@ -30,6 +30,7 @@ #include "ct-dpif.h" #include "dp-packet.h" #include "flow.h" +#include "ipf.h" #include "netdev.h" #include "odp-netlink.h" #include "openvswitch/hmap.h" @@ -340,6 +341,7 @@ conntrack_init(struct conntrack *ct) atomic_init(&ct->n_conn_limit, DEFAULT_N_CONN_LIMIT); latch_init(&ct->clean_thread_exit); ct->clean_thread = ovs_thread_create("ct_clean", clean_thread_main, ct); + ipf_init(); } /* Destroys the connection tracker 'ct' and frees all the allocated memory. */ @@ -382,6 +384,7 @@ conntrack_destroy(struct conntrack *ct) hindex_destroy(&ct->alg_expectation_refs); ct_rwlock_unlock(&ct->resources_lock); ct_rwlock_destroy(&ct->resources_lock); + ipf_destroy(); } static unsigned hash_to_bucket(uint32_t hash) @@ -1308,6 +1311,8 @@ conntrack_execute(struct conntrack *ct, struct dp_packet_batch *pkt_batch, const struct nat_action_info_t *nat_action_info, long long now) { + ipf_preprocess_conntrack(pkt_batch, now, dl_type, zone, ct->hash_basis); + struct dp_packet *packet; struct conn_lookup_ctx ctx; @@ -1321,6 +1326,8 @@ conntrack_execute(struct conntrack *ct, struct dp_packet_batch *pkt_batch, setlabel, nat_action_info, tp_src, tp_dst, helper); } + ipf_postprocess_conntrack(pkt_batch, now, dl_type); + return 0; }