From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C21AC433E6 for ; Sun, 24 Jan 2021 23:21:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 279ED22C9C for ; Sun, 24 Jan 2021 23:21:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726586AbhAXXVB (ORCPT ); Sun, 24 Jan 2021 18:21:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726449AbhAXXUs (ORCPT ); Sun, 24 Jan 2021 18:20:48 -0500 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E830DC061573 for ; Sun, 24 Jan 2021 15:20:07 -0800 (PST) Received: by mail-lj1-x22b.google.com with SMTP id l12so10597943ljc.3 for ; Sun, 24 Jan 2021 15:20:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tT/n9x6Id31H9nlSVajbbewbA+QGS9a48tgqL7XH9i8=; b=yH9cMFbfha4n4EyOsu8yVuWvg3Gf0Y58m84MQT+zY5RjguDUNGAHxf55+l2/JNEYQh J/aE2ay6IopDpOBJAJL1QTFFMCvseFiGGvA8sk4UwI15HOGLOKNRKFVUh467nrFoRdY3 eDspU2ovc4Vrnh1jzrUqu6LeHAMm4uKFHc4yQX9rf+PLCAueIvJUmiSYXP9Z+XNffYi0 4r9uXB3lhxVfEGNyiglGVlKFjujJHbCsGgs89rkE5s+Wn5uMNEQLyFUaj/L5Ze3VnWTI jEHdbQARRJrZZUajUlKLeC2z0KD8IUJzinxJIBwYXkkusoKBeR/zu0HJDbBDRLmUFljV Ggjw== 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=tT/n9x6Id31H9nlSVajbbewbA+QGS9a48tgqL7XH9i8=; b=UMbB532RlI2ZgATwumJOdginn8opwnFTojjnfdadGi3KisawAcICbMLLPmoLgZH3Ks wpEjAAE5ffjQrCU59mdiDEIC1hVtcXo7jARpa3L4DJ0DMEfAHYn+gj1zgAI9qktgm2QR /COXJ776ejU9BHTtEv3xM5MJ1wXI3YE0eWMicQtScBP+WobJYO0EJRMfYjY+c+ydATNg 2g8ASqQn4MbHwE/iIU3sXzqpIFSIeYHE2kdTHzfH4nAvOo0ibRe3a0YvPvG6hF5lJLTh 7BkdIQZrrbxkUkJj5E+V02XIXm2mFESSH9fjRV815soYHsKikokD+Gswp0T9Rkh0Q7/7 At/w== X-Gm-Message-State: AOAM533V5uYjxwqPArpDZWjHR/Cku2f4zZEWKpYvobT5EM6G07S+6JO1 EJScF3FPTePspHOfrxfZf4ewdBlRUpYI2CBmtL1YsQ== X-Google-Smtp-Source: ABdhPJx+rTG1fVqtxNEzsYuTm6ZHfxLc38QVvlyryf6915amIoApS2QGwuk7lea+p8O1JQ+yH+S5/K0t2ufq59yXlcI= X-Received: by 2002:a2e:894d:: with SMTP id b13mr1063908ljk.438.1611530406509; Sun, 24 Jan 2021 15:20:06 -0800 (PST) MIME-Version: 1.0 References: <20210120063019.1989081-1-paweldembicki@gmail.com> <20210121224505.nwfipzncw2h5d3rw@skbuf> In-Reply-To: <20210121224505.nwfipzncw2h5d3rw@skbuf> From: Linus Walleij Date: Mon, 25 Jan 2021 00:19:55 +0100 Message-ID: Subject: Re: [PATCH] dsa: vsc73xx: add support for vlan filtering To: Vladimir Oltean Cc: Pawel Dembicki , netdev , Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" , Jakub Kicinski , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 21, 2021 at 11:45 PM Vladimir Oltean wrote: > On Wed, Jan 20, 2021 at 07:30:18AM +0100, Pawel Dembicki wrote: > > This patch adds support for vlan filtering in vsc73xx driver. > > > > After vlan filtering enable, CPU_PORT is configured as trunk, without > > non-tagged frames. This allows to avoid problems with transmit untagged > > frames because vsc73xx is DSA_TAG_PROTO_NONE. > > > > Signed-off-by: Pawel Dembicki > > What are the issues that are preventing you from getting rid of > DSA_TAG_PROTO_NONE? Not saying that making the driver VLAN aware is a > bad idea, but maybe also adding a tagging driver should really be the > path going forward. This is due to the internal architecture of the switch, while it does have an internal tagging format, this is stripped off before letting it exit through the CPU port, and tagged on by the hardware whenever the CPU transmits something. So these tags are invisible to the CPU. Itr would be neat if there was some bit in the switch we could flick and then the internal tagging format would come out on the CPU port, but sadly this does not exist. The vendors idea is that the switch should be programmed internally as it contains an 8051 processor that can indeed see the internal tags. This makes a lot of sense when the chips are used for a hardware switch, i.e. a box with several ethernet ports on it. Sadly it is not very well adopted for the usecase of smart operating system like linux hogging into the CPU port and using it as a managed switch. :/ We currently have the 8051 processor in the switch disabled. Yours, Linus Walleij