From patchwork Tue Apr 19 22:28:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniele Di Proietto X-Patchwork-Id: 612387 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 3qqKVH5Mzpz9t4c for ; Wed, 20 Apr 2016 08:31:03 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id E1B4410626; Tue, 19 Apr 2016 15:29:40 -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 843A0105E9 for ; Tue, 19 Apr 2016 15:29:37 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 1DB321622B4 for ; Tue, 19 Apr 2016 16:29:37 -0600 (MDT) X-ASG-Debug-ID: 1461104976-0b32371795e1270001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar6.cudamail.com with ESMTP id Q1xhfjf19Evs7eMI (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 19 Apr 2016 16:29:36 -0600 (MDT) X-Barracuda-Envelope-From: diproiettod@vmware.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.1 Received: from unknown (HELO smtp-outbound-2.vmware.com) (208.91.2.13) by mx1-pf1.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 19 Apr 2016 22:29:36 -0000 Received-SPF: error (mx1-pf1.cudamail.com: error in processing during lookup of vmware.com: DNS problem) X-Barracuda-Apparent-Source-IP: 208.91.2.13 X-Barracuda-RBL-IP: 208.91.2.13 Received: from sc9-mailhost3.vmware.com (sc9-mailhost3.vmware.com [10.113.161.73]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id B0EC128645 for ; Tue, 19 Apr 2016 15:29:34 -0700 (PDT) Received: from sc9-mailhost1.vmware.com (htb-1n-eng-dhcp480.eng.vmware.com [10.33.75.224]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id B284340E36; Tue, 19 Apr 2016 15:29:35 -0700 (PDT) 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-E1-418085201 X-CudaMail-DTE: 041916 X-CudaMail-Originating-IP: 208.91.2.13 Date: Tue, 19 Apr 2016 15:28:44 -0700 X-ASG-Orig-Subj: [##CM-E1-418085201##][PATCH v8 12/16] ofproto-dpif: Call dpif_poll_threads_set() before dpif_run(). Message-Id: <1461104928-33500-13-git-send-email-diproiettod@vmware.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1461104928-33500-1-git-send-email-diproiettod@vmware.com> References: <1461104928-33500-1-git-send-email-diproiettod@vmware.com> X-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1461104976 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 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 v8 12/16] ofproto-dpif: Call dpif_poll_threads_set() before dpif_run(). 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" An upcoming commit will make dpif_poll_threads_set() record the requested configuration and dpif_run() apply it, so it makes sense to change the order. Signed-off-by: Daniele Di Proietto Tested-by: Ilya Maximets Acked-by: Ilya Maximets Acked-by: Mark Kavanagh --- ofproto/ofproto-dpif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 747482c..2aa12b7 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -534,6 +534,8 @@ type_run(const char *type) return 0; } + /* This must be called before dpif_run() */ + dpif_poll_threads_set(backer->dpif, pmd_cpu_mask); if (dpif_run(backer->dpif)) { backer->need_revalidate = REV_RECONFIGURE; @@ -562,8 +564,6 @@ type_run(const char *type) udpif_set_threads(backer->udpif, n_handlers, n_revalidators); } - dpif_poll_threads_set(backer->dpif, pmd_cpu_mask); - if (backer->need_revalidate) { struct ofproto_dpif *ofproto; struct simap_node *node;