From patchwork Wed Dec 13 22:40:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mahesh Bandewar X-Patchwork-Id: 848267 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=bandewar-net.20150623.gappssmtp.com header.i=@bandewar-net.20150623.gappssmtp.com header.b="M53JT8ok"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yxs8r3dtWz9s83 for ; Thu, 14 Dec 2017 09:40:28 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752634AbdLMWk0 (ORCPT ); Wed, 13 Dec 2017 17:40:26 -0500 Received: from mail-it0-f65.google.com ([209.85.214.65]:43623 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752530AbdLMWkX (ORCPT ); Wed, 13 Dec 2017 17:40:23 -0500 Received: by mail-it0-f65.google.com with SMTP id u62so6849975ita.2 for ; Wed, 13 Dec 2017 14:40:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bandewar-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=SgLFQAdTkn5h13oGRVD3wJ6sz5/vY2RwCd3P+dl5VKk=; b=M53JT8okrx07sjg8E1cCR+ddRrV+k4AxYPkeC8n6fytoZXSoN0+QIQcLduf26wlimk HtHkbc038BuPlq/R38grmmbEddCiQ6PxoXaowwToqWcX+SBraHsd6gTPWX5rxUWZj9dr luvBTTs45Z4XlA4/svzu9R9ay0OKD6JRk4YoKxHRuu3Od3EuRRgkxPcPwVgHMEbXJA3T vSy1rP+q9lC0fsBmTwqj1YpAftP28ILzSdgYd8arRL3VIYPHdg/aZlCkn6vawrmhAE/a a93cOFm5KoCHOE/BJJq6askq5AKNQstbx5tQpvMOa9YjiTFQlD66YqF7TBPG4t5kZ0Vz PcEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=SgLFQAdTkn5h13oGRVD3wJ6sz5/vY2RwCd3P+dl5VKk=; b=FGuRpBL1r1O/QJ6w2f2h8XuMIqDR8yOJzLieVTqOjG9geX1hf955wgZDyMwousC1hi vqEHwgcFMLBg0yohI2qtSE3mULwUXvesHwYm85E0P0MvAJuUiLFqEnorjuPHh6qgr6Ys j1vtbxt6tDxH6VROmui/CbkEIVXJ3pUn+H4pV8dLu9pLJlXApVbIGc5VKhB9owWQgAps r5MYNxKturOvVnKGCCBzwYq3lD3sLFNC0pdNzob021MojwxaIGg5EzLpQ/decOe4Iew6 XVV/j0rdMKPp46S13eKqsBvqV+JyV4y3ntUKEyd6I7s1neEq+nufS5Mw6SNCSBa1EpOA GtZQ== X-Gm-Message-State: AKGB3mLMqmC65KCqIscsKAC8KrUrc5uwijrrvSSn4G4zoXgMuKXivdaE Xamw9YzW+XR7aVraA7MKe7ZsJA== X-Google-Smtp-Source: ACJfBovBJP82UYD8u/UNJZE+e2BCTRvOKt53wxP6PXJtm5QUd+u4rfbZVxDXQkdTawbPoBIRTpOMdA== X-Received: by 10.36.173.92 with SMTP id a28mr733730itj.122.1513204823288; Wed, 13 Dec 2017 14:40:23 -0800 (PST) Received: from localhost ([2620:15c:2c4:201:c094:33ff:f0a:1711]) by smtp.gmail.com with ESMTPSA id 66sm208286iof.30.2017.12.13.14.40.22 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 13 Dec 2017 14:40:22 -0800 (PST) From: Mahesh Bandewar To: David Miller , Netdev Cc: Eric Dumazet , Mahesh Bandewar , Mahesh Bandewar Subject: [PATCH next 0/2] ipvlan: packet scrub Date: Wed, 13 Dec 2017 14:40:12 -0800 Message-Id: <20171213224012.202819-1-mahesh@bandewar.net> X-Mailer: git-send-email 2.15.1.504.g5279b80103-goog Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Mahesh Bandewar While crossing namespace boundary IPvlan aggressively scrubs packets. This is creating problems. First thing is that scrubbing changes the packet type in skb meta-data to PACKET_HOST. This causes erroneous packet delivery when dev_forward_skb() has already marked the packet type as OTHER_HOST. On the egress side scrubbing just before calling dev_queue_xmit() creates another set of problems. Scrubbing remove skb->sk so the prio update gets missed and more seriously, socket back-pressure fails making TSQ not function correctly. The first patch in the series just reverts the earlier change which was adding a mac-check, but that is unnecessary if packet_type that dev_forward_skb() has set is honored. The second path removes two of the scrubs which are causing problems described above. Mahesh Bandewar (2): Revert "ipvlan: add L2 check for packets arriving via virtual devices" ipvlan: remove excessive packet scrubbing drivers/net/ipvlan/ipvlan_core.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)