From patchwork Tue Nov 1 14:53:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Blakey X-Patchwork-Id: 689944 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3t7Z500tmyz9s65 for ; Wed, 2 Nov 2016 01:54:28 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 2CA0D101D6; Tue, 1 Nov 2016 07:53:45 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 4BE321065B for ; Tue, 1 Nov 2016 07:53:43 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id D0814164AD2 for ; Tue, 1 Nov 2016 08:53:42 -0600 (MDT) X-ASG-Debug-ID: 1478012022-0b323720454a90e0001-byXFYA Received: from mx3-pf3.cudamail.com ([192.168.14.3]) by bar6.cudamail.com with ESMTP id mSUw4nkBoyrmPSOi (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 01 Nov 2016 08:53:42 -0600 (MDT) X-Barracuda-Envelope-From: paulb@mellanox.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.3 Received: from unknown (HELO mellanox.co.il) (193.47.165.129) by mx3-pf3.cudamail.com with SMTP; 1 Nov 2016 14:53:41 -0000 Received-SPF: pass (mx3-pf3.cudamail.com: SPF record at _mtablock1.salesforce.com designates 193.47.165.129 as permitted sender) X-Barracuda-Apparent-Source-IP: 193.47.165.129 X-Barracuda-RBL-IP: 193.47.165.129 Received: from Internal Mail-Server by MTLPINE1 (envelope-from paulb@mellanox.com) with ESMTPS (AES256-SHA encrypted); 1 Nov 2016 16:53:34 +0200 Received: from r-vnc04.mtr.labs.mlnx (r-vnc04.mtr.labs.mlnx [10.208.0.116]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id uA1ErVfl000482; Tue, 1 Nov 2016 16:53:33 +0200 X-CudaMail-Envelope-Sender: paulb@mellanox.com From: Paul Blakey To: dev@openvswitch.org X-CudaMail-MID: CM-V3-1031020018 X-CudaMail-DTE: 110116 X-CudaMail-Originating-IP: 193.47.165.129 Date: Tue, 1 Nov 2016 16:53:30 +0200 X-ASG-Orig-Subj: [##CM-V3-1031020018##][PATCH ovs V1 9/9] dpif-hw-acc: flow flush Message-Id: <1478012010-32494-10-git-send-email-paulb@mellanox.com> X-Mailer: git-send-email 1.7.8.2 In-Reply-To: <1478012010-32494-1-git-send-email-paulb@mellanox.com> References: <1478012010-32494-1-git-send-email-paulb@mellanox.com> X-GBUdb-Analysis: 0, 193.47.165.129, Ugly c=0.271956 p=0 Source Normal X-MessageSniffer-Rules: 0-0-0-3946-c X-Barracuda-Connect: UNKNOWN[192.168.14.3] X-Barracuda-Start-Time: 1478012022 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_SC5_MJ1963, RDNS_NONE, UNPARSEABLE_RELAY X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.34192 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 Cc: Shahar Klein , Simon Horman , Rony Efraim , Jiri Pirko , Marcelo Ricardo Leitner , Or Gerlitz , Hadar Har-Zion , Andy Gospodarek Subject: [ovs-dev] [PATCH ovs V1 9/9] dpif-hw-acc: flow flush 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" added support to flush all offloaded flows from tc. Signed-off-by: Paul Blakey Signed-off-by: Shahar Klein --- lib/dpif-hw-acc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/dpif-hw-acc.c b/lib/dpif-hw-acc.c index 0087e9c..98a99de 100644 --- a/lib/dpif-hw-acc.c +++ b/lib/dpif-hw-acc.c @@ -862,7 +862,19 @@ static int dpif_hw_acc_flow_flush(struct dpif *dpif_) { struct dpif_hw_acc *dpif = dpif_hw_acc_cast(dpif_); + struct port_netdev_hash_data *data; + + VLOG_DBG("%s %d %s, (%p) flush start\n", __FILE__, __LINE__, __func__, + dpif); + HMAP_FOR_EACH(data, node, &dpif->port_to_netdev) { + if (data->netdev) { + VLOG_DBG("%s %d %s, (%p) flusing port: %d, netdev: %p\n", __FILE__, + __LINE__, __func__, dpif, data->port, data->netdev); + tc_flush_flower(netdev_get_ifindex(data->netdev)); + } + } + VLOG_DBG("%s %d %s, (%p) flush end\n", __FILE__, __LINE__, __func__, dpif); return dpif->lp_dpif_netlink->dpif_class-> flow_flush(dpif->lp_dpif_netlink); }