Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4297467rwl; Mon, 10 Apr 2023 08:59:06 -0700 (PDT) X-Google-Smtp-Source: AKy350a4XPZjCyxl6h96soeurJ1qaHjgfw2a1QO1+oH7auXT5PVPsCH1YVaQpDxyUxPfz3RV7STe X-Received: by 2002:a17:902:e811:b0:19e:6516:127a with SMTP id u17-20020a170902e81100b0019e6516127amr16271369plg.39.1681142346332; Mon, 10 Apr 2023 08:59:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681142346; cv=none; d=google.com; s=arc-20160816; b=MF0FdVsu91F3JqwAzky5xDQdH2nuz1/RgTyacODwbBSadVRYrQ+i1kd8n3RkIlcJSE BJLbTb5wBnzq4xo8YYH+DBIApSLwd6Axw3aiZRRyQ8Uei578f/CeunakBV0uY4M2Iiek WBNnClFYWmzhRDUkpEWyEDg1dsdqHt0OAYCaLF1rMvvOx5H8LCnvTiNoyGjrWIdp1Lsy eO5GRVJJrUqrbF/7BzUizT4VGSHnXKNYtbp9dLNr2+yCXBU06r2m674Hco6E+1kgoUid RrCmwSguqJFzadlA6b4c8oHoCRseDFqGEkOofN8foREKALZOuxDbrTCyFna56Mnyd0vA uNtA== 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=MJJNXfROA0QTLMJ6xlMoYNJnGkNrIPWSaBGc6VH8Vp0=; b=h6P4PGEd6ItfdchlT6+losQlbN/ST7oLz6dcs5Zm21AVKt2EJ2/ngzbs4258fr+qDp HQmJEwY5uzGaZXBGFbU/SMJzELmNYnvau0nmczY5i7ehkNWjvlIrAgiBhA0JeQUr9/S0 bP5KydWy5NzdrGPYQC7Rupq9Zyh5kwdRthCgI7LiNF0GZrX6IISipMO2C5JcczLlAF4x m9UjqSq9TP124kLJDklMjrOFDbER1bKjDyXVo2R3tMf0yw/nPXujN1jZS+hLZxoSeBno BVoLeW2LK2EqNCAPDPNeloC8n+nP5Qna6ZbsjWzjmwVkQtbeBXNDzb746dSfYS4zBM5i XO0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fdiLwiVr; 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s37-20020a635265000000b00502f344050csi10509871pgl.313.2023.04.10.08.58.53; Mon, 10 Apr 2023 08:59:06 -0700 (PDT) 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=@intel.com header.s=Intel header.b=fdiLwiVr; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230042AbjDJP6q (ORCPT + 99 others); Mon, 10 Apr 2023 11:58:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229837AbjDJP6p (ORCPT ); Mon, 10 Apr 2023 11:58:45 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D1E830D6; Mon, 10 Apr 2023 08:58:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681142287; x=1712678287; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=HQO9M9sithh3L+t6OFXblJMgLNG8pcMkpCqPjnjf5T4=; b=fdiLwiVrexEMzH+5HEpFBXD3GujFgYv3V/e7Mey/gAXiJyVypQk3qkkc EfvgJC7xzM7OJ0qwdbh57dpe3g/IBZVa6y9NPoezhnOnBft1+UzxN0RjB +Q+evhoIecRFDbs+PL0QeEBiSuIoNdq9iIfzuNe73XQcQnq6Jp7jbXmgr dFXFcIzCmdrhktnnMG/NEMOOYMZNMAgSIdOGLGhJTkNyRl3PxkDU2vYT1 Dy6M/vPK1Ms5bdHyAui8VSRRonu3DI0M0fwmaaRO4V6rEg2BcCME/UBNN tMqnxW624amEY5jILdSx1IzRNC+tki/7vxO6TkkB9WaCD37jj6h+zfWGU Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10676"; a="343391636" X-IronPort-AV: E=Sophos;i="5.98,333,1673942400"; d="scan'208";a="343391636" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2023 08:57:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10676"; a="777601681" X-IronPort-AV: E=Sophos;i="5.98,333,1673942400"; d="scan'208";a="777601681" Received: from p12ill20yoongsia.png.intel.com ([10.88.227.28]) by FMSMGA003.fm.intel.com with ESMTP; 10 Apr 2023 08:57:47 -0700 From: Song Yoong Siang To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Stanislav Fomichev , Alexander Duyck , Ong Boon Leong Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, xdp-hints@xdp-project.net, Song Yoong Siang Subject: [PATCH net-next v2 0/4] XDP Rx HWTS metadata for stmmac driver Date: Mon, 10 Apr 2023 23:57:18 +0800 Message-Id: <20230410155722.335908-1-yoong.siang.song@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.5 required=5.0 tests=AC_FROM_MANY_DOTS, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=no 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 Implemented XDP receive hardware timestamp metadata for stmmac driver. This patchset is tested with tools/testing/selftests/bpf/xdp_hw_metadata. Below are the test steps and results. Command on DUT: sudo ./xdp_hw_metadata Command on Link Partner: echo -n xdp | nc -u -q1 9091 echo -n skb | nc -u -q1 9092 Result for port 9091: 0x55fdb5f006d0: rx_desc[3]->addr=1000000003bd000 addr=3bd100 comp_addr=3bd000 rx_timestamp: 1677762474360150047 rx_hash: 0 0x55fdb5f006d0: complete idx=515 addr=3bd000 Result for port 9092: found skb hwtstamp = 1677762476.320146161 Changes since v1: * Add static to stmmac_xdp_metadata_ops declaration --- Ong Boon Leong (1): net: stmmac: restructure Rx hardware timestamping function Song Yoong Siang (3): net: stmmac: introduce wrapper for struct xdp_buff net: stmmac: add Rx HWTS metadata to XDP receive pkt net: stmmac: add Rx HWTS metadata to XDP ZC receive pkt drivers/net/ethernet/stmicro/stmmac/stmmac.h | 5 ++ .../net/ethernet/stmicro/stmmac/stmmac_main.c | 88 ++++++++++++++----- 2 files changed, 73 insertions(+), 20 deletions(-) -- 2.34.1