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 BD46441BB6; Fri, 3 Feb 2023 04:23:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5A8404014F; Fri, 3 Feb 2023 04:23:00 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id E8FD140141 for ; Fri, 3 Feb 2023 04:22:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675394578; x=1706930578; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=t+cVIS+kPdDm1y33OYO87AsDc3yi1vEo1CeUfTsE5Io=; b=BptTuSG1OZ9HNgTu8Fk1BiTdJdPJEyAwLkEubRkOVSV15z09Hd0jUJon DP75Ef4le+6ecvyrNIj6pRBq7m0UKQ01fOpHxIvAY+c/kwfxizEkbdjcw d59umRfBH8lvxkwBusZqM6EQMnqNcFcTjoRuhYD6tV8uHhrLp7crsT8LL lnIhDqCclGOdjq1AcqPPJMEkOKTYlTSj+GNqzuj1t7pd8LMQ8ix7CKymU CFZcb8fZdcNbpRAcGBVfrxs+dONfK0ZZYuPqN7E/MSLPsZ0ib62c/gUUo T2jd2r4LaB8IW5lMoOnVFipz8RjOXC8YvjJ6ndskCc/0f+q3pgjrJMB5l Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10609"; a="328661091" X-IronPort-AV: E=Sophos;i="5.97,269,1669104000"; d="scan'208";a="328661091" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2023 19:22:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10609"; a="994362792" X-IronPort-AV: E=Sophos;i="5.97,269,1669104000"; d="scan'208";a="994362792" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga005.fm.intel.com with ESMTP; 02 Feb 2023 19:22:56 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 2 Feb 2023 19:22:56 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.16 via Frontend Transport; Thu, 2 Feb 2023 19:22:56 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.106) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Thu, 2 Feb 2023 19:22:56 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z2RqR56x/Obdp75lQ0Ja5rxZKrIRiQie1FenpjmORzRjEOJ0a2znySUl4jYT+OKj2fgCMZlULTW7VlecAWapAWJkxvRqUmg9NMOlvhj7TBAIm2UR75HGZ/qBY63pl5QPEWYdjn05PDY9ZhmXEHjmqoj+hKg4YXtGBF2TtmxJ6CHyhSCCNvvUJWAaZ5zoDeyo/fTeQ7ztnTQW1SINAdNT2zyGm4jVFIbXx2xR9ukAW4SfapNX2g6PmUhbQlWy5Znc5TKMDPzDdsUvRwJ5vOYiSiP2sOXDgwcTg4VLQvh0LxGCcYJ801gGmuKwUFnC+Z/o19nReDdQtkvH4e39IodFMA== 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=9JyzDe+o41eF70IgOiaTXZPiDLfh/GlAg7xpIf7V6EY=; b=gaiSbXXlh5mXNGvauSE+FX0yIcOG/n16pTQbg4jEhZh1zViauPm5dz8IssmlP3Z1mYCIR5/N7S5VZxcR+S8hSgCsa5Tc3qMHxF8/Thmlji+AMFVyaPpzjjHGOdfbu+yWl5r0Re3MB/HaJX/UMEU5DV40CaOvJvCvTEhOCf/JPeB7LAbn9AUXuERXWZrnmVnJTb55+EbQqUyxRJCzmcg0/eQr+WX5T98ZNc6OcxGGVC7wik94R9hwr1101WP/6/5jipGMBfsYtr38GXqY0gSDbxwU8GBThJ6cYq1NJ//qQcSFOVhcp4dZhEB9NOsHdlWMzrhAEJgGwykF2uSLV/2twg== 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 PH7PR11MB5960.namprd11.prod.outlook.com (2603:10b6:510:1e3::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.27; Fri, 3 Feb 2023 03:22:54 +0000 Received: from SA1PR11MB6613.namprd11.prod.outlook.com ([fe80::ab30:b5db:8ea4:6eac]) by SA1PR11MB6613.namprd11.prod.outlook.com ([fe80::ab30:b5db:8ea4:6eac%9]) with mapi id 15.20.6064.027; Fri, 3 Feb 2023 03:22:54 +0000 From: "Su, Simei" To: Stephen Hemminger CC: "Zhang, Qi Z" , "Guo, Junfeng" , "dev@dpdk.org" , "Wu, Wenjun1" Subject: RE: [PATCH v3 2/2] net/igc: enable launch time offloading Thread-Topic: [PATCH v3 2/2] net/igc: enable launch time offloading Thread-Index: AQHZNtalCbSPyGdA5EW+3vcfKg6wXa68X8UAgAAqwDA= Date: Fri, 3 Feb 2023 03:22:54 +0000 Message-ID: References: <20230201073014.431924-1-simei.su@intel.com> <20230202071801.30576-1-simei.su@intel.com> <20230202071801.30576-3-simei.su@intel.com> <20230202163032.5e83a648@hermes.local> In-Reply-To: <20230202163032.5e83a648@hermes.local> 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_|PH7PR11MB5960:EE_ x-ms-office365-filtering-correlation-id: 9a2093bc-4e75-4997-2b0f-08db0595f040 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: AhbHm9r29ENLBrAVOI4CSTwtc85Rx07gD5RjpI/FLeh1jFeLTzN0tt/AMR/v6FAwiyFDf5T082LNoB4IqfoGOl+kd5mSY+wnKlw2hMeG5dWxo42srt5slS3of11zvIdbLaXMqo9MoNXtPbfW7UdTONkXU1iwi0j6MxntOVXcgw4f5A8o2fBCyJLKzBqnIJw2EgSXOPCdxMs8pKfxjH28cGTojtILIIkKtt7aD7WF/ust/l1KWQavTOVDdKcKMEh/+dYFyPDFV4M6xQvn41lPvj5p6j/R5vaB30w+TfkV9Bavl5MnIvuTt7LWQkEA8ODPrQj7r4hs9ghr38rQLg7+mZPIQsb03U4RVXlqBoUtJvHutsWT1kUinbytHD6m3Ph3SZadVXjY6jHRQcwtTs50DWY6PBFTUDe3v75c4b9a0GdTa2vg2nvxG9wDNe8hWfTqzE3zEA3NNAAO9A3enWO4IilrFTC8jSpnqya5cDGtUUn2RXVPcWLFJWb/eeD49omkBhtJEA8EemrS6Cq4Qkk+rQpmLqL0wDxlWAN/kk1IhLWcj3fedQGqYoEHwsGOJsPpY1rlClHD/YP7S2bJ9f4SSw/rCG8ewMG1Q/6Ea4GBzX/1RD7ylTHMURovr/UqcqU5eJ3uWUiNxM+BGaHqIjWNyCsHEaO81J8ntXAg+WVHE+8inALoY1KQj14Jfk/hAyQMmdq2bsL+IYTIZZU7EtLqcg== 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:(13230025)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199018)(76116006)(66946007)(66476007)(82960400001)(4326008)(64756008)(66446008)(83380400001)(8676002)(38100700002)(6916009)(54906003)(122000001)(316002)(6506007)(186003)(9686003)(71200400001)(5660300002)(478600001)(107886003)(33656002)(86362001)(41300700001)(66556008)(38070700005)(55016003)(8936002)(53546011)(52536014)(7696005)(2906002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?fxOS/E00ZN/37IXD90T9N7y5UUCqJ/HNyT3IoYXL8a8DFeXaQ3bAmgow1Wet?= =?us-ascii?Q?7NHCEa+Fdk1lnrPe8JRSJBCYz0FWHbxkfsqvoivMSq34J/qvn3Dg44KZ9nrh?= =?us-ascii?Q?xNmxMd2k/Twi3DTSPvx10Xc9KKf0i4iVdbTmibrNbTC3WWJpN3iW4rKPXIhK?= =?us-ascii?Q?eiOhVQ6zqShprMYvjq96RJNnAKbnQWON3O/RyO3sFn8yndztpCAqbhWRrCPK?= =?us-ascii?Q?qids/AVZeRuiMCgoP0A+4Il8MmJ/4kyoJE0oAccBdpc/92j/gxoket6hVR/d?= =?us-ascii?Q?rGh48WaVIxRcIENtOFU3q+XmjhzlVmXQVvi5xabngd/yoVTI0+3eNmmMb9hS?= =?us-ascii?Q?H2IVaQ1kddUsG9Ht49bVlzbj9a6xeF4hc9OzllKEZJF7HwRRWtWrCAG4YM6O?= =?us-ascii?Q?PXj0iRZPFvQUnlnAU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jTySslwnYC?= =?us-ascii?Q?n3MG+HwrzOXWH/Utrx3pmgVwKSbcDUUd5EUP6RR3XlUzHWfJ9oQPFV6WcWbY?= =?us-ascii?Q?H5mS7VFvzt1f7crt0jrdNrND8IAkXjsRgKQYvv5Q1uJgd8U0S6HusuieN1dk?= =?us-ascii?Q?d9EacaGo38Lt2WAiglN9Ox5J830Qtx00g4nfsfngqKjeDHauVeBLOLFCRai0?= =?us-ascii?Q?Tb570S+3sMYremzQgQPniK1ikVvRnUYNxuFWcgQwdceee9sgCiIGpaQyoOgE?= =?us-ascii?Q?FDLw3OWqRQ7Mg6C3fV5G836TQcv7vQ6fj51vZatpwh1Bd1ma/msDmiuxcjNi?= =?us-ascii?Q?BhA10FFWcX3beDvHmqc5GLgUHtESVGMLkjeiEHugm8rV?= 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: 9a2093bc-4e75-4997-2b0f-08db0595f040 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Feb 2023 03:22:54.1748 (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: VWx8Mlr5LZXeX6gmt07VcAGalBUpouAvWihSgHNyw1ryMi3SY615PqekG55uNwUipJuIoRz6srUqHGYEeKj0qw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB5960 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 Stephen, > -----Original Message----- > From: Stephen Hemminger > Sent: Friday, February 3, 2023 8:31 AM > To: Su, Simei > Cc: Zhang, Qi Z ; Guo, Junfeng > ; dev@dpdk.org; Wu, Wenjun1 > > Subject: Re: [PATCH v3 2/2] net/igc: enable launch time offloading >=20 > On Thu, 2 Feb 2023 15:18:01 +0800 > Simei Su wrote: >=20 > > > > +static uint32_t igc_tx_launchtime(uint64_t txtime, uint16_t port_id) > > +{ > > + struct rte_eth_dev *dev =3D &rte_eth_devices[port_id]; > > + struct igc_adapter *adapter =3D IGC_DEV_PRIVATE(dev); > > + uint64_t base_time =3D adapter->base_time; > > + uint64_t cycle_time =3D adapter->cycle_time; > > + uint32_t launchtime; > > + > > + launchtime =3D (txtime - base_time) % cycle_time; > > + > > + return rte_cpu_to_le_32(launchtime); } >=20 >=20 > Divide in transmit path will slow things down. > Better to use something like rte_reciprocal_divide_64() to avoid slow 64 = bit > divide. Thanks for your comments. The performance won't be affected if the launchtime function is turned off. If the function is turned on, it indeed doesn't need high performance based= on the function. Thanks, Simei