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 19202A00BE; Fri, 11 Feb 2022 03:33:16 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AA73A41141; Fri, 11 Feb 2022 03:33:15 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id E8334410E5 for ; Fri, 11 Feb 2022 03:33:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644546794; x=1676082794; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Co9k8VRMaOUgDSpgIYoyzujNXa6iBfr9zLUBcgEMY68=; b=W3Kg8fKQ6/5hec1K4JhutbUgmdeIXSWlNk+GcVQ4fE24BBRhGhG0BlRO llrYwDp7/+6YPQPZhmRCLgfxdu1G+azjxI4LkpK2m8sbv7XJxleUz2g1E /mxgNHGFZr5P7P/qzOxoq6VoYQTPfg0Sn4CTTgZIkLb/XzFx/J6RasIyx uNF+Q7Wepx1X2rgPDlk1rcZyiLTJyIpff/rcJBDc1fw5EMaCPb1k7cocK YmJ1AnYj4FzbkVE+BeR1Hxfs+1F7q5sG2/n3pp2GgdQ7YVK47tNusOzG8 /nicISRRk3JmY0jLGMn2hftW99/JCxURgvpbaq4G5KX1/BhP0EK97yX7u w==; X-IronPort-AV: E=McAfee;i="6200,9189,10254"; a="249589840" X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="249589840" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 18:33:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="679372919" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga001.fm.intel.com with ESMTP; 10 Feb 2022 18:33:12 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 10 Feb 2022 18:33:12 -0800 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 10 Feb 2022 18:33:11 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Thu, 10 Feb 2022 18:33:11 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.168) 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.2308.20; Thu, 10 Feb 2022 18:33:11 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QfawtYCasojtusuYPqZ2QrnR+dWBnCJq27SkoahBhY8B38gfCydCsDZLf/NV9GcqwAU6paJ/tTtzeFd6C6X3we2B+EwXEfjSdgB+TXYrkV1soHkFWyxltDXv0z0X1+GqigYMmeArv2+M1aUG93nhhGILrCxy+VRjsSjbbCHWkBCKpZmjBiNgPpx5q4bsoHMS9/EePktFGUAknmDyZZeNm9sPCsgsv+MDnPyj6gQiTCHxvb++Ap+3VGWuqAskFyw7yHGirAFSYMH2bVisbDEtiKso5CY1R+s1a7awjGDtRZU7Lq8VrDvsgXXCMJ7AzH8ciMPk1ykDYiCyR25BdsZMYA== 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=WuLdPlHYv5cr7FlFSgjaAoEPqOt9+0SgPlhfVdZaM4Y=; b=dBUp6ehtBv0SRfyxWcCUcWZmelkKHc7BU0bl/FEUZlXgO13wINZOtqIS6XiWVyFgJGY6a2y3FKSGABuXhuduv3r3z6xVf4X6wPBO+8DMKB89gQLhPoTY3iPOOGZKLbHuoUt4KvDL/yEUZ9arlizVFqQXTMLQyy2//yYwiwS/i+xCfD09heUCeJGBwqheUkrz2KcG6Hg5xUBwE8QCYQfYpGaiw+d/JesBKLAoalPXGPIY8cMdgxmr0QufQ+cszgi2kB7VrInDKbiVOEbiumojLcIggMy0/Gg66mtoxrl1Cm/1e8PrkB28B8pQyw5OCiILkRTADgBY6mC+ye+uOzDTfA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DM6PR11MB3098.namprd11.prod.outlook.com (2603:10b6:5:70::11) by BN7PR11MB2819.namprd11.prod.outlook.com (2603:10b6:406:b4::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Fri, 11 Feb 2022 02:33:07 +0000 Received: from DM6PR11MB3098.namprd11.prod.outlook.com ([fe80::4c15:87ef:5338:e0fa]) by DM6PR11MB3098.namprd11.prod.outlook.com ([fe80::4c15:87ef:5338:e0fa%4]) with mapi id 15.20.4951.019; Fri, 11 Feb 2022 02:33:07 +0000 From: "Xing, Beilei" To: Honnappa Nagarahalli , "dev@dpdk.org" CC: Feifei Wang , Ruifeng Wang , "Yigit, Ferruh" , "Richardson, Bruce" , nd , nd Subject: RE: Questions on i40e TX path Thread-Topic: Questions on i40e TX path Thread-Index: AdgdbGSND9JeH63pReG8SPoILQbVuQAGlTqgACAk5lAAOdATkA== Date: Fri, 11 Feb 2022 02:33:07 +0000 Message-ID: References: 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-office365-filtering-correlation-id: 7e38ee70-3060-4fbb-ecc7-08d9ed06d6ab x-ms-traffictypediagnostic: BN7PR11MB2819:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: S7Y41xCIY/XkvU4n2kgO7AEpb2M/eaf01O8AyztEhtAPlonTzToNeVh99CE9EUHKA+cJQ8yTPvEEiyRx6LTlgF7gwZvVfXc93ViHItsY0w1BN+qytTJns48/YqhloY1YMA53B3r/obbkSUslofN9h9VgO2WLVxq26A/aL4w12t5FeeJdN+H2mOn4C/zAdz5OxWC+GbK3YaRsZighO/n/T+cbNW8dtD/Mi/fvxyenqiUOagPEAUcENm9c9iOP/5aGJ+6Ry34BKY6QG7TBivkhBJFOao49HK2lOchU3FFWxyvOAgzzusgRJ1R06fIi+VHOFarDppyvA34bcXxjRsI7ftWZdxqpbGsGnZN1mkitH+r52kBRCNCJgU2Q1o6baMe1vMVHKF28FCrEgkxiAFbTZp2Zo0CQC2h5wgVEFVW5puwSL5Ug4cglDTmYpWthuIJ2otUOxIgMwVw9j2YoQhc+Ed480RYqtTmTxRif0ne2qEzJITx9VF/v3WJ2mTOZdwfSZ2G9ACRQ7f/u1ACXQlAhwwT2W2SPLfo8zQA4raZXLbJ5UaAzBudSszvWf/DsBXtnnNL8h+HWdQN4+UZV0zH4XxnzeDzWGWQet8SK/6guOOqajHwgrcQVmZKs8DrZlqjLJelcgKsvEOCQeYBApDyD9JNvz/z8Oeiu2kSSfIWeh2ppZiqWmv3+NLSioVH3Ezo3aoya4RQlpbbXWMxESiZFkw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3098.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(6506007)(76116006)(7696005)(8936002)(53546011)(316002)(8676002)(2906002)(4326008)(66946007)(38070700005)(66446008)(66556008)(66476007)(186003)(26005)(71200400001)(64756008)(38100700002)(33656002)(86362001)(52536014)(9686003)(55016003)(122000001)(110136005)(508600001)(54906003)(83380400001)(5660300002)(82960400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?7LKWmzlqt/y+V31OVXl0qYE4gzp6GrcvpJA5fBHSBeppoy3HJFO33C/5Plct?= =?us-ascii?Q?G06j7DuZXHFSD9eI/+iO2wdybLN+6p7j+SfKUcaFjCk3C4MDHOXev0wz5qDt?= =?us-ascii?Q?xzhZg3ettz9yiaRjnvi0qzLCkcrmcult2u0SPEnM7ATX0zOwObyOd8v4qUF+?= =?us-ascii?Q?9qsPdEsz2DG5+JBYiD7nYwo84n3E0RjL5lZCXJvSYgfdyGvBk6UeQFhEkzzw?= =?us-ascii?Q?Keo2NdUhhzlT2GNyQjPfRdGahYmG/mF+kezA+MzY8MdW37h5hFocDTP2gEZT?= =?us-ascii?Q?Gq4I+Y3tiVVNexzbnJ/taaicXfS8MoHBlAv4hRYWLj47PV7S7pCTWlU8JCc8?= =?us-ascii?Q?+EEFV4KZqAKJ4rbQIi2pJXHYciKAq1XFlUbg1qhjKNX18Xkz4qL35ZQ4aOOs?= =?us-ascii?Q?mIPakZScAE5C1ZaLhgxEBBcYcFwBridRx7tLjGH/7OH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w0pNFJwk7n5Mli6k0PgA7OFeyugIamwcj4ICxAVAuF4Zs5e?= =?us-ascii?Q?sTv1SFrlrDeLFgWCTJVywOFGHiJR4LVipVkTQJty+AzlmfY68OgpyGVUBfkZ?= =?us-ascii?Q?NyMUvJ0BY63fSFKWLtsukc7+aJ65hde9bRsa2uWv2pu36T2He1eem9Og6FtF?= =?us-ascii?Q?IgsyS4B7BLc3hVeDS59PV9kCEri4sBbhbnnfnccXaecGl1C5xHKp2rquOFgA?= =?us-ascii?Q?G2sdFA0fdO9LVj4wG19oF7zYho+Nl4c1fvnqz0l2J7kr5XPRcsANSQJXYsgj?= =?us-ascii?Q?dw=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: DM6PR11MB3098.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7e38ee70-3060-4fbb-ecc7-08d9ed06d6ab X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Feb 2022 02:33:07.6032 (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: 2PvK74JCUI3Lale4fE9vIbP84XhbzIv5ft2UE34udXzMAEsOd1/o3Gotpr3GxcxZH/LVOrOVgG7XDqFSV1lLNA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR11MB2819 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 > -----Original Message----- > From: Honnappa Nagarahalli > Sent: Thursday, February 10, 2022 12:38 PM > To: Xing, Beilei ; dev@dpdk.org > Cc: Feifei Wang ; Ruifeng Wang > ; Yigit, Ferruh ; Richardso= n, > Bruce ; nd ; nd > Subject: RE: Questions on i40e TX path >=20 > >=20 > Thank you for your input. Please see few comments inline. >=20 > > > Subject: Questions on i40e TX path > > > > > > Hi Beilei, > > > I want to make sure my understanding of the TX path is correct. > > > Following is my understanding. > > > > > > 1) The RS bit must be set in the TX descriptors to ask the NIC to > > > report back the send status. > > Not for each Tx descriptor. > > According to the datasheet, " The RS flag can be set only on a last > > Transmit Data Descriptor of a packet or last Transmit Data Descriptor > > of a TSO or last Transmit Data Descriptor of a filter." > Yes, understood. > When combined with #2 below, we are asking the NIC to report back the > send/completion status for a set of packets. This allows for amortization= of cost > of reporting over the set of packets. >=20 > > > > > 2) The NIC reports the send completion by setting the DTYPE field to > > > 0xf. This also indicates that all the earlier descriptors are also > > > done sending > > the packets. > > Yes. > > > > > 3) The check "if (txq->nb_tx_free < txq->tx_free_thresh)" is mainly > > > to ensure that we do not check the "descriptor done" status too often= . > > This condition is to ensure there're enough free descriptors for Tx, > > avoid Tx ring full. > Ok. I think this check has another purpose as well, though I am not sure = if it is > intentional. I see that the descriptors are initialized with DTYPE set to= 0xF (in > function i40e_reset_tx_queue). So, in the very first call to transmit fun= ction (for > ex: i40e_xmit_fixed_burst_vec), the 'i40e_tx_free_bufs' function would en= d up > checking the DTYPE field, if the above check was not there. >=20 > In the data sheet, in section 8.4.2.1.1 (transmit data descriptor format)= , the RS > field is described as follows: >=20 > " Report Status. When set, the hardware reports the DMA completion of the > transmit descriptor and its data buffer. Completion is reported by descri= ptor > write back or by head write back as configured by the HEAD_WBEN flag in t= he > transmit context. When it is reported by descriptor write back, the DTYP = field is > set to 0xF and the RS flag is set." >=20 > Considering the last sentence, should the code check for both DTYP field = and RS > field for completion? Currently, the code checks for just the DTYP field = (in the > function i40e_tx_free_bufs). In my understanding, RS bit is set by SW to indicate HW needs to write back= . So I don't think PMD needs to check RS bit. Besides, PMD should have ensured PMD checks DTYPE of the descriptor with RS= bit only. >=20 > > > > > > > > Is my understanding correct? > > > > > > Thank you, > > > Honnappa