From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH net-next] net: preserve sock reference when scrubbing the skb. Date: Tue, 26 Jun 2018 19:32:32 -0700 Message-ID: References: <20180625155610.30802-1-fbl@redhat.com> <48e15faf-f935-0166-e1db-18f7286e7264@gmail.com> <20180626220300.GT19565@plex.lan> <20180626233302.GU19565@plex.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Eric Dumazet , Linux Kernel Network Developers , Paolo Abeni , David Miller , Florian Westphal , NetFilter To: Cong Wang , Flavio Leitner Return-path: Received: from mail-pg0-f68.google.com ([74.125.83.68]:39902 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751155AbeF0Ccf (ORCPT ); Tue, 26 Jun 2018 22:32:35 -0400 In-Reply-To: Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 06/26/2018 05:29 PM, Cong Wang wrote: > On Tue, Jun 26, 2018 at 4:33 PM Flavio Leitner wrote: >> >> It is still isolated, the sk carries the netns info and it is >> orphaned when it re-enters the stack. > > Then what difference does your patch make? > > Before your patch: > veth orphans skb in its xmit > > After your patch: > RX orphans it when re-entering stack (as you claimed, I don't know) > > And for veth pair: > xmit from one side is RX for the other side > > So, where is the queueing? Where is the buffer bloat? GRO list?? > By re-entering the stack, Flavio probably meant storing this skb in a socket receive queue, or anything that should already modify skb->destructor (and thus call skb_orphan() before the modification) If skb sits in some qdisc, like fq on ipvlan master device, we do not want skb->sk to be scrubbed, just because ipvlan slave and master might be in different netns.