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 C318D43797; Tue, 26 Dec 2023 10:34:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 42F12402D1; Tue, 26 Dec 2023 10:34:07 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id C33BC402D0 for ; Tue, 26 Dec 2023 10:34:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703583245; x=1735119245; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=l+rmQrp+qtYxwGUfz2viMmnzUweBcuSEI1bNhHlcJMc=; b=cHbdCZPODA5zWfaP41wKgO8nob5kK9aDlYH0z94NLElotKM3RUbg6Kz6 3ZdswhzsQn4/AluTEsxh+5tRbA/BTCOIBuFW0a5z5XIiS9UtJ8R8anH5G hEGD14QfwgwiZFGtl6vbbiavmICBgbYRxUZk+3w79hFn1NRxy4brw7fTJ Jd0KfG0dPHBuL/l3mU21+fcaBOotsy5bcMC2uTkbgXHA77OxYpztlKzL8 CBwLC0pFhvEv2fGBfs2UKs9eCP00TKf4EP9jeKAvwgTI5WZfYL83r76Zx 2nRrnSdapzO8HKLLbMIk1AHEthwUO1jVMHeRby95VOvUv1hFJd0XzDE0W Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="427505215" X-IronPort-AV: E=Sophos;i="6.04,306,1695711600"; d="scan'208";a="427505215" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Dec 2023 01:34:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10934"; a="754140569" X-IronPort-AV: E=Sophos;i="6.04,306,1695711600"; d="scan'208";a="754140569" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga006.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 26 Dec 2023 01:34:03 -0800 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.35; Tue, 26 Dec 2023 01:34:03 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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.35; Tue, 26 Dec 2023 01:34:03 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Tue, 26 Dec 2023 01:34:03 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.169) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 26 Dec 2023 01:34:02 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m+z2tN231DK+pSaDdAwL+ZiXJaBPL3/T7vHE3NBdecU7I4zsJYSQ/sD8iN/Ljz11G3BQS7yHcBc+YVWD3YzMSmoedIOPaU8DjEPkF/LaXAz8J1wFTZejHG4bAyNMik1GJEXNHNVFRMicUifzTWvRmJ2RurpZWnen09XpTF3O5V9nJS+HRj7Cw5/VwfkciOcQArE7r+71g6hQF5w4Vis8mqvB/Cmbvb2rzyATMdtlVmB89IKEbROIFTjTDdDfM/9mS29ffHstcZSFySO474LlobomlytX9DKbkxDzFau6EmpRvP7DHw7Tw/WA/KWe5U1GtMXnXWNyHlYyR0fU/z+hrQ== 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=GOmK7w3OjzxLu9FmGzPaFQGg8PQikzlF8HIK3iGczr8=; b=D5GMg4Kvt2MnK+iWlC/l/RKG2TGN37swqKAFGeDu//9sSBILtKxG6mS3CXkT01FrgaKDIfi7CcM31Kx3599W4dYrcfCoqWAUBvFAaqNT05jiCFgvMHNb/XRH59FPzPQcRNFcWl3lz5ZnMIx7EpQ02YjKLLHYrMCERb+S3+hWgSFCUnPMMKBHxkmH95vkd0OvW36963J7yNX6sUn12HI3aZ8Du6fvNliUJXVttiD0R0XAhg+wG3fDOOVd48mw57iXx7MNLYIv3GNJDA1ezk5DPnBUOLN1ItJ2gGGDijIIv2y/3FfGR0+hf1HRl38vFqScHiNlyoR3eDVT+xJAn3kcSw== 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 SA1PR11MB6613.namprd11.prod.outlook.com (2603:10b6:806:254::9) by CY8PR11MB7009.namprd11.prod.outlook.com (2603:10b6:930:57::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.27; Tue, 26 Dec 2023 09:33:59 +0000 Received: from SA1PR11MB6613.namprd11.prod.outlook.com ([fe80::a2fb:a414:62ba:bfbb]) by SA1PR11MB6613.namprd11.prod.outlook.com ([fe80::a2fb:a414:62ba:bfbb%4]) with mapi id 15.20.7113.026; Tue, 26 Dec 2023 09:33:59 +0000 From: "Su, Simei" To: Chuanyu Xue CC: "Xing, Beilei" , "dev@dpdk.org" , "Zhang, Qi Z" , "Lu, Wenzhuo" Subject: RE: [PATCH] net/e1000: support launchtime feature Thread-Topic: [PATCH] net/e1000: support launchtime feature Thread-Index: AQHaMSa05jg+eXAv1UiAlNWb6QLwv7CxppGQgAL+FgCABKkUsA== Date: Tue, 26 Dec 2023 09:33:59 +0000 Message-ID: References: <20231222030346.12805-1-chuanyu.xue@uconn.edu> In-Reply-To: <20231222030346.12805-1-chuanyu.xue@uconn.edu> Accept-Language: zh-CN, 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: SA1PR11MB6613:EE_|CY8PR11MB7009:EE_ x-ms-office365-filtering-correlation-id: b475435a-71f0-497a-62a4-08dc05f5ca45 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Eh2tOn8jngygfZuqaKhoPvhKAgHJJ1DHBMef+Fn7GQKlRm5aBwAuVNQVcwUHJU9wWiPmjlgtafneQAXnNb4ZGBgiaseT0a/jkpoMhuyp05o/us5PA1yX2z4UPFWbZVOEzu71fw75CXv9tlmFff456yXXvR05ixbn2nWvQg7OadDkDREraUx2eMvtZL1QK7ixlQAvq9tcHtSzIxk3a7BT0Vn+bJSACNqyJ8DB1djVJClzxl2nhYZ0VrudIBuin6bgCIHMTPsWnUKzohLA8QUYpHn5fQoFs8l6nD9H4P+96nA+JA6AE7WmAOoigjBD0Tlo/LIkFgB+LktJNlODFY3imK/H3sVdxBawXQVNSJSqDR/ZhNfvSvVEojzYKoCgtkszbyVvxrF3UmQSonQ5GlywPxOAzB3Uyw9rgMb3LpCUISWqoPOcdbpCTlI9o8/+BLZcR2upOT3kNbBDvJXC5q/FpaCIqupWCtAyu3vS2OCCNxbhggm23G2s24bnYG/V5vVyQvnKzDC3dIKoW81Q59fVQLHqJteoBPcOqBt2he5Qcen0FDqZh+z3kjCz2ocrV+r3LMvVLQcbbcuiJDtDaU6ItL+G4u7Mhzflij4kQ1DsOC+ROVzREGKZAlQ8H4Z43Onr x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA1PR11MB6613.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(366004)(396003)(136003)(346002)(39860400002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(83380400001)(41300700001)(38100700002)(26005)(107886003)(122000001)(82960400001)(316002)(4326008)(54906003)(52536014)(296002)(8676002)(2906002)(5660300002)(478600001)(8936002)(71200400001)(53546011)(6506007)(7696005)(64756008)(66446008)(66476007)(66556008)(66946007)(76116006)(6916009)(9686003)(86362001)(38070700009)(33656002)(55016003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?xMhOy77nKY7FF0GlHyfWOwgqWGQFBNdIkS2naVL8ZlgMVTJXFd7FdWOrGnBK?= =?us-ascii?Q?G+QSz/EL9ryau2IAsfVuGztxr6lctsCgne34SnUqNh6rVY1PqyyT80YEOXax?= =?us-ascii?Q?d0tza7r8lMkExPz5ziNjE010U7f6C9tgmsydB3WmxRUVFzdxLDNiQBlAI0VH?= =?us-ascii?Q?SRPYGJPLeE4qwRvkQWPodJGnfl/1jbcZKIiNuAHDffyabwvHzfk8IExi+u70?= =?us-ascii?Q?8eKAQareGm8lNomU3vvyoksdGWVWKVmJHhqLrUGx6wIYnIr2mAO2mpJ/17pq?= =?us-ascii?Q?BZrBH9BZaIDgKufJcgzbOpBbV4IcWQwiNsRvhKtdzRFDYNOIf6Q1baLhLgHH?= =?us-ascii?Q?qdGevzJ+pCdRApT/foaLxHOzZneomMvFDlNqcBGAZ4Uc9+c3Segp1v7u6jQP?= =?us-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Iiqs10wN7gk6UKxRbXYknLslK8?= =?us-ascii?Q?wA5Fnzd8QhiGW57d3By1z+m3w0rUAmSONmqg8X3NlCiKarWkSBEv+zqGk1Dw?= =?us-ascii?Q?UM2Q74WO110mGCxq+gzb2HtHcH3PCChVsk18n13zTY1a/l2siBIgkNLQSpJ/?= =?us-ascii?Q?QU/7I8+VSpFTNwmW8WlnEB+QbzG0yXXZi20+oDKC6+FiXp5gJommFx0Xdqds?= =?us-ascii?Q?okHxuaKGOVfNuQsKWPJx+fjVHWTbuUiJORK83ZfAKgZY2lRYCoWfbmGqCLfi?= =?us-ascii?Q?Tug8CFzqczjODCnr6qU=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: SA1PR11MB6613.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b475435a-71f0-497a-62a4-08dc05f5ca45 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Dec 2023 09:33:59.8370 (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: B9LDyihVOwthx/5wbh5YufkMB2C2e7FlvWXrYJNuN6Q09jKCr6OA+EKkcLIQ2x/C2AzuXu9DRuiTIChE5eZmfA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR11MB7009 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Hi Chuanyu, > -----Original Message----- > From: Chuanyu Xue > Sent: Friday, December 22, 2023 11:04 AM > To: Su, Simei > Cc: Xing, Beilei ; chuanyu.xue@uconn.edu; > dev@dpdk.org; Zhang, Qi Z ; Lu, Wenzhuo > > Subject: RE: [PATCH] net/e1000: support launchtime feature >=20 > Hi Simei, > Thank you so much for your review. >=20 > >> > >> /* QAV Tx mode control register */ > >> #define E1000_I210_TQAVCTRL 0x3570 > >> +#define E1000_I210_LAUNCH_OS0 0x3578 > > > >What does this register mean? > > >=20 > "LAUNCH_OS0" is defined as LaunchOffset register, which sets the base tim= e > for launchtime. Based on i210 datasheet V3.7 Sec 7.2.2.2.3, the actual la= unch > time is computed as 32 * (LaunchOffset + LaunchTime). In this context, th= e > register is used to set the LaunchOffset later as 0. OK, got it. Thanks for your explanation. >=20 > >> > >> + if (igb_tx_timestamp_dynflag > 0) { > >> + tqavctrl =3D E1000_READ_REG(hw, E1000_I210_TQAVCTRL); > >> + tqavctrl |=3D E1000_TQAVCTRL_MODE; > >> + tqavctrl |=3D E1000_TQAVCTRL_FETCH_ARB; /* Fetch the queue most > >> empty, no Round Robin*/ > >> + tqavctrl |=3D E1000_TQAVCTRL_LAUNCH_TIMER_ENABLE; /* Enable > >> launch time */ > > > > In kernel driver, "E1000_TQAVCTRL_DATATRANTIM (BIT(9))" and > > "E1000_TQAVCTRL_FETCHTIME_DELTA (0xFFFF << 16)" are set, does it have > > some other intention here? >=20 > "E1000_TQAVCTRL_DATATRANTIM" is same as > "E1000_TQAVCTRL_LAUNCH_TIMER_ENABLE" Yes, these two values are the same. >=20 > "E1000_TQAVCTRL_FETCHTIME_DELTA" maximizes the data fetch time. > If "E1000_TQAVCTRL_FETCH_ARB" is set, there is no need to set this field, > because the arbitrary fetching prioritizes the most empty queue, regardle= ss of > the fetch time. (referring Sec 7.2.7.5) >=20 > I have also tested aligning with the kernel driver settings using (0xFFFF= << 16) > and omitting 'E1000_TQAVCTRL_FETCH_ARB', the launchtime feature also > worked as expected. However, the arbitrary fetch mode seems more suitable > as DPDK lacks an interface to set fetch delay, unlike in the kernel which= can be > configured (e.g., through 'Delta' in ETF Qdisc). Any suggestions here? Yes, it doesn't have an interface to set delay in DPDK. I agree with your a= pproach. >=20 > >> +static int > >> +eth_igb_read_clock(__rte_unused struct rte_eth_dev *dev, uint64_t > >> +*clock) { > >> + uint64_t systime_cycles; > >> + struct e1000_adapter *adapter =3D dev->data->dev_private; > >> + > >> + systime_cycles =3D igb_read_systime_cyclecounter(dev); > >> + uint64_t ns =3D rte_timecounter_update(&adapter->systime_tc, > >> systime_cycles); > > > >Do you also run "ptp timesync" when testing this launchtime feature? > > >=20 > I used `rte_eth_timesync_enable` function during the test. I am not famil= iar > with the `ptp timesync` in DPDK. If you are referring to something else, = could > you please guide me on how to test it? Do you use your own application or DPDK application to test this launchtime= feature, for example, dpdk testpmd? >=20 > >> > >> +/* Macro to compensate latency in launch time offloading*/ > >> +#define E1000_I210_LT_LATENCY 0x41F9 > > > >What does this value depend on? > > >=20 > Through my test, I observed a constant latency between the launchtime and > the actual Tx time measured by the `rte_eth_timesync_read_tx_timestamp` > function. > I didn't find a description of this latency in the datasheet. >=20 > In my test, the latency appears to be relative to the data rate, and inde= pendent > from the packet size and throughput. The latency slightly changed in diff= erent > experiments, but in each experiment, it remained constant for all the Tx > packets. OK, got it. > I also tested this latency consistently on two different NICs (I210 GE-1T= -X1, > I210 X1-V2). >=20 > Here are some measurement results (in ns): >=20 > +-----------+---------------+---------------+---------------+------------= ---+---------------+ > | Data Rate | Measurement 1 | Measurement 2 | Measurement 3 | > | Measurement 4 | Measurement 5 | > +-----------+---------------+---------------+---------------+------------= ---+---------------+ > | 10M | 14400 | 14544 | 14384 | > 14896 | 14336 | > +-----------+---------------+---------------+---------------+------------= ---+---------------+ > | 100M | 31016 | 31016 | 31000 | > 31000 | 31048 | > +-----------+---------------+---------------+---------------+------------= ---+---------------+ > | 1G | 16880 | 16880 | 16880 | 16880 > | 16880 | > +-----------+---------------+---------------+---------------+------------= ---+---------------+ >=20 > Any suggestions here? Is it supposed to be embedded directly here or left= to > the application level to compensate? I can fix it accordingly. I think it can be put here directly just as you do. Thanks, Simei >=20 > - Chuanyu