Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752536AbdI1RvK (ORCPT ); Thu, 28 Sep 2017 13:51:10 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:48352 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752398AbdI1RvE (ORCPT ); Thu, 28 Sep 2017 13:51:04 -0400 X-Google-Smtp-Source: AOwi7QBhPxibFXEjvjcHM0+Kq6cH6vdzCxUsob8SUk04EzrEkzNqNl/9N0VqHwsNd259n+5e/wW0xg== Subject: Re: [PATCH net-next RFC 0/9] net: dsa: PTP timestamping for mv88e6xxx To: Andrew Lunn , Brandon Streiff Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , Vivien Didelot , Richard Cochran , Erik Hons References: <1506612341-18061-1-git-send-email-brandon.streiff@ni.com> <20170928173629.GD14940@lunn.ch> From: Florian Fainelli Message-ID: <8828c5c3-fe0f-c8d0-0a19-f173001de607@gmail.com> Date: Thu, 28 Sep 2017 10:51:00 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170928173629.GD14940@lunn.ch> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1162 Lines: 26 On 09/28/2017 10:36 AM, Andrew Lunn wrote: >> - Patch #3: The GPIO config support is handled in a very simple manner. >> I suspect a longer term goal would be to use pinctrl here. > > I assume ptp already has the core code to use pinctrl and Linux > standard GPIOs? What does the device tree binding look like? How do > you specify the GPIOs to use? > > What we want to avoid is defining an ABI now, otherwise it is going to > be hard to swap to pinctrl later. > >> - Patch #6: the dsa_switch pointer and port index is plumbed from >> dsa_device_ops::rcv so that we can call the correct port_rxtstamp >> method. This involved instrumenting all of the *_tag_rcv functions in >> a way that's kind of a kludge and that I'm not terribly happy with. > > Yes, this is ugly. I will see if i can find a better way to do > this. See my reply in patch 6, I may be missing something, but once dst->rdcv() has been called, skb->dev points to the slave network device which already contains the switch port and switch information in dsa_slave_priv, so that should lift the need for asking the individual taggers' rcv() callback to tell us about it. -- Florian