From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 06BBA2946 for ; Fri, 1 Apr 2016 16:46:26 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 01 Apr 2016 07:46:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,427,1455004800"; d="scan'208";a="776226645" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by orsmga003.jf.intel.com with ESMTP; 01 Apr 2016 07:46:21 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.174]) by IRSMSX106.ger.corp.intel.com ([169.254.8.172]) with mapi id 14.03.0248.002; Fri, 1 Apr 2016 15:46:19 +0100 From: "Burakov, Anatoly" To: Thomas Monjalon CC: "dev@dpdk.org" , "david.verbeiren@gmail.com" Thread-Topic: [dpdk-dev] [PATCH] ivshmem: avoid infinite loop when concatenating adjacent segments Thread-Index: AQHRjCDcVQzmqUgQmkq7FI/uBNvi5591Mgug Date: Fri, 1 Apr 2016 14:46:19 +0000 Message-ID: References: <1450564772-20000-1-git-send-email-david.verbeiren@intel.com> <3289545.8FCtugvDy0@xps13> In-Reply-To: <3289545.8FCtugvDy0@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTg3MTVlYzYtMGNjMi00ZTE4LTliMGEtYzFiOTI0MjRhZWQ0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImJHZ2RoK2NUVk53bW5cL3I5ZDg2RTl4RTFROTQ3YmJpeFBWTDNcL0w3Y1pBRT0ifQ== x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] ivshmem: avoid infinite loop when concatenating adjacent segments X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2016 14:46:27 -0000 > Please Anatoly, > What do you think of this patch? >=20 > 2015-12-19 23:39, David Verbeiren: > > This patch aligns the logic used to check for the presence of adjacent > > segments in has_adjacent_segments() with the logic used in > > cleanup_segments() when actually deciding to concatenate or not a pair > > of segments. > > > > This fixes an infinite loop that happened when segments where adjacent > > in their physical or virtual addresses but not in their ioremap > > addresses: has_adjacent_segments() reported the presence of adjacent > > segments while cleanup_segments() was not considering them for > > concatenation, resulting in an infinite loop since the result of > > has_adjacent_segments() is used in the decision to continue looping in > > cleanup_segments(). > > > > Signed-off-by: David Verbeiren Yes, looking back on this, it made no sense. Or rather it did make some twi= sted sense, but led to a bug. So, Acked-by: Anatoly Burakov