From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5811B425F0 for ; Wed, 20 Sep 2023 14:33:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4EADB40A8B; Wed, 20 Sep 2023 14:33:12 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id E54E54027B; Wed, 20 Sep 2023 14:33:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695213189; x=1726749189; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=z1upSfiHfLINCskmuX1WaJFhOlKtH3+j+LKe1AUxfNU=; b=dQXyUKT9BOZ3TfD0kHv6MJWLW6YADDUjOYeNxSYgawGgGTsDJbq3fkTl S75K2drx8HyWSGFlomeKbmUHjCDfxmI6hCY9791Zh1+bQAd1SDfWzqokV Xbyp5DFuFFC4P3IYlmv7xa8S1VQeZoZRD6C3PaMMCnckI3zQGOYn53MCq dK4JiPCSPErw2tFHl81p80HXUHXLyBw6CDL1cuDqj1x/rmSFRNWGfVvia KU3T0QibD3fmuxB+yRqjAJntniLUKtZoKNNFH9yQnv+6pkbjF0+qBkmA5 jeHazyqERVaBwc7+/W3nGjx4fGpk6+3x7cy5pVApVsXSjBtjsMufQkO6w A==; X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="380112133" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="380112133" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2023 05:32:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="781673292" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="781673292" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 20 Sep 2023 05:32:48 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Wed, 20 Sep 2023 05:32:47 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Wed, 20 Sep 2023 05:32:47 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Wed, 20 Sep 2023 05:32:47 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.170) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Wed, 20 Sep 2023 05:32:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kjqbm9jEpUB1hrWEDBC1CMWVINmtvyi/KOiS4QOOJ/Kp0xTVbif8HQzGJm7FycfG3JF7jo9euD+J/+V0zlhEyzW/FYByX44WLsqPswozaf82ZylkBsseXqp4JRP13QtJtGH/PpnWBwMwb5NSFPIhATaDUqMDADiwXreFFDWHiOEwqCiDh1d14y63mYWv+jSAkq4G0rYEQAzPXl51riZfiBNeqNt5x3f+xci118O1TSYjNcXB7OXEU/2MvIjhQlTjXTZoAdRHzEnFxkrEBc6/jJWX9y7E8VfuAHdiBqKzk8cZr2SeEQFg5wnDXvvvAnHPjmcgCqu0UL05CZcpDnd+3A== 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=m8rwrsNIQgNz7wb+fEHVsiUHehQbBURzAtk9hr70gCI=; b=FR9NOtoS08lINzcW1QUjDXKZkoUkjKXbO8vqJWBPH9OTsqj7QTlY//0Xzvb9xcbK8IXXMsDe/cPjgyBgvrE55fB+oITVaUkF5tRTJyPdyaJ6ibtDcpU6AAWpVlt3GwxiF9VnSNU35u72XzD/HNkIVXXL7iWpz2OPL5HEJsIU4C3u0mh2MCKN4Xj/3i7mkxcaeZBf1GfPJOL/mGnhdsxR5845UFX1rxVU8Ix+gzk1xL5Nx1HXEvMlP5iSH2rfTXq6pEMV4mtG+HSH/flJJoWLAvRaIucDBj113uWMmZUrctW/QqVTpG219enaQUAHxQ++bzfs5YC9DIbf3slJ1Ng8gA== 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 DM6PR11MB3868.namprd11.prod.outlook.com (2603:10b6:5:19f::13) by DS7PR11MB6223.namprd11.prod.outlook.com (2603:10b6:8:98::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.28; Wed, 20 Sep 2023 12:32:43 +0000 Received: from DM6PR11MB3868.namprd11.prod.outlook.com ([fe80::ea65:2100:3091:875a]) by DM6PR11MB3868.namprd11.prod.outlook.com ([fe80::ea65:2100:3091:875a%7]) with mapi id 15.20.6792.026; Wed, 20 Sep 2023 12:32:43 +0000 From: "Naga Harish K, S V" To: Rahul Bhansali , "dev@dpdk.org" , Jerin Jacob , "Kundapura, Ganapati" CC: "stable@dpdk.org" Subject: RE: [PATCH] eventdev/eth_rx: fix timestamp field register in mbuf Thread-Topic: [PATCH] eventdev/eth_rx: fix timestamp field register in mbuf Thread-Index: AQHZ6gnjiTixu8tz4UaatUhmSphgprAjp3Zw Date: Wed, 20 Sep 2023 12:32:42 +0000 Message-ID: References: <20230918082553.704859-1-rbhansali@marvell.com> In-Reply-To: <20230918082553.704859-1-rbhansali@marvell.com> 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: DM6PR11MB3868:EE_|DS7PR11MB6223:EE_ x-ms-office365-filtering-correlation-id: 422a4e41-15de-4474-be48-08dbb9d5afb7 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: /qTKcP3q2zIMduaiFMv3O2PbHbRUPdno0EeczCRbkwNnX0WN4bsXdTeRCWigmwMOm1Gc9xcY7H1ERH8j1BFqs+LpJMP3f/AsXV6Gjv5XS0ayRsyroQrO4RmAVKAJH1MyMqGl0DLX5rvORcDwhQ9giDElwJ9dGRWehcrqMzKdLBo010TuGyDFkwTDFwsUIFb5sXMgllOp2vfPF4jD16iD3lGjbSiXYVDZjpGunFdvjLPT6NaJgoQ4fKg/EVSomo2/y/oEB6Vi4fpQ4uc8RInESh232elfJDr9ZeofnwXgEs+LUXd8pW95ID71ilPJjF575Jqs7Z6S1k7b9y13gnFj/isZyH/lOzvJWpzwlvJoSxaWSrgc7ZWZT+rTwGjhrzw8rVhI5sSqn9POVerDBFPWq4lsitec9znGoLkO2CxMJbjXdcBAJYI90xzJdsNA/hj33quozRgZ7cvP/3GtEB02AaoxUeFM30vvJhl3cNPUNwjGOSHLLDXcsCuRLq5l0Dg1nLJYEE7VxLvALhaXpDTBaeF0b7NkNST49O24DoaxQVjhL8m2bWE9IrZ20sGkv9YRnFz9mRsygBcflywR7IXNI9ZecTRvI5+ATx0DO76oq+2tHBtKk/jghZMPpKvMOK/b x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3868.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(136003)(366004)(376002)(396003)(39860400002)(1800799009)(186009)(451199024)(6506007)(53546011)(7696005)(9686003)(71200400001)(83380400001)(26005)(2906002)(8676002)(76116006)(316002)(66946007)(66446008)(64756008)(66476007)(6636002)(5660300002)(110136005)(8936002)(52536014)(41300700001)(66556008)(4326008)(86362001)(82960400001)(55016003)(33656002)(38100700002)(38070700005)(122000001)(478600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?5D4Ri+6Ybe20M2Dq22EsmropWmqzr8X66tWNW+F3ZvTBlEusX6WZxOyYrpjd?= =?us-ascii?Q?S1qnTUsV0Q/yTYidBSiQS06Jeegh/pIkGG+HFsB/EfBjdqUPxiiPZxHxuOwC?= =?us-ascii?Q?ENO3/4kZ6b3n/YQw5dNqntDF5Nwc14N61+VRMlNuk8wSzLFS2d0EiaBpWJPL?= =?us-ascii?Q?WGjaEDYYMavUVjSDty9K+jwwmPz9o2BGUKsEs7yXG+J8h3oZxHWtZYTHAjHE?= =?us-ascii?Q?SlcRhg9VUif65sjIbrGqPxoc1ORVq/7yG5pjtuRr3p/65z/r15Dt5NF78/S5?= =?us-ascii?Q?mlP5yy+TVnPClFN/R35c8pSVz6Yq7jvyKcSNVCWqkrUA2o5xt4j6YvlyLNoz?= =?us-ascii?Q?XCNf1/fM0pPc9kx2y9Em2Go3W2ZeBj005uyFd4SjzoDVtd4pqeZxOQMlRepW?= =?us-ascii?Q?j+hI03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jdtzItUHkB?= =?us-ascii?Q?/cIbn1qOwD0WkHK3YepemXczY630zqgvoC36sKxoYqfayIvAtskAGat3rFpG?= =?us-ascii?Q?kES+gA/BL6/4Q27NVRcbFUpr3kQl9dTGj0cVQzwAx5+1a7Grs4P/4gMINsVy?= =?us-ascii?Q?jJ0aOf2hWfqwyz7PdcOTVR49UwRYi13inrTFOkNSbee0dH5+qA40uZhlauw7?= =?us-ascii?Q?cD5IR31QYulU9Z4X5KJxmVITXkCv8qKS2gFoFCw7nzT0qatTACIr7rDsEcei?= =?us-ascii?Q?W5xbHYGlkjSzHuhaVzt302EmJVV+CL8Hf/3KZRHl4dAi7AcvENNCFeH/6q5o?= =?us-ascii?Q?aw=3D=3D?= 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: DM6PR11MB3868.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 422a4e41-15de-4474-be48-08dbb9d5afb7 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Sep 2023 12:32:42.9711 (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: ORRCk/Ma8RpCObbTiJDTArcPf3VZS8muzdCSCjl2Ktwi7jzTtEVKKAKSmkFmmf/nT0+NJr4pLnXSdT+YImxCMUAQ4RqlzAKRtiKxRMUVrVE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB6223 X-OriginatorOrg: intel.com X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org > -----Original Message----- > From: Rahul Bhansali > Sent: Monday, September 18, 2023 1:56 PM > To: dev@dpdk.org; Naga Harish K, S V ; Jerin > Jacob ; Kundapura, Ganapati > > Cc: Rahul Bhansali ; stable@dpdk.org > Subject: [PATCH] eventdev/eth_rx: fix timestamp field register in mbuf >=20 > For eventdev internal port, timestamp dynamic field registration in mbuf = is not > required as that will be done from net device. > For SW eventdev, Rx timestamp field registration will be done during Rx q= ueue > add operation as per device capabilities and offload configuration. >=20 > Fixes: 83ab470d1259 ("eventdev/eth_rx: use timestamp as dynamic mbuf > field") > Cc: stable@dpdk.org >=20 > Signed-off-by: Rahul Bhansali > --- > lib/eventdev/rte_event_eth_rx_adapter.c | 19 ++++++++++++------- > 1 file changed, 12 insertions(+), 7 deletions(-) >=20 > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c > b/lib/eventdev/rte_event_eth_rx_adapter.c > index 3ebfa5366d..5a5fade466 100644 > --- a/lib/eventdev/rte_event_eth_rx_adapter.c > +++ b/lib/eventdev/rte_event_eth_rx_adapter.c > @@ -2472,13 +2472,6 @@ rxa_create(uint8_t id, uint8_t dev_id, > if (conf_cb =3D=3D rxa_default_conf_cb) > rx_adapter->default_cb_arg =3D 1; >=20 > - if (rte_mbuf_dyn_rx_timestamp_register( > - &event_eth_rx_timestamp_dynfield_offset, > - &event_eth_rx_timestamp_dynflag) !=3D 0) { > - RTE_EDEV_LOG_ERR("Error registering timestamp field in > mbuf\n"); > - return -rte_errno; > - } > - > rte_eventdev_trace_eth_rx_adapter_create(id, dev_id, conf_cb, > conf_arg); > return 0; > @@ -2738,6 +2731,7 @@ rte_event_eth_rx_adapter_queue_add(uint8_t id, > 1); > } > } else { > + uint64_t dev_offloads; > rte_spinlock_lock(&rx_adapter->rx_lock); > dev_info->internal_event_port =3D 0; > ret =3D rxa_init_service(rx_adapter, id); @@ -2749,6 +2743,17 > @@ rte_event_eth_rx_adapter_queue_add(uint8_t id, > rxa_sw_adapter_queue_count(rx_adapter)); > } > rte_spinlock_unlock(&rx_adapter->rx_lock); > + > + dev_offloads =3D dev_info->dev->data- > >dev_conf.rxmode.offloads; This is a one-time operation and need not happen for every queue_add. Move this registration to "rxa_init_service()" function which executes only= once for creating rte_service. Also, no need to check for offload capabilities and directly do the registr= ation inside Rxa_init_service as done before in rxa_create. Mbuf field is global to the entire application and need not be done based o= n ethdev offload capabilities. > + if (dev_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) { > + if (rte_mbuf_dyn_rx_timestamp_register( > + > &event_eth_rx_timestamp_dynfield_offset, > + > &event_eth_rx_timestamp_dynflag) !=3D 0) { > + RTE_EDEV_LOG_ERR("Error registering > timestamp field in mbuf\n"); > + return -rte_errno; > + } > + } > + > } >=20 > rte_eventdev_trace_eth_rx_adapter_queue_add(id, eth_dev_id, > -- > 2.25.1