From patchwork Mon Nov 16 06:21:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniele Di Proietto X-Patchwork-Id: 544911 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (unknown [IPv6:2600:3c00::f03c:91ff:fe6e:bdf7]) by ozlabs.org (Postfix) with ESMTP id C4F3014144E for ; Mon, 16 Nov 2015 17:22:36 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 4FB3410560; Sun, 15 Nov 2015 22:21:46 -0800 (PST) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id AF0741052C for ; Sun, 15 Nov 2015 22:21:43 -0800 (PST) Received: from bar2.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id 37E8A42018D for ; Sun, 15 Nov 2015 23:21:43 -0700 (MST) X-ASG-Debug-ID: 1447654902-03dc530883524460001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar2.cudamail.com with ESMTP id j9zDDhz7pfVuOYqd (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 15 Nov 2015 23:21:42 -0700 (MST) X-Barracuda-Envelope-From: diproiettod@vmware.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO smtp-outbound-1.vmware.com) (208.91.2.12) by mx1-pf2.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 16 Nov 2015 06:21:42 -0000 Received-SPF: error (mx1-pf2.cudamail.com: error in processing during lookup of vmware.com: DNS problem) X-Barracuda-Apparent-Source-IP: 208.91.2.12 X-Barracuda-RBL-IP: 208.91.2.12 Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id DFEBB28AEA for ; Sun, 15 Nov 2015 22:21:41 -0800 (PST) Received: from sc9-mailhost3.vmware.com (unknown [10.129.192.239]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id B5521B04F7; Sun, 15 Nov 2015 22:21:41 -0800 (PST) X-CudaMail-Envelope-Sender: diproiettod@vmware.com From: Daniele Di Proietto To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E2-1114030518 X-CudaMail-DTE: 111515 X-CudaMail-Originating-IP: 208.91.2.12 Date: Sun, 15 Nov 2015 22:21:21 -0800 X-ASG-Orig-Subj: [##CM-E2-1114030518##][PATCH 10/12] dpif-netdev: Implement conntrack flush interface. Message-Id: <1447654883-8097-11-git-send-email-diproiettod@vmware.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447654883-8097-1-git-send-email-diproiettod@vmware.com> References: <1447654883-8097-1-git-send-email-diproiettod@vmware.com> X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1447654902 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-ASG-Whitelist: EmailCat (corporate) Subject: [ovs-dev] [PATCH 10/12] dpif-netdev: Implement conntrack flush interface. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Signed-off-by: Daniele Di Proietto --- lib/dpif-netdev.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index b976925..340e37c 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -3744,6 +3744,14 @@ dpif_netdev_ct_dump_done(struct dpif *dpif OVS_UNUSED, return err; } +static int +dpif_netdev_ct_flush(struct dpif *dpif, const uint16_t *zone) +{ + struct dp_netdev *dp = get_dp_netdev(dpif); + + return conntrack_flush(&dp->conntrack, zone); +} + const struct dpif_class dpif_netdev_class = { "netdev", dpif_netdev_init, @@ -3787,7 +3795,7 @@ const struct dpif_class dpif_netdev_class = { dpif_netdev_ct_dump_start, dpif_netdev_ct_dump_next, dpif_netdev_ct_dump_done, - NULL, /* ct_flush */ + dpif_netdev_ct_flush, }; static void