From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick McHardy Subject: Re: iproute2: git pull request from debian repo. Date: Tue, 23 Oct 2007 16:38:06 +0200 Message-ID: <471E074E.8050805@trash.net> References: <20071019122753.GA30078@scream.fatal.se> <20071019130616.GH1362@baikonur.stro.at> <20071019144815.GB30444@scream.fatal.se> <471B90E5.1040108@trash.net> <20071023141838.GA25201@scream.fatal.se> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: maximilian attems , shemminger@linux-foundation.org, netdev@vger.kernel.org To: Andreas Henriksson Return-path: Received: from stinky.trash.net ([213.144.137.162]:47382 "EHLO stinky.trash.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751682AbXJWOjF (ORCPT ); Tue, 23 Oct 2007 10:39:05 -0400 In-Reply-To: <20071023141838.GA25201@scream.fatal.se> Sender: netdev-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Andreas Henriksson wrote: > On Sun, Oct 21, 2007 at 07:48:21PM +0200, Patrick McHardy wrote: >> Andreas Henriksson wrote: >>> - for (;;) { >>> + while (round < MAX_ROUNDS) { >>> if (rtnl_wilddump_request(&rth, filter.family, >>> RTM_GETADDR) < 0) { >>> perror("Cannot send dump request"); >>> exit(1); >>> @@ -694,6 +696,8 @@ int ipaddr_list_or_flush(int argc, char **argv, int >>> flush) >>> fflush(stdout); >>> } >>> } >>> + fprintf(stderr, "*** Flush remains incomplete after %d >>> rounds. ***\n", MAX_ROUNDS); fflush(stderr); >> >> Again, please make this optional. People might want to make >> sure the cache is flushed even if it takes a bit longer. > > And here's the alternativ with configurable max rounds (0=infinite)... Almost - the default behaviour shouldn't change IMO. Also please send a complete patch, not one on top of your old one. > > - while (round < MAX_ROUNDS) { > + while ((maxrounds == 0) || (round < maxrounds)) { And please remove the unnecessary parens.