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 24B5AA00C2; Thu, 10 Feb 2022 05:38:11 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AA4674013F; Thu, 10 Feb 2022 05:38:10 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2052.outbound.protection.outlook.com [40.107.21.52]) by mails.dpdk.org (Postfix) with ESMTP id 9761540041 for ; Thu, 10 Feb 2022 05:38:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bUlj3gZ8IHqEZE+j9BWrlRwMq/pN7TGnSJ/VBPxn0Bo=; b=dwDwifW/jy8LN7hzA7X8LtO8EcuGSaMXe884WUFRX8EcdKDLDos4dVqzPPcu1YLEEWOhB/uTY3HtqQmiyr26mI5SDuEkFNUQtdg7lqvL+pqwLihx9cJ5a36qIz9DAJmk2E6oC99UlQmP8ABH4x327LRqTDqGV53SGJo4QX1x/Qs= Received: from AM6P194CA0067.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::44) by PAXPR08MB7384.eurprd08.prod.outlook.com (2603:10a6:102:22f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Thu, 10 Feb 2022 04:38:07 +0000 Received: from VE1EUR03FT034.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:84:cafe::77) by AM6P194CA0067.outlook.office365.com (2603:10a6:209:84::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11 via Frontend Transport; Thu, 10 Feb 2022 04:38:07 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT034.mail.protection.outlook.com (10.152.18.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11 via Frontend Transport; Thu, 10 Feb 2022 04:38:07 +0000 Received: ("Tessian outbound 63bb5eb69ee8:v113"); Thu, 10 Feb 2022 04:38:07 +0000 X-CR-MTA-TID: 64aa7808 Received: from 9ff7c3577b68.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A42A1C31-23E2-41A2-B009-3EDBF6D5A1F0.1; Thu, 10 Feb 2022 04:38:00 +0000 Received: from EUR02-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 9ff7c3577b68.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 10 Feb 2022 04:38:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JRVP5bUDDGHdn/Enlpj+GXsHsx2DVplJeWn2zv9sTHvdg9c10pw0a0Q6sz2hLEzzffkVZh9O2NWmwVTBdPNdjZqvvDcd2lFPuW3t/rx+8MvdpvzhuXzFnJIQQbzSAfbNNKGTYWQ19MSGKPwbkefwzS6Ct7AazJmHNLMZJVFnL/M7EMkxF0GoWqSTTIr5vlsajHmHa/+n1VVSvdLIy4qFvmBqp+vFVIbq/DXWnp/gj5vPdC3j5KTb0QuFD8twGkNvwnezfjzD/BQ0O9M5b5lC+U1HmgBJvj8ARUCBAZo9Ap/n+SYX6lb4LMHtZ95O/tauWEXC2vApEYmmZoOdu9tFew== 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=bUlj3gZ8IHqEZE+j9BWrlRwMq/pN7TGnSJ/VBPxn0Bo=; b=R9VaRrbbA+lGZnNH2v7snKcAnTvSwCe9zNLy2zm2adIKZSM1eYRO8cEQmqHVZzjBloMNSHe+W5NnGhDXlrY3XwkylZZb3KkrjWYYDyh9UUuyGgrr6Sb3HLPxEViohifgNN1M23Y223jSgXLrTQWLe0tDGdhQ9WjE+fUJNOuT4jWES8PxjsXFK8cqo8o1Ot/c9mOeivWmBVUenPqknRZ1Z6mTxtTKjUEJqCbYo/Fd1bj0ehOdvKvCcjKr7BmxgJe04mP5HoVxv5Wnsn4J33fcAiSlc1pTkW8y5EKg9JHM8Htdkf4hGafsHlsssL6hhRmJfVfF94N0DqCuME45Bloe/A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bUlj3gZ8IHqEZE+j9BWrlRwMq/pN7TGnSJ/VBPxn0Bo=; b=dwDwifW/jy8LN7hzA7X8LtO8EcuGSaMXe884WUFRX8EcdKDLDos4dVqzPPcu1YLEEWOhB/uTY3HtqQmiyr26mI5SDuEkFNUQtdg7lqvL+pqwLihx9cJ5a36qIz9DAJmk2E6oC99UlQmP8ABH4x327LRqTDqGV53SGJo4QX1x/Qs= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by VE1PR08MB4671.eurprd08.prod.outlook.com (2603:10a6:802:ad::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.17; Thu, 10 Feb 2022 04:37:57 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::6d04:5964:7813:4891]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::6d04:5964:7813:4891%4]) with mapi id 15.20.4951.018; Thu, 10 Feb 2022 04:37:57 +0000 From: Honnappa Nagarahalli To: "Xing, Beilei" , "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: AdgdbGSND9JeH63pReG8SPoILQbVuQAGlTqgACAk5lA= Date: Thu, 10 Feb 2022 04:37:57 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: ADFCE672E622D74390E725AD1C927F50.0 x-checkrecipientchecked: true Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-MS-Office365-Filtering-Correlation-Id: 6c03219d-6ebc-4117-8580-08d9ec4f2283 x-ms-traffictypediagnostic: VE1PR08MB4671:EE_|VE1EUR03FT034:EE_|PAXPR08MB7384:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:10000;OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: CUF08nlvmCGytRuk/RgLeMNfAXgYICnqIMZrvHWWf37y7RmE+7jtUA/lZfUGhiIh526c/53weJizC+kub8oSrkTXGFPpwX99nGrZhjkCy3yIVLuk91u9KwqntA+K/E+XdSBSVUL9WoNIsvNz/jjGZhrW0h5IK5cGjL5CEr+PD1hsjkWlL2BFhcn4B/Yw7gJGtuKaEib5DhOfFWhb2lbOZLDAK1iPxP+OGmp5wM9iIrd7Mrnq0yiY4nW+T4hVKgwZ4ae09W1Gj+A1CVrXcSgWoVk73Twb4OlDrk1A+2CD9tknMN0f8pdkHXkvPg+XXCclfJTpa5EB6PHjEqxvFZGStPS8whq79ssAAXUThapr3d4p51eAqFH0ceAfi72zEbPyG7cqQeRZWgbd5GQz4SwVWQyTo/Su2LGmim8j3ZoTZE04Iv4mCc6XOw/ATLiUfilhoq3wJ3k8OFwFW4dY2bFZGlSh7Uo126yh+981WYQnWZvmwH7z7nYQrRCPkwDwWN1j1bVWacINklpUulfM514poUUr93RJN6MvZhaWvrCVRo6eyAQBbT8ms0gRxveMk/Hzq+5gckAG065CEUf7ElEnnjToZWefYJT6myjLYk5nX14zb9i3YA/GSjdcEiK1fx4RyKPEj8KqGvy2eQmEJ9ana0sV009Y88TZIgXHuTXJ69qWM5tBlGvA6oDaZFPBGS22qR2VJVEz8vwwZt11T1nJQA== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(110136005)(186003)(316002)(76116006)(122000001)(38070700005)(2906002)(66946007)(26005)(508600001)(54906003)(66476007)(86362001)(71200400001)(55016003)(9686003)(52536014)(33656002)(7696005)(6506007)(66556008)(66446008)(64756008)(8936002)(8676002)(4326008)(5660300002)(38100700002); DIR:OUT; SFP:1101; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4671 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT034.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 1b879b07-d5cd-409c-ee70-08d9ec4f1ca9 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1/3xiW+pfBjdYz2Qreb3Suz8hp3lm+yoC8ddyIhYK74ulXyMuIKmGdsoq5ILrM4MJAa2u9rBwvkDLQM4lBoyg7dO6+MGa/ZNmDy24gslnDIcT5yJuryQRHgpIqGqHedOfhIO+eKnT/O7JxW12liSffqEN1jsqI65BVyWhLvz4QpadYNVHZncKLHLecFakzfi7GA7jzBHIstnUCN2dmte2VxiO3cYhkunHqLqYNCXE52zRBkwh+Sbb4j0eW9KBzGRHQEHQH+TWXi6lDhzmj2ibU8S3ybpCYzyAuRYHxWI7zoRqYARobqro1UfYVeSTTahzcSQZ5BE8UOsBc/IfQlvLO8Xm1UFXyIJaaCOo/TdgI2s0Xl/1KVCaVDqLpAqZDJKbasljquye8/vpE0+zAc0NxQjmDspyhXo4gm6t3ioP16YO46wolob6j02l7UjHh4c9XYR53LGAOIEgAeBMRa+FzKf2g324bjtYvxBlK/WybOuugCtaRT10+q4zg4b1jUJw3zX3ob9/lX+BeqAoflbk8hELXGsFmLZHCpK2/Vzz+190uU3L2RUJiqcLuwhj8SqxtkHUSqJUAZen++STMOlbUPvU/CQ0eliBI04pURlS+1Nh3zU67qo6wr6VdFgRhDuiS/PoKdqyH6tOmpG4j9OVpi/ppOltkxPJcV0FukKiBlNJElVXLeLE4QP0nPisc/6 X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(46966006)(40470700004)(47076005)(36860700001)(9686003)(81166007)(2906002)(82310400004)(356005)(508600001)(6506007)(7696005)(33656002)(26005)(70206006)(70586007)(8676002)(4326008)(40460700003)(110136005)(54906003)(316002)(336012)(8936002)(5660300002)(186003)(52536014)(55016003)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2022 04:38:07.4158 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6c03219d-6ebc-4117-8580-08d9ec4f2283 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT034.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB7384 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 Thank you for your input. Please see few comments inline. > > 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 Trans= mit 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 cos= t 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. >=20 > > 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, avoi= d 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 s= et to 0xF (in function i40e_reset_tx_queue). So, in the very first call to = transmit function (for ex: i40e_xmit_fixed_burst_vec), the 'i40e_tx_free_bu= fs' function would end up checking the DTYPE field, if the above check was = not there. In the data sheet, in section 8.4.2.1.1 (transmit data descriptor format), = the RS field is described as follows: " Report Status. When set, the hardware reports the DMA completion of the t= ransmit descriptor and its data buffer. Completion is reported by descriptor write back or by head wri= te back as configured by the HEAD_WBEN flag in the transmit context. When it is reported by descriptor w= rite back, the DTYP field is set to 0xF and the RS flag is set." Considering the last sentence, should the code check for both DTYP field an= d RS field for completion? Currently, the code checks for just the DTYP fie= ld (in the function i40e_tx_free_bufs). >=20 > > > > Is my understanding correct? > > > > Thank you, > > Honnappa