From owner-svn-src-head@FreeBSD.ORG Sat Nov 13 09:37:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0450A106564A; Sat, 13 Nov 2010 09:37:22 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0C9458FC15; Sat, 13 Nov 2010 09:37:20 +0000 (UTC) Received: by fxm19 with SMTP id 19so2874747fxm.13 for ; Sat, 13 Nov 2010 01:37:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :x-comment-to:date:in-reply-to:message-id:user-agent:mime-version :content-type; bh=OyLFoAdz0go8TZCkbe9FcgZo1M3qk00nja/G4+KKWGA=; b=w69FGw/ZzROv4tP1dUpkoj4V9buMsXDYTsAAOBXhServox3U/RgjtrOw8d65v4x40h Hvykda4mXNuV9NY88RIEwRgx79pC600Wf+iEArYsL6Hc0hnXOdW2T7+8peq/GhdzngKO yLf3ECmTfhtV7wemxO8jPxhr6S8YS2VH5n7OM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:x-comment-to:date:in-reply-to :message-id:user-agent:mime-version:content-type; b=ZfN1oPN187wSGxU941v0UsrGD0bwJiH9tzX0gRVGnrOhTDNrvMJPw4ZDh+BkYiKaA7 4XC/h0mowkfEodLhXkyW+ry7rQSO17/UvDHtC6GBEOd4Y5n1N7lNuRWPJ5/RtWBQ7jVF gAJPUUCRK5INNfkofPJhfnH2DXtVd491Zj5bI= Received: by 10.223.79.65 with SMTP id o1mr1199279fak.145.1289639358530; Sat, 13 Nov 2010 01:09:18 -0800 (PST) Received: from localhost ([95.69.174.185]) by mx.google.com with ESMTPS id b15sm285074fah.28.2010.11.13.01.09.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 13 Nov 2010 01:09:16 -0800 (PST) From: Mikolaj Golub To: "George V. Neville-Neil" References: <201011122203.oACM32cN024939@svn.freebsd.org> X-Comment-To: George V. Neville-Neil Date: Sat, 13 Nov 2010 11:09:14 +0200 In-Reply-To: <201011122203.oACM32cN024939@svn.freebsd.org> (George V. Neville-Neil's message of "Fri, 12 Nov 2010 22:03:02 +0000 (UTC)") Message-ID: <86fwv57fph.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215207 - in head: sys/net sys/netinet tools/regression/netinet/arphold X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2010 09:37:22 -0000 On Fri, 12 Nov 2010 22:03:02 +0000 (UTC) George V. Neville-Neil wrote: GVN> Author: gnn GVN> Date: Fri Nov 12 22:03:02 2010 GVN> New Revision: 215207 GVN> URL: http://svn.freebsd.org/changeset/base/215207 GVN> Modified: head/sys/net/if_llatbl.c GVN> ============================================================================== GVN> --- head/sys/net/if_llatbl.c Fri Nov 12 21:47:36 2010 (r215206) GVN> +++ head/sys/net/if_llatbl.c Fri Nov 12 22:03:02 2010 (r215207) GVN> @@ -100,18 +100,34 @@ done: GVN> * This function is called by the timer functions GVN> * such as arptimer() and nd6_llinfo_timer(), and GVN> * the caller does the locking. GVN> + * GVN> + * Returns the number of held packets, if any, that were dropped. GVN> */ GVN> -void GVN> +size_t GVN> llentry_free(struct llentry *lle) GVN> { GVN> - GVN> + size_t pkts_dropped; GVN> + struct mbuf *next; GVN> + GVN> + pkts_dropped = 0; GVN> LLE_WLOCK_ASSERT(lle); GVN> LIST_REMOVE(lle, lle_next); GVN> GVN> - if (lle->la_hold != NULL) GVN> + while ((lle->la_numheld > 0) && (lle->la_hold != NULL)) { GVN> + next = lle->la_hold->m_nextpkt; GVN> m_freem(lle->la_hold); GVN> + lle->la_hold = next; GVN> + lle->la_numheld--; GVN> + pkts_dropped++; GVN> + } GVN> + GVN> + KASSERT(lle->la_numheld == 0, GVN> + ("%s: la_numheld %d > 0, pkts_droped %ld", __func__, GVN> + lle->la_numheld, pkts_dropped)); cc -c -O -pipe -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -Werror /usr/src/sys/net/if_llatbl.c cc1: warnings being treated as errors /usr/src/sys/net/if_llatbl.c: In function 'llentry_free': /usr/src/sys/net/if_llatbl.c:124: warning: format '%ld' expects type 'long int', but argument 4 has type 'size_t' *** Error code 1 I think this should be: Index: sys/net/if_llatbl.c =================================================================== --- sys/net/if_llatbl.c (revision 215233) +++ sys/net/if_llatbl.c (working copy) @@ -122,7 +122,7 @@ llentry_free(struct llentry *lle) } KASSERT(lle->la_numheld == 0, - ("%s: la_numheld %d > 0, pkts_droped %ld", __func__, + ("%s: la_numheld %d > 0, pkts_droped %zu", __func__, lle->la_numheld, pkts_dropped)); LLE_FREE_LOCKED(lle); -- Mikolaj Golub