Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1738096rwb; Thu, 1 Dec 2022 23:54:37 -0800 (PST) X-Google-Smtp-Source: AA0mqf4w3b9SHL0ttC6rDETcOu8fOS+VV60/s1QlsK535kXrWsafS/hcfKlfa+F/pz5xfe8E48av X-Received: by 2002:a17:902:cf4b:b0:186:7a1d:b6ee with SMTP id e11-20020a170902cf4b00b001867a1db6eemr57227776plg.67.1669967677566; Thu, 01 Dec 2022 23:54:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669967677; cv=none; d=google.com; s=arc-20160816; b=uipUP48m1DtNY2eIoPWJ4h9Q5P+JpRWyINI51uanU6daYsnkVazhaWMHpJkeHWDr76 lDQizZsZBZaV4wTonPQ+iu8SuixvPhr0alVSVWaDVPqpD3PLZ8PwK558QYkf/wWUOTpv taCtSmOmwMUtZhs7i7W2YV6h81ppvkU/mGCzWejKmJxE8MnY+8YLWqqvVyMLKVnOyU25 +o6mxKr9FwgD5Wavdj32brw8KnYQiguMnuoSsMFJS7OBe0ESh8lgGOdcq+83h2tR617F FdH2i0gCtHjwy0BTAQXU2ixzLTMqTR2V+Aa+gaCTyu/WRrg5x6fI1le9yVJUCkofxr9b u/sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=DQzPUp+A2akFyXW0RyCPukXFeuIh8PmCSv+27tCGl5M=; b=CVgxomUdtAKtFXQfjUq88AUPQvKCHGD/7eRaqhPjhLfKFTKD5RYeLw157KC0XvnIMM WUKUBqa5DJdxlwcVzVQ+a2HbVxRqOBWm9JiFvkW8E6LuWTH6PScEaPGDsD5K3L7ofEhR yzU1yeoTAX1swIZbXiPjYErRr3tQ21A/ep5tasGta81W9zoxtNszqXsI8tueWrohEGeW HiBArujfzmR8A2ObqLu5wtiicc+gIzvB29xPvcNZQM5A8zNl58+VR8Arba2qyB0/ckDr CfxS7tN8c/LnyBWmklcgEDJKyOuD5EqFPKjXPeUpdZl4mfuJ8WTUYUmfYSdHT0biEmPS 9w5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=btN4ZIgd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e30-20020a631e1e000000b004786b79642dsi5246566pge.276.2022.12.01.23.54.26; Thu, 01 Dec 2022 23:54:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=btN4ZIgd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232561AbiLBHwI (ORCPT + 82 others); Fri, 2 Dec 2022 02:52:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232593AbiLBHve (ORCPT ); Fri, 2 Dec 2022 02:51:34 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A050AFCDD; Thu, 1 Dec 2022 23:51:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1669967487; x=1701503487; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=rbRgJC5OGOpM1O9o3ILlJTLdncz7C20gbr77o1yERhk=; b=btN4ZIgd2TfL+m1+8So/JfqilytDlEQ7QUhTfbj0qk9tVFTGNOA7Z5Zn gvOcQ2giqIMtVHOtL/cyiTt7+esU+1PN1HwWIRF3b/7QlP56Qbo2vlg8S RMCCCSYn+pIfSR65U/8Cr6B6lLMHWTEcU/W+I5sWOFZUAuZplNbBji5ox +tE4uyxtdPXkHqs88luJl7jdVAXfUq3oCQjKjkk7p/VUPXB4df8E34KYQ s365XpmggHn9Bt9fLyeN2Mz14pjEU2/chRnUgJWpX0Hi5bvlBW2Od119h ugIFADOqUcELyAtT3mSPqbM/XrhSVFcbo7C18pcwVw3ly230aXCzSuwSp Q==; X-IronPort-AV: E=Sophos;i="5.96,210,1665471600"; d="scan'208";a="126141868" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 02 Dec 2022 00:51:26 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Fri, 2 Dec 2022 00:51:24 -0700 Received: from soft-dev3-1.microsemi.net (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Fri, 2 Dec 2022 00:51:21 -0700 From: Horatiu Vultur To: , , CC: , , , , , , , , , , Horatiu Vultur Subject: [PATCH net-next v2 0/4] net: lan966x: Enable PTP on bridge interfaces Date: Fri, 2 Dec 2022 08:56:17 +0100 Message-ID: <20221202075621.1504908-1-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.38.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Before it was not allowed to run ptp on ports that are part of a bridge because in case of transparent clock the HW will still forward the frames so there would be duplicate frames. Now that there is VCAP support, it is possible to add entries in the VCAP to trap frames to the CPU and the CPU will forward these frames. The first part of the patch series, extends the VCAP support to be able to modify and get the rule, while the last patch uses the VCAP to trap the ptp frames. v1->v2: - use PTP_EV_PORT and PTP_GEN_PORT instead of hardcoding the number - small alignment adjustments Horatiu Vultur (4): net: microchip: vcap: Add vcap_get_rule net: microchip: vcap: Add vcap_mod_rule net: microchip: vcap: Add vcap_rule_get_key_u32 net: lan966x: Add ptp trap rules .../ethernet/microchip/lan966x/lan966x_main.c | 19 +- .../ethernet/microchip/lan966x/lan966x_main.h | 14 + .../ethernet/microchip/lan966x/lan966x_ptp.c | 236 ++++- .../microchip/lan966x/lan966x_tc_flower.c | 8 - .../microchip/lan966x/lan966x_vcap_impl.c | 11 +- .../net/ethernet/microchip/vcap/vcap_api.c | 824 ++++++++++++++++++ .../ethernet/microchip/vcap/vcap_api_client.h | 8 + .../microchip/vcap/vcap_api_debugfs.c | 492 ++--------- .../microchip/vcap/vcap_api_private.h | 14 + 9 files changed, 1171 insertions(+), 455 deletions(-) -- 2.38.0