From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753641Ab0DMUsZ (ORCPT ); Tue, 13 Apr 2010 16:48:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52228 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752793Ab0DMUsY (ORCPT ); Tue, 13 Apr 2010 16:48:24 -0400 Date: Tue, 13 Apr 2010 23:43:07 +0300 From: "Michael S. Tsirkin" To: Eric Dumazet Cc: Jan Kiszka , "David S. Miller" , Herbert Xu , Paul Moore , David Woodhouse , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , qemu-devel Subject: Re: [PATCH] tun: orphan an skb on tx Message-ID: <20100413204307.GC3582@redhat.com> References: <20100413145944.GA7716@redhat.com> <4BC48F79.5090409@siemens.com> <1271176838.16881.537.camel@edumazet-laptop> <20100413173919.GC26011@redhat.com> <1271183463.16881.545.camel@edumazet-laptop> <20100413202548.GA3582@redhat.com> <1271191086.16881.570.camel@edumazet-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1271191086.16881.570.camel@edumazet-laptop> User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 13, 2010 at 10:38:06PM +0200, Eric Dumazet wrote: > Le mardi 13 avril 2010 à 23:25 +0300, Michael S. Tsirkin a écrit : > > On Tue, Apr 13, 2010 at 08:31:03PM +0200, Eric Dumazet wrote: > > > Le mardi 13 avril 2010 à 20:39 +0300, Michael S. Tsirkin a écrit : > > > > > > > > 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. > > > > > > > > > > > > > Which is wrong, since this is under userspace control, so you get > > > > unkillable processes. > > > > > > > > > > We do not get unkillable processes, at least with sockets I was thinking > > > about (TCP/UDP ones). > > > > > > Maybe tun sockets can behave the same ? > > > > Looks like that's what my patch does: ip_rcv seems to call > > skb_orphan too. > > Well, I was speaking of tx side, you speak of receiving side. Point is, both ip_rcv and my patch call skb_orphan. > An external flood (coming from another domain) is another problem. > > A sender might flood the 'network' inside our domain. How can we > reasonably limit the sender ? > > Maybe the answer is 'We can not', but it should be stated somewhere, so > that someone can address this point later. > And whatever's done should ideally work for tap to IP and IP to IP sockets as well, not just tap to tap. -- MST From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O1n9G-0005Ne-AQ for qemu-devel@nongnu.org; Tue, 13 Apr 2010 16:55:54 -0400 Received: from [140.186.70.92] (port=55071 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1n9E-0005AL-Rf for qemu-devel@nongnu.org; Tue, 13 Apr 2010 16:55:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O1n1o-0001tb-M5 for qemu-devel@nongnu.org; Tue, 13 Apr 2010 16:48:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17051) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O1n1o-0001tW-E5 for qemu-devel@nongnu.org; Tue, 13 Apr 2010 16:48:12 -0400 Date: Tue, 13 Apr 2010 23:43:07 +0300 From: "Michael S. Tsirkin" Message-ID: <20100413204307.GC3582@redhat.com> References: <20100413145944.GA7716@redhat.com> <4BC48F79.5090409@siemens.com> <1271176838.16881.537.camel@edumazet-laptop> <20100413173919.GC26011@redhat.com> <1271183463.16881.545.camel@edumazet-laptop> <20100413202548.GA3582@redhat.com> <1271191086.16881.570.camel@edumazet-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1271191086.16881.570.camel@edumazet-laptop> Content-Transfer-Encoding: quoted-printable 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: Eric Dumazet Cc: Paul Moore , David Woodhouse , Jan Kiszka , "linux-kernel@vger.kernel.org" , qemu-devel , Herbert Xu , "netdev@vger.kernel.org" , "David S. Miller" On Tue, Apr 13, 2010 at 10:38:06PM +0200, Eric Dumazet wrote: > Le mardi 13 avril 2010 =E0 23:25 +0300, Michael S. Tsirkin a =E9crit : > > On Tue, Apr 13, 2010 at 08:31:03PM +0200, Eric Dumazet wrote: > > > Le mardi 13 avril 2010 =E0 20:39 +0300, Michael S. Tsirkin a =E9cri= t : > > >=20 > > > > > When a socket with inflight tx packets is closed, we dont block= the > > > > > close, we only delay the socket freeing once all packets were d= elivered > > > > > and freed. > > > > >=20 > > > >=20 > > > > Which is wrong, since this is under userspace control, so you get > > > > unkillable processes. > > > >=20 > > >=20 > > > We do not get unkillable processes, at least with sockets I was thi= nking > > > about (TCP/UDP ones). > > >=20 > > > Maybe tun sockets can behave the same ? > >=20 > > Looks like that's what my patch does: ip_rcv seems to call > > skb_orphan too. >=20 > Well, I was speaking of tx side, you speak of receiving side. Point is, both ip_rcv and my patch call skb_orphan. > An external flood (coming from another domain) is another problem. >=20 > A sender might flood the 'network' inside our domain. How can we > reasonably limit the sender ? >=20 > Maybe the answer is 'We can not', but it should be stated somewhere, so > that someone can address this point later. >=20 And whatever's done should ideally work for tap to IP and IP to IP sockets as well, not just tap to tap. --=20 MST