From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mail.toke.dk (Postfix) with ESMTPS id F27B19FCA20 for ; Mon, 10 Apr 2023 17:33:54 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=miE+AoTt DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681140835; x=1712676835; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=T1z6BxaugSjydJy6lku0cHkh2+9LTE4hV0X6Y/v44XI=; b=miE+AoTtXqbJoRjgVNpzg8fLtJ9E7cmwBkY3iz2a4xrbZKw46hk1cfV7 fk/DqO5myrolu6VpAgxAGzB0MjlB8TTfwOjBe4mdX5kn9AVLaYaF0L+ah yewMvu9G1CHDbjU4RrnH/kj0Sr1GuW0TH1a0MDeuywiv3/Ihj9sSk5ixL 3bZ1dQpdybFinOTUqtUgSMLeggNzuqxotlSixS1Sd0Rlg79mWrn6QtMEs +fhF+MHh1VMOIf9jUOA7RbaRN6qxeogUHuf4fz8Z98c9Ie2TIjl4Kg/Tk /faGBcvDEarmCm8PFwZfZ2jipozhT4R5DmOhb0um5bAa8gW3C2ZzPCOWU g==; X-IronPort-AV: E=McAfee;i="6600,9927,10676"; a="429666335" X-IronPort-AV: E=Sophos;i="5.98,333,1673942400"; d="scan'208";a="429666335" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2023 08:33:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10676"; a="665642464" X-IronPort-AV: E=Sophos;i="5.98,333,1673942400"; d="scan'208";a="665642464" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga006.jf.intel.com with ESMTP; 10 Apr 2023 08:33:51 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 10 Apr 2023 08:33:51 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 10 Apr 2023 08:33:50 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Mon, 10 Apr 2023 08:33:50 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.43) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Mon, 10 Apr 2023 08:33:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PD6sKvHNgeCTzndc+ul3yzLQ0xkk+GPGbihx+aLMu7xtHDPx4DKTw5pREDmSZFt+WvNxXnZGD6fuxe80BkhGkaikFDn9sOjW4kxwpT7qkCaQx10l+9lQK4lVoAA1WBl+Tw3eD0+VgP/xLtXd2NMA9g3bHf2tcIKF2YZB/DymgsSATdwa25AiHCKZyImt0H4tj+UBYi9lTHlJ6UkrNHGFJ6CiWnq73+pVNlyC1/s/VoHB/jIZT1n9oCShMJD6o1A0iXYAXvsch29QoD2pdr3/lBSzRlLWvvor8h/OdDD7zHranqMZlMuglfbHLF6Q8u9Xk8GY6pfazEA+JHHOn72RSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oHdkmtq+EaZs81BzxzrC91ypv9+2gWMrVUEDIV9LpVM=; b=jIf7qE9UZ7XAy12WseD43YgYtJwRJLm2m2MTWu5H20um9aPyztkXoyjgSI+eOUFUhATGPpqRI08do8vBy6rOXslyEoeCBK9NbZ3Lvn1FgplZVOQYBB8rTzPxtKLPLBih9oBX+gB+3ii+8XsX5GC2BM/VEFuifCOqq3/fJBw9H8qMkWUbS2W4S3gLGJ1P55+p8hWliFNkFPjIDDg/w3xzBztmK+c1VxW1Ulk2CdwsQYaIgPIt9vXc9f9am8FDQ0YS5tbZsgI+C/iQpAQxLofScbvKRiq86r7YCIWm6QKpKzjJNHJ8ObysthOftNyxZMr9a/3stzl4vSxg7wW9q2+//A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from PH0PR11MB5830.namprd11.prod.outlook.com (2603:10b6:510:129::20) by CH3PR11MB7867.namprd11.prod.outlook.com (2603:10b6:610:12a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.36; Mon, 10 Apr 2023 15:33:48 +0000 Received: from PH0PR11MB5830.namprd11.prod.outlook.com ([fe80::1c4e:86ae:810d:1fee]) by PH0PR11MB5830.namprd11.prod.outlook.com ([fe80::1c4e:86ae:810d:1fee%2]) with mapi id 15.20.6277.036; Mon, 10 Apr 2023 15:33:48 +0000 From: "Song, Yoong Siang" To: Simon Horman Thread-Topic: [PATCH net-next 3/4] net: stmmac: add Rx HWTS metadata to XDP receive pkt Thread-Index: AQHZa5S9mRB50P2QwkG1pXlh2ZtnBK8klgKAgAAUx8A= Date: Mon, 10 Apr 2023 15:33:48 +0000 Message-ID: References: <20230410100939.331833-1-yoong.siang.song@intel.com> <20230410100939.331833-4-yoong.siang.song@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR11MB5830:EE_|CH3PR11MB7867:EE_ x-ms-office365-filtering-correlation-id: f9b172aa-80bd-4303-bbf4-08db39d8fa7f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: aJIAfFuOVH5uE/vv1kQ4J2NveFfNsUDkzcYsQa7l6zdS23HvFjMaBkWTj/v6R/chdElQzRsGjAlW6dVeKYhzGhi34xJlEDjDsYNZFvuGFUdVmp6w9U+BVBmrXRJT3jf87wtF0OPRniQhcPteJRBBL6nU2IAh0royh0xVIA9oyi87CkWnm4ZFLK3dhje+num8cNUbg2UQgeymyHr1UQpTIlITpcGgUOUu+/6J9RKmm3c7co6D8MXABGtVfSXGC2sIcXa1QajaWSkfoPXZEIfFAPmEdw1Bk3VPRLHeZj/9k77m+F676AW72IXoVxOZUiKKtAM866U2ipGu8fh7VHMT2FF/oBVbWeRnnslHWNxke5yo3xk9btlw1jpySq9I4R7RM5bQrx3eWKMG/BwA/u37j+PpEOrMBpXb4oE0dANcr5GK0Md7KDYwjPcnq4PNp/2PmHZpCBO4vUKYfRnTkvtHQqeEoiwJeLrmMf+vWdaZxS2lNGFnRjCaAH/V82AN7z49vIDiAMe0seslcVS25lz7/bW3YESvx/5S7eVsr88eLPL0KnSJBcKNFVgC84AOspdVoxvQ0P3SuFnBLarJ4n9qpBN4HQvCk4PVrHuec/PjbEw= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB5830.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(346002)(396003)(376002)(136003)(366004)(451199021)(7696005)(71200400001)(478600001)(86362001)(55016003)(33656002)(83380400001)(38070700005)(82960400001)(38100700002)(122000001)(2906002)(7416002)(54906003)(316002)(9686003)(186003)(55236004)(6506007)(26005)(66476007)(8676002)(64756008)(66446008)(66556008)(8936002)(6916009)(5660300002)(52536014)(41300700001)(76116006)(66946007)(4326008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Wz6sFGgLiUdqnn7XcaOGvH+1ScmAUgp+t2g6OzLb1BB+tSdw2Z63yRx/GGeY?= =?us-ascii?Q?ccpmXtvoihUZkq4mfjA/pkwRlJ6PrYuBWGQfef1+Lbc0MvptkMEZfcfSN2pt?= =?us-ascii?Q?39QykykUDTS779ShzYFGW1VvKxj7SA6LfWSQpszEUT29WDPP8vZsw7rYFolN?= =?us-ascii?Q?R3qRF+jmH8k8KWEsQeIB84qHXRlhwtAYiprbzaUqpSPFZT7mmBb101kxBwg9?= =?us-ascii?Q?mZiIX+Y2l9zz+S8dCXgQKNKTayAEsKfi3/ITiTXUdz1a8I4MJRQD/H6JW0t/?= =?us-ascii?Q?mPzvbzXUwZKXtR3WUAsES5hmAitUEDN9WraYUYZodyUyZvgakJP0H+KPV6b/?= =?us-ascii?Q?MKaag2AWAlX9SbS33NV1P34g4pN9o+GdpgsFfBFeMKAs1tfLNvlCo6kj1ygK?= =?us-ascii?Q?GNTydaol48kXMuooyTbENSWMzQxnEmqnC8Rc8BPDkEb07hbZ0ThjzWIX7xE5?= =?us-ascii?Q?jEPtvZgeonwKGgMM6lp6CF5Oht0d3clE4fJtHznc3VKRzF4z8OkzcEVXtEaG?= =?us-ascii?Q?BIZXjulbEwxchEFmK9V/hZiIgf9x2yOTne4xhtQIRqN8mbzJnba+bY4iwYfK?= =?us-ascii?Q?QmH6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i2kjopASU?= =?us-ascii?Q?W+ZZ+dsMIPFwe/DzlQulJhjFtfR3tM52/Lz13JWcIJwnVUHLTvvT4fGInKUj?= =?us-ascii?Q?r6QT/vubAFJWYraZeB4g4HGB01ey/FG2uW6Slyv7?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5830.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f9b172aa-80bd-4303-bbf4-08db39d8fa7f X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2023 15:33:48.1373 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: jPn45OTNDhMM+PkC2AtMVt736kbKGXUkhA295h4UlWgcCbT9N3ggJ66QudPrlOS6kEA/o9o6WsgINyb5wZYumgF5JMJLGVjgF3qkj2qbDQU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB7867 X-OriginatorOrg: intel.com Message-ID-Hash: RHI677BESO3NPTNLWVL7EQMYJWPSH3O2 X-Message-ID-Hash: RHI677BESO3NPTNLWVL7EQMYJWPSH3O2 X-MailFrom: yoong.siang.song@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: 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" , "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" X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] Re: [PATCH net-next 3/4] net: stmmac: add Rx HWTS metadata to XDP receive pkt List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: >On Mon, Apr 10, 2023 at 06:09:38PM +0800, Song Yoong Siang wrote: >> Add receive hardware timestamp metadata support via kfunc to XDP >> receive packets. >> >> Signed-off-by: Song Yoong Siang > >... > >> @@ -7071,6 +7073,22 @@ void stmmac_fpe_handshake(struct stmmac_priv >*priv, bool enable) >> } >> } >> >> +static int stmmac_xdp_rx_timestamp(const struct xdp_md *_ctx, u64 >> +*timestamp) { >> + const struct stmmac_xdp_buff *ctx =3D (void *)_ctx; >> + >> + if (ctx->rx_hwts) { >> + *timestamp =3D ctx->rx_hwts; >> + return 0; >> + } >> + >> + return -ENODATA; >> +} >> + >> +const struct xdp_metadata_ops stmmac_xdp_metadata_ops =3D { >> + .xmo_rx_timestamp =3D stmmac_xdp_rx_timestamp, >> +}; > >sparse seems to think this should be static. > >drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:7082:31: warning: symbol >'stmmac_xdp_metadata_ops' was not declared. Should it be static? Yes, you are right. It should be static. I will add correct it in v2. Thank= you. Thanks & Regards Siang > >Link: >https://patchwork.kernel.org/project/netdevbpf/patch/20230410100939.331833 >-4-yoong.siang.song@intel.com/ > >> + >> /** >> * stmmac_dvr_probe >> * @device: device pointer