Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8497981ybn; Tue, 1 Oct 2019 08:56:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqzhDX0V318/6Hx2MWcjI8b4i3CkCMV+sEpGhpI9mzYk/5lwhboTvvUuKmf16/cT9ONlHnxe X-Received: by 2002:a50:f0db:: with SMTP id a27mr26226970edm.17.1569945395174; Tue, 01 Oct 2019 08:56:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569945395; cv=none; d=google.com; s=arc-20160816; b=njFYICdNGMMR8JyCAxzLTRbgQ32riVfV9xMN0aONznSaQwqU5K2naPUd4FNdnGwmXY ktD7jR91VpjCYhZbyrYhiAjZUmfiKPYBC5IRY8balj6zHHX6ZHniRrPnDOr/oKG9KAn6 Yq3yn6KJEj/GdUuYvUwkh4Hin06CgnAPPPis9TGd+TxpTcMzWAYZtuff0ZWV6zyaimiW Ne1w8v4Nn/booYinMK2M5czZSbzrQyFV93T8+7tOzGEx+Gnzel1UjBbXExl5LoOv4EjU P6TI7VDoB+YVCUKqkM97oNxQepsj/1Me4M6N48ZwLsu+YECW4AIRqrxeCQo90JryTrOG DsHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=V4V5jIWn5TMskOGj1VKmy8D65TjwneLbv47G5q3wYlA=; b=IRfvhcQbPHiMgW0w6JN/MoLoC99BgeXX01kaSirUZdO0RkWMb+aD3YiElsPt756CTF lYhwoAtGCX325joMAagJFRADQvOjw0+5BMY3TVccYkM5D0UXTRqkuIY8XSnj9ToWhDg4 UToNHH3mxbqbA95dEP3MhjlkO/DNKlYtDbogpTePD9dERokTffxN9MqQ5OFeijAkQf9q Z+4ll5NXEV57zqaGRAsWXYSyeuFUi1O94gn7BukOd2UbCvtM8nXW4uHbVAsC38o0Bn8/ HUwgjVsRzzUFtz0Wk7YgKdPlocyAxc6KS3RyqUJU0MYc/WvJ9BAj88+GNWA4zrxwNVXx PRvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gDD8pfoN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y26si8993724edv.134.2019.10.01.08.56.10; Tue, 01 Oct 2019 08:56:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gDD8pfoN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389787AbfJAPwx (ORCPT + 99 others); Tue, 1 Oct 2019 11:52:53 -0400 Received: from mail-yb1-f194.google.com ([209.85.219.194]:40163 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727236AbfJAPwx (ORCPT ); Tue, 1 Oct 2019 11:52:53 -0400 Received: by mail-yb1-f194.google.com with SMTP id g9so5639760ybi.7 for ; Tue, 01 Oct 2019 08:52:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=V4V5jIWn5TMskOGj1VKmy8D65TjwneLbv47G5q3wYlA=; b=gDD8pfoNze5RsniU9r11QB8zd/KUJlt0Q+RcWfdBo50CKMkpUeIlky7lpimlrREF4j h8jKpoTXPR5irMaFgCYtW5rWlfQwAOoS9bkbOFaTs4Lx0Rkwpj2Oep5l2PSXB/C/5NRH i3cHdHfPVZMSfsqbnUyb/FOymgIjlgWjcp7GWMEs/ifqfdu9ESH1L8mLktPyum3291H5 zYv0sk+cLhwKhvLP7ufvg9R+y4PSwdkt7kve0IE3xzk+UUMyHhiI6oe6C1HBV/sQiifl HnSM4bFQfz3SkOGT7GX1YhBE+rx2F34YtzTGl8kHKIgkceOW2Px12vaKKuh5cTkJR3N8 Xujw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=V4V5jIWn5TMskOGj1VKmy8D65TjwneLbv47G5q3wYlA=; b=kwGnce8MXEqu07ADoBXpGQi6yLNhFQdB/N+hq6LgZddZH8elwsFSZckm4QToux+Dar hiPOQeUHkE7kkZAeBXkoHUbFWX0nC4MQ6L+zQWKVijNQnfLRygjVlZVribpO4tn0/lkz Ln/ZqBJWuWwHHoXuv1XiZpN7O/uJKqu6t5lM6p1dRluzNuZO5gjbMJwmUxkP6Yih5Z2Q erg7VGYMjnz3oBzjhc1wBzorYx+H20Q/62gzlyEA/HuGFoVIgW+m1ZOgm44HKvKYoExP lLO7n8EhbZJp6rAnjsVlU21ZMDVBz4w3bjt4cg5SwR3v/upD8bBLj7XZsMjuxebYZeEo SXWw== X-Gm-Message-State: APjAAAVrgJvWt233BoOkpvKotSb3REQ+2X5mUeQU13s+y2n7P7nawsYS HmoIGN8eOBwrd+I/fWU4CWlGsXbS X-Received: by 2002:a25:4e44:: with SMTP id c65mr18240072ybb.421.1569945169976; Tue, 01 Oct 2019 08:52:49 -0700 (PDT) Received: from mail-yw1-f53.google.com (mail-yw1-f53.google.com. [209.85.161.53]) by smtp.gmail.com with ESMTPSA id l2sm3564881ywd.16.2019.10.01.08.52.48 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Oct 2019 08:52:48 -0700 (PDT) Received: by mail-yw1-f53.google.com with SMTP id 129so4984830ywb.8 for ; Tue, 01 Oct 2019 08:52:48 -0700 (PDT) X-Received: by 2002:a81:9bd7:: with SMTP id s206mr18834302ywg.193.1569945168004; Tue, 01 Oct 2019 08:52:48 -0700 (PDT) MIME-Version: 1.0 References: <1569646705-10585-1-git-send-email-srirakr2@cisco.com> <20191001084427.73f130c0@hermes.lan> In-Reply-To: <20191001084427.73f130c0@hermes.lan> From: Willem de Bruijn Date: Tue, 1 Oct 2019 11:52:11 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] AF_PACKET doesnt strip VLAN information To: Stephen Hemminger Cc: Willem de Bruijn , Sriram Krishnan , Andrew Morton , xe-linux-external@cisco.com, "David S. Miller" , Network Development , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 1, 2019 at 11:44 AM Stephen Hemminger wrote: > > On Mon, 30 Sep 2019 11:16:14 -0400 > Willem de Bruijn wrote: > > > On Mon, Sep 30, 2019 at 1:24 AM Sriram Krishnan wrote: > > > > > > When an application sends with AF_PACKET and places a vlan header on > > > the raw packet; then the AF_PACKET needs to move the tag into the skb > > > so that it gets processed normally through the rest of the transmit > > > path. > > > > > > This is particularly a problem on Hyper-V where the host only allows > > > vlan in the offload info. > > > > This sounds like behavior that needs to be addressed in the driver, instead? > > This was what we did first, but the problem was more general. > For example, many filtering functions assume that vlan tag is in > skb meta data, not the packet data itself. Out of curiosity, can you share an example? > Therefore AF_PACKET would > get around any filter rules. Packet sockets are not the only way to inject packets into the kernel. This probably also affects tap.