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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham 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 5A200C43381 for ; Tue, 26 Mar 2019 17:30:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 27D60206B7 for ; Tue, 26 Mar 2019 17:30:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729440AbfCZRag (ORCPT ); Tue, 26 Mar 2019 13:30:36 -0400 Received: from mga18.intel.com ([134.134.136.126]:30741 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726111AbfCZRag (ORCPT ); Tue, 26 Mar 2019 13:30:36 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Mar 2019 10:30:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,273,1549958400"; d="scan'208";a="330875435" Received: from ellie.jf.intel.com (HELO ellie) ([10.54.70.67]) by fmsmga006.fm.intel.com with ESMTP; 26 Mar 2019 10:30:34 -0700 From: Vinicius Costa Gomes To: Vladimir Oltean , davem@davemloft.net, netdev@vger.kernel.org Cc: f.fainelli@gmail.com, andrew@lunn.ch, vivien.didelot@gmail.com, linus.walleij@linaro.org, Vladimir Oltean Subject: Re: [RFC PATCH net-next 00/13] NXP SJA1105 DSA driver In-Reply-To: <20190324032346.32394-1-olteanv@gmail.com> References: <20190324032346.32394-1-olteanv@gmail.com> Date: Tue, 26 Mar 2019 10:30:31 -0700 Message-ID: <87ftr9fsqw.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Vladmir, Vladimir Oltean writes: > This patchset adds a DSA driver for the SPI-managed NXP SJA1105 driver. > Due to the hardware's unfriendliness, most of its state needs to be > shadowed in kernel memory by the driver. To support this and keep a > decent amount of cleanliness in the code, a new generic API for > converting between CPU-accessible ("unpacked") structures and > hardware-accessible ("packed") structures is proposed and used. > > Then several small modifications are done to the DSA core, like changing > the order of two calls during initialization, or permitting driver > access to the dp->vlan_filtering property. > > These small modifications are done for the greater goal of adding > support for 802.1Q pseudo-switch tagging. The limitations of this type > of tagging are discussed in the commit that adds it, and in the code > comments. > > The SJA1105 driver then proceeds to extend this 8021q switch tagging > protocol while adding its own (tag_sja1105). This is done because > SJA1105 needs SPI intervention during transmission of link-local > traffic, which cannot be done from the xmit handler but requires a > deferred worker thread. > > The driver is GPL-2.0 licensed. The source code files which are licensed > as BSD-3-Clause are hardware support files and derivative of the > userspace NXP sja1105-tool program, which is BSD-3-Clause licensed. > > TODO items: > * Add full support for the P/Q/R/S series. The patches were mostly > tested on a first-generation T device. > * Add timestamping support and PTP clock manipulation. > * Figure out what the current state of tc-taprio hw offload is, and > attempt to configure the switch's time-aware scheduler using that. At this point, there's no support for hw offloading in taprio. I am planning on sending an RFC suggesting a interface soon (this week, I hope). That RFC should at least be useful to get this conversation started. By the way, Is there a publicly available datasheet I can take a look? Cheers, -- Vinicius