From owner-freebsd-net@FreeBSD.ORG Mon Aug 11 21:29:19 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE69BB78; Mon, 11 Aug 2014 21:29:19 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A82292722; Mon, 11 Aug 2014 21:29:19 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 9D264B9C0; Mon, 11 Aug 2014 17:29:18 -0400 (EDT) From: John Baldwin To: freebsd-net@freebsd.org Subject: Re: Multicast races on vlan & lagg Date: Mon, 11 Aug 2014 17:10:46 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <53DA50E2.6070606@FreeBSD.org> In-Reply-To: <53DA50E2.6070606@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201408111710.46443.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 11 Aug 2014 17:29:18 -0400 (EDT) Cc: Alexander Motin X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 21:29:19 -0000 On Thursday, July 31, 2014 10:21:22 am Alexander Motin wrote: > Hi. > > Doing some tests on FreeNAS (FreeBSD 9.2+) I hit series of panic during > active interfaces manipulation in some scenarios including multicast and > several vlans on top of lagg. I am not ready to reproduce the full > environment on head, but the code looks equal, so probably the bugs. > > I've made a patch to improve locking in that area, that seems fixes the > problems: http://people.freebsd.org/~mav/mcast_vlan_lagg.patch > > Could somebody with more experience in the area please take a look? Can't you use IF_ADDR_RLOCK instead of IF_ADDR_WLOCK? Also, strictly speaking it might be best to use if_maddr_rlock() instead of directly using IF_ADDR_RLOCK(). -- John Baldwin