From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753457Ab0DMQkq (ORCPT ); Tue, 13 Apr 2010 12:40:46 -0400 Received: from mail-bw0-f219.google.com ([209.85.218.219]:56681 "EHLO mail-bw0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752754Ab0DMQko (ORCPT ); Tue, 13 Apr 2010 12:40:44 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=A9X1Lu5hCjXKrswtn+K1EsWirgWBayuPtNU7mJsb7kM0vxiqAGGx4o4NSHyFXz/zy1 ZnUjyNo1QUiyOT4zHECoW7aX0ASeoY4TVjab8iVasLJKoH/XrTu/HTLdxjCQ4MF5jtzU CvxaTMqFOdPkREBUNGQKkqK0567ygTIDmO8N8= Subject: Re: [PATCH] tun: orphan an skb on tx From: Eric Dumazet To: Jan Kiszka Cc: "Michael S. Tsirkin" , "David S. Miller" , Herbert Xu , Paul Moore , David Woodhouse , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , qemu-devel In-Reply-To: <4BC48F79.5090409@siemens.com> References: <20100413145944.GA7716@redhat.com> <4BC48F79.5090409@siemens.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 13 Apr 2010 18:40:38 +0200 Message-ID: <1271176838.16881.537.camel@edumazet-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le mardi 13 avril 2010 à 17:36 +0200, Jan Kiszka a écrit : > Michael S. Tsirkin wrote: > > The following situation was observed in the field: > > tap1 sends packets, tap2 does not consume them, as a result > > tap1 can not be closed. > > And before that, tap1 may not be able to send further packets to anyone > else on the bridge as its TX resources were blocked by tap2 - that's > what we saw in the field. > After the patch, tap1 is able to flood tap2, and tap3/tap4 not able to send one single frame. Is it OK ? Back to the problem : tap1 cannot be closed. Why ? because of refcounts ? When a socket with inflight tx packets is closed, we dont block the close, we only delay the socket freeing once all packets were delivered and freed. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O1jAP-0002jC-Ki for qemu-devel@nongnu.org; Tue, 13 Apr 2010 12:40:49 -0400 Received: from [140.186.70.92] (port=54267 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1jAN-0002ha-Oj for qemu-devel@nongnu.org; Tue, 13 Apr 2010 12:40:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O1jAL-0006Oi-EA for qemu-devel@nongnu.org; Tue, 13 Apr 2010 12:40:47 -0400 Received: from mail-bw0-f209.google.com ([209.85.218.209]:44814) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O1jAK-0006OB-9r for qemu-devel@nongnu.org; Tue, 13 Apr 2010 12:40:45 -0400 Received: by bwz1 with SMTP id 1so2749348bwz.2 for ; Tue, 13 Apr 2010 09:40:41 -0700 (PDT) From: Eric Dumazet In-Reply-To: <4BC48F79.5090409@siemens.com> References: <20100413145944.GA7716@redhat.com> <4BC48F79.5090409@siemens.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 13 Apr 2010 18:40:38 +0200 Message-ID: <1271176838.16881.537.camel@edumazet-laptop> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] Re: [PATCH] tun: orphan an skb on tx List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Paul Moore , David Woodhouse , "Michael S. Tsirkin" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , qemu-devel , Herbert Xu , "David S. Miller" Le mardi 13 avril 2010 à 17:36 +0200, Jan Kiszka a écrit : > Michael S. Tsirkin wrote: > > The following situation was observed in the field: > > tap1 sends packets, tap2 does not consume them, as a result > > tap1 can not be closed. > > And before that, tap1 may not be able to send further packets to anyone > else on the bridge as its TX resources were blocked by tap2 - that's > what we saw in the field. > After the patch, tap1 is able to flood tap2, and tap3/tap4 not able to send one single frame. Is it OK ? Back to the problem : tap1 cannot be closed. Why ? because of refcounts ? When a socket with inflight tx packets is closed, we dont block the close, we only delay the socket freeing once all packets were delivered and freed.