From patchwork Fri Dec 4 01:59:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarno Rajahalme X-Patchwork-Id: 552517 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 ECF371402A1 for ; Fri, 4 Dec 2015 12:59:53 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 6F6AF10CA8; Thu, 3 Dec 2015 17:59:52 -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 B7EFA10CA7 for ; Thu, 3 Dec 2015 17:59:50 -0800 (PST) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id 2B1D042005C for ; Thu, 3 Dec 2015 18:59:50 -0700 (MST) X-ASG-Debug-ID: 1449194389-09eadd16aa7d240001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar5.cudamail.com with ESMTP id jU3qhhWOcP0shyuB (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 03 Dec 2015 18:59:49 -0700 (MST) X-Barracuda-Envelope-From: jarno@ovn.org X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO relay3-d.mail.gandi.net) (217.70.183.195) by mx1-pf2.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 4 Dec 2015 01:59:49 -0000 Received-SPF: pass (mx1-pf2.cudamail.com: SPF record at ovn.org designates 217.70.183.195 as permitted sender) X-Barracuda-Apparent-Source-IP: 217.70.183.195 X-Barracuda-RBL-IP: 217.70.183.195 Received: from mfilter14-d.gandi.net (mfilter14-d.gandi.net [217.70.178.142]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id AFEB8A80CB; Fri, 4 Dec 2015 02:59:46 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter14-d.gandi.net Received: from relay3-d.mail.gandi.net ([IPv6:::ffff:217.70.183.195]) by mfilter14-d.gandi.net (mfilter14-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id r1SdAX1miAjd; Fri, 4 Dec 2015 02:59:45 +0100 (CET) X-Originating-IP: 208.91.1.34 Received: from sc9-mailhost3.vmware.com (unknown [208.91.1.34]) (Authenticated sender: jarno@ovn.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 64A5DA80CA; Fri, 4 Dec 2015 02:59:44 +0100 (CET) X-CudaMail-Envelope-Sender: jarno@ovn.org From: Jarno Rajahalme To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E2-1202104884 X-CudaMail-DTE: 120315 X-CudaMail-Originating-IP: 217.70.183.195 Date: Thu, 3 Dec 2015 17:59:12 -0800 X-ASG-Orig-Subj: [##CM-E2-1202104884##][PATCH] bond: Use correct type for slave's change_seq. Message-Id: <1449194352-28765-1-git-send-email-jarno@ovn.org> X-Mailer: git-send-email 2.1.4 X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1449194389 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 Subject: [ovs-dev] [PATCH] bond: Use correct type for slave's change_seq. 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" seq values are 64-bit, and storing them to a 32-bit variable causes the stored value never to match actual seq value after the seq value gets big enough. This is a likely cause of OVS main thread using 100% CPU in a system using bonds after some runtime. VMware-BZ: #1564993 Reported-by: Hiram Bayless Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer Acked-by: Ben Pfaff --- ofproto/bond.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofproto/bond.c b/ofproto/bond.c index 1dbf8f1..c2749e5 100644 --- a/ofproto/bond.c +++ b/ofproto/bond.c @@ -84,7 +84,7 @@ struct bond_slave { void *aux; /* Client-provided handle for this slave. */ struct netdev *netdev; /* Network device, owned by the client. */ - unsigned int change_seq; /* Tracks changes in 'netdev'. */ + uint64_t change_seq; /* Tracks changes in 'netdev'. */ ofp_port_t ofp_port; /* OpenFlow port number. */ char *name; /* Name (a copy of netdev_get_name(netdev)). */