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 73184425EA for ; Wed, 20 Sep 2023 10:10:53 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6837140A8B; Wed, 20 Sep 2023 10:10:53 +0200 (CEST) Received: from HK2P15301CU002.outbound.protection.outlook.com (mail-eastasiaazon11020014.outbound.protection.outlook.com [52.101.128.14]) by mails.dpdk.org (Postfix) with ESMTP id C36EC4027B; Wed, 20 Sep 2023 10:10:50 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GU0S0/e0WAjOuKHCGP12sSqVJgrqWXAPeKVJ1gd8yskP10p60oGBJDQlrJDNyds7aAOhCPuQALySmLUiJiWfNQXYg/aedLH7alk+WliObl+ok6O0e4Up7kyc9/Ws2km8fMMHezdmZlaAi0L3UKzu+kw3yVygaDrNfBIRFCruIouSMbRx5FT0tPC4rmep4Myzprc5dqheDIzfxx0fKaq3yk28crhygdHs0zGuWhAKOUtaNtYctYdiFLULhaTai+COIpvu77d1+fKjOKb+x2tmaXyVli+DmSP1b2uASGlziaP4hHKGPZ0E4zJCxLSi5i4tmBGUbOPaUSk4WBl0OWjajw== 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=Ucx0SmBGa7I8kk2GZZoPPz83t6hpudjkxbqQmi2Eba8=; b=Jvra2oSqx99+5Mz3kwtNwOwB1lVQX2oNWZnWyZdyWl2wGVSVIyEENOnAUUiS0mLndzSe5TernAbYH9lr8BxGhl0pgpbk9ter5ugUY4Wfpfdxi0GxbURS00eg1459N/0sAMjYrHnmWd+Na5i7ygcSughestcmtMfscngOW+amWFJOsJD6PcSJwNIea6CPHFY4AOELuPuTQ6abzQzbubky9WSBJhGmoYI1ny4AqjGpvLq5xjO5iFEBHAxycZFVQUHRNHYkx6Siku9ioX+cRctyQqz9Wbb74ecaKrcdI04SO3jM8bxxkgoYx4hiYydfY9EaLpCY0BwukwFoj78V3fgG9Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ucx0SmBGa7I8kk2GZZoPPz83t6hpudjkxbqQmi2Eba8=; b=iTEZw3dyDc4lMqkwAw2hdn8APCrqCvtziu2s6vNBSUcS8LkqxsEHRKkOTMuF/2HR+qc0GeomtlOvMYbo+f3zllvkHa4lfsd8lxnNnCUVCPmyQLe+nXYww7uZcBz9fN+nFQi23b+9Bn1xwM6L/OoV0sSn8ZKXZVnXqDRXnn6lEU0= Received: from SI2P153MB0441.APCP153.PROD.OUTLOOK.COM (2603:1096:4:fc::7) by PSAP153MB0389.APCP153.PROD.OUTLOOK.COM (2603:1096:301:3d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.4; Wed, 20 Sep 2023 08:10:46 +0000 Received: from SI2P153MB0441.APCP153.PROD.OUTLOOK.COM ([fe80::3daf:70ad:afb:a26c]) by SI2P153MB0441.APCP153.PROD.OUTLOOK.COM ([fe80::3daf:70ad:afb:a26c%3]) with mapi id 15.20.6838.003; Wed, 20 Sep 2023 08:10:46 +0000 From: Wei Hu To: Long Li , "dev@dpdk.org" CC: "stable@dpdk.org" , Ferruh Yigit , Luca Boccassi , Kevin Traynor Subject: RE: [PATCH 1/1] net/mana: add 32 bit short doorbell Thread-Topic: [PATCH 1/1] net/mana: add 32 bit short doorbell Thread-Index: AQHZ4xiQ9bKvJDFRDkup2UAbNtMUZbAhD7EAgABmi0CAASEogIAA0IBw Date: Wed, 20 Sep 2023 08:10:46 +0000 Message-ID: References: <20230909122347.2043969-1-weh@microsoft.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=592ba939-5e1d-43f1-96fe-5f2adeba49dc; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2023-09-18T19:51:56Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SI2P153MB0441:EE_|PSAP153MB0389:EE_ x-ms-office365-filtering-correlation-id: 3050ea6a-769e-4da2-6de9-08dbb9b11814 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: oBdrgbKDz+Li5aKF15CksJqfOL1w6ehPR2fPHjU9p2f4iActGnQa9lPciZy3y+DFKuJ5v8zY0yGGcmoTd62T1aF/ZVTCj4hnQ3Zl60eTOQuYY7dqcEnmcJQy4raVRwOEetRPV5Qw9S0jlz2cnNoS+QgG7yGGH2J/bmlE42r7qgZrLusBClGeLqg0iec5YHONkOz0iWYN8ql9ZerXdGigO+9tGLWLAQmlIMS/dEDwWiTvGQLgnQ4rIt6iFWTjkzgE/Ec/bJYWfyMfOoAed5RWQodL+YZPjGK2CP2UEJeSMmoycCQAHQbQQqx0UBmzfB7uf0YqD1ZKw+i7K14lRJpXaFNo1eljiM+0hsc1sqrNo8NppSW/ue7+yghsR+2KbVPpl/brb0x4tO7uwmP60PWw1wN1At9M2MtY48IuQ0ofFOsb1EWZexXLiwSAT1uXfHinArJCAxTlHm3j/Rm9YA4dnJNbx+HVphRlMWQjtYkMSXdM/cXscTc74RQZrxy+qSQjpS7qaJh2AJOKOrT9fjJVgQjv2j+TiNmwwEz9CE9wbfi4lVcx0oflfqFKW3DsutLqmkMHX0koWz0pd0WNl2IAAQFZd1gl1Frj7bv2EzmHuhAUucjKzb0MgPFHm7UHfkALxkSlGB7c37HDbbnh3v2LfsUof1nwAuQ8ClQa1r2wk+Q= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SI2P153MB0441.APCP153.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(346002)(136003)(396003)(376002)(366004)(39860400002)(1800799009)(186009)(451199024)(4326008)(7696005)(6506007)(9686003)(53546011)(33656002)(2906002)(26005)(55016003)(41300700001)(5660300002)(38070700005)(38100700002)(8676002)(52536014)(76116006)(66556008)(64756008)(316002)(66946007)(66476007)(54906003)(66446008)(8936002)(82960400001)(110136005)(82950400001)(71200400001)(122000001)(478600001)(10290500003)(8990500004)(83380400001)(86362001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?kn5k0EK9ENwnuSZweQ3bvSm2QHLmsm9PRgaI63smYvaGk9szkPccf7y/a8/7?= =?us-ascii?Q?EvSUFZU0+lB+DRR0A+Y8qAd3WCPPC6RMzGSb0JEq1OYK4zKwfBkZhEuC/9Z3?= =?us-ascii?Q?4q2yRnEvbrKJUEgrxOSrVy6Bp9NWinulGpNdXsydQr+xhqwPMpMYviDFFISm?= =?us-ascii?Q?XhSNrsmtKrEiiSh1MmWIZcz8NwE0rryhtgCjncj90XisKGhRJDNozZQWAlVh?= =?us-ascii?Q?2BHCIZqb860jFUcKslEVjHOQMKmZZ3q9ThJ1QWdXf3aSN8D38UXpcyiNJglU?= =?us-ascii?Q?Q9CRnYYd/pn8kPSqDxan840H977D7ErEuNjHSAZ9hWdAjRBvDrdgjo9CgAP5?= =?us-ascii?Q?8PF2lMk5enZ89uK6ulC1eiblE+O55RLTjtcUeLCVVKsDRErKytJdZKqCJriJ?= =?us-ascii?Q?FneYETGeBayIk9DtgP+om4JRAaQmfBWBftmvc8+UUWFJH0MNlACXBVkahg3w?= =?us-ascii?Q?57ts7qiIajeLE2Fn0MKlfS4t/GC7zaSt9IrS26/1n1uOnX64qrjm906CH/lP?= =?us-ascii?Q?Xs+osyfYO+cbNrL27fTD2AlexNjswyUc6bLUw7JK7/6dwFGIAd3sTeFerEps?= =?us-ascii?Q?KRJQq6JfsAa1Yz5cZW6LW3gcLjFibtZqzourwUvJklf3OlG0jMcdijd8qPZ6?= =?us-ascii?Q?nc4VjAMrGOlFR+8sd5g5IAfCAthrg1RldapMCmzNb6Ge9HsPuAaJroOP/Rg9?= =?us-ascii?Q?sRIB6tfn3LvGi6XuzKL3m135Q2BF0DK9qN5H2q1GInraWa+gVMgOY8lwYEif?= =?us-ascii?Q?czQgP/StCyFRTQodaicipOiHwr+5pBG8yqymEE9Y+K5cTch23uQm8GTQvj9W?= =?us-ascii?Q?UmC9FPbAK9QSPcAb5JonOaoRYuliy/pKTI1AesFJ430i5XKH/0TuWqumH6e8?= =?us-ascii?Q?YJtRTcm23aBwG6ykaS66tZDy++oiXt/W0zSLvvk6B4nvAwPIAEMCDfDg4EMB?= =?us-ascii?Q?zR25AMjq/jiTz7GoVM0Tg0coCUJfoLdBMzwoyhEGYAL9gnOpdFN5WNKqyuhP?= =?us-ascii?Q?XdweZv2RPpr9uWkJCdNA6g8o942TorvyuR0vc1JMn3WemOHxA7+hpX3Dw6Qs?= =?us-ascii?Q?Ymf6YDk6tK3LK1xjOLMKWj6lx28czMK5uyL5g9Bp3Obm/6P1iLoLVcE/UmTO?= =?us-ascii?Q?yGDesarMQSYWjEi6RpNu4JFeDD1a+Wk+JHjlExkONTzSwZkOegyf+PXZ9EiP?= =?us-ascii?Q?MZcyjHVPgGIycYXrh2448kJHf8CiqI/PT8VWhtAQfpNN0g+Fbq1r8xJ/00lG?= =?us-ascii?Q?p7S9ZraN9XneIoOEFxNo9upk/Pk77xEHdotv1ItgAb4ZFPLorHphCmAGgNNi?= =?us-ascii?Q?weHt0Xxk8S1kMOQ5n0FBYExP4i/BijPM+CWg2LaAGW/MUnAQd3Wl2eqV397C?= =?us-ascii?Q?2QtgRBuDOOnIG59nyPtaBoYvfQu00f19t5T3qv/RI27/IAuy7TpeRRKGBUdo?= =?us-ascii?Q?LRmV0REq5/z99xfBXp22brYLdjlh8nwq9g7+e/DRgK98kSFMviPPJ9s0Cp2U?= =?us-ascii?Q?wAaW7O5oH/OkI+xuv7ZZR57lsmJP7FxlFNywPJyDnxoqp0mdICAvwlfCXLQx?= =?us-ascii?Q?1/hO00zwkOBiQyZaw0s=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SI2P153MB0441.APCP153.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 3050ea6a-769e-4da2-6de9-08dbb9b11814 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Sep 2023 08:10:46.6835 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: rLYjPJ9/Jw5yFMtJCJ/XGcPiQTGfxduRHoQUFH18XeMrhmfrxPQAzv9vm5qd2FEYgMLjt0HE18MRw9k/th3sPQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAP153MB0389 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: Long Li > Sent: Wednesday, September 20, 2023 3:24 AM > To: Wei Hu ; dev@dpdk.org > Cc: stable@dpdk.org; Ferruh Yigit ; Luca Boccassi > ; Kevin Traynor > Subject: RE: [PATCH 1/1] net/mana: add 32 bit short doorbell >=20 > > > > +#ifdef RTE_ARCH_32 > > > > + uint16_t cqe_incr =3D > > > > +(uint16_t)rxq->gdma_cq.head_incr_to_short_db; > > > > > > How do you make sure head_incr_to_short_db doesn't overflow? > > > > > > > I have checked this with hardware team. In my opinion it would be > > easily overflown. > > The hw team seems suggesting the hw will take care of this. > > > > Thanks, > > Wei >=20 > I'm not sure how HW can take care of this when it overflows. When it > happens, the HW will miss a doorbell and CQ queue will get full. And > eventually you'll lose completions for TX/RX. >=20 > In mana_alloc_and_post_rx_wqes() and mana_rx_burst(), the code has check > for RX/TX_WQE_SHORT_DB_THRESHOLD to make sure tail_incr doesn't > overflow when ringing the doorbell. >=20 > In gdma_poll_completion_queue(), you need to have a similar mechanism to > not overflow tail_incr when ringing the doorbell. >=20 I am not sure what can be done here. Applications could run in poll mode wi= thout need to ring cq doorbell, or it could take very long time before it change = the interrupt state. What we can do when cq->head_incr_to_short_db reaches 0xffff in=20 gdma_poll_completion_queue()? If it breaks out the loop and return, the next time it enters it may still = at0xffff because it has not rung doorbell the have it reset yet. If just resetting the value to 0 and let it keep going in the loop, it is = no difference than casting it to 16 bit unsigned int, which would be done in=20 mana_arm_cq() if it is eventually called. Anyway, ringing cq doorbell has not been tested as the driver doesn't suppo= rt interrupts. Wei