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=-2.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 9BD3DC32753 for ; Wed, 14 Aug 2019 13:42:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 64FD1206C2 for ; Wed, 14 Aug 2019 13:42:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="YXYYa1Dg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727671AbfHNNm2 (ORCPT ); Wed, 14 Aug 2019 09:42:28 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:60304 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726722AbfHNNm2 (ORCPT ); Wed, 14 Aug 2019 09:42:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=8HT0JtmkVnzZlMshiz9GqWKaGG3K3WazbCjjINxj7aE=; b=YXYYa1Dg8+lSEoBd1xzYn58EdK 2+r+L+GkbYZyPkpyiGgs82c5BTOHigkdb3aNCy/ckLi/YZBPn+fkULs0rW6dvzgN9amRbesWVWExi x3YahwUHslKZzLGyjljc0nqg/D/YgT8K6XM8zBnVJK5IdXA47NJScZxC9CezVbN7MBjY=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1hxtXl-0001Z1-1e; Wed, 14 Aug 2019 15:42:25 +0200 Date: Wed, 14 Aug 2019 15:42:25 +0200 From: Andrew Lunn To: "Y.b. Lu" Cc: "Allan W. Nielsen" , "netdev@vger.kernel.org" , "David S . Miller" , Alexandre Belloni , Microchip Linux Driver Support Subject: Re: [PATCH 3/3] ocelot_ace: fix action of trap Message-ID: <20190814134225.GB5265@lunn.ch> References: <20190812104827.5935-1-yangbo.lu@nxp.com> <20190812104827.5935-4-yangbo.lu@nxp.com> <20190812123147.6jjd3kocityxbvcg@lx-anielsen.microsemi.net> <20190813134236.GG15047@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > [Y.b. Lu] PTP messages over Ethernet will use two multicast addresses. > 01-80-C2-00-00-0E for peer delay messages. > 01-1B-19-00-00-00 for other messages. > > But only 01-80-C2-00-00-0E could be handled by hardware filter for BPDU frames (01-80-C2-00-00-0x). > For PTP messages handling, trapping them to CPU through VCAP IS2 is the suggested way by Ocelot/Felix. > > I have a question since you are experts. There real expert is Richard Cochran . He implemented PTP support for the mv88e6xxx devices, maintains to core code, and the linuxptp daemon. Any ptp support your post will be reviewed by him. > For other switches, whether they are always trapping PTP messages to CPU? For the mv88e6xxx family, there is a per port bit which enabled PTP. When enabled, PTP frames are recognised by the hardware and forwarded to the CPU. > Is there any common method in linux to configure switch to select > trapping or just forwarding PTP messages? The best answer to that is to look at other switch driver which implement ptp. The ptp core expects a ptp_clock_info structure, and one of its members is 'enable'. Andrew