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 7A5A642602 for ; Tue, 19 Sep 2023 21:23:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7505740DDB; Tue, 19 Sep 2023 21:23:43 +0200 (CEST) Received: from BN3PR00CU001.outbound.protection.outlook.com (mail-eastus2azon11020021.outbound.protection.outlook.com [52.101.56.21]) by mails.dpdk.org (Postfix) with ESMTP id 38F75402E2; Tue, 19 Sep 2023 21:23:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QZ0ookT4YiGuHUE5fchqR07NW+imkIJ6q3HtzSn91+SrUqKYpFx8mlbcLy9xvP20wcDr31WKqT4IBtVu43XTZEu9ZrYrA4rggoy9IZgMePgXtmzLpPZu009KKgDAox8YXT2g4jBJ6LtC7vpgnKDWhW+6Ck6MIHOGZKMgVJqhuWZGjQOnqSUahDVZ9ePlACpzFoHbbPj++BCrYDKJO5Jdv+BcPcQ0HgBvprbL0AzX6wchHCXnyMhzHGVZ1Q3jpS7Mqyo5yoNZUknC3I02T3ldaII/WCIAjGglWSrtSvHno15cQ9JndGLbnwNfnSKpRHni5LUbSG7mS/l51hazMdLDfg== 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=UFL3D/u/QrlWsQALkjcjRsKNkiPBxzNuqZkiMRAJIDE=; b=UnLlkTX2CtaNTkb4zDpUUlbWpHYMwbu3P8WZ6SagtAT2sC4jIirb0N/ac0wkcgATDALLH8iAA9rFvGqWR/7PvKtWO/aRgUMBEiSSVdyuar4SmkwHBd0PrTtq5aB+SlBk2tbMDbd3YBvnlqOXI3F6sOgjtsHjDNDn/lbzwwhHFOWbKFSve0RZMz84nL2SS7vdxp7cCRmKfMew5X37qAnkAjqHy9eOlXbI9u23H+cjdYHPhtzPwDGC78c+tcnSP9KehFr12eEpwODdfPT4b0wahXDQONaom4yxRE+0ErXvSIgu/4X3CeUrBqy5htP/rJWho8Y2SU8sUvSlltQVvKDPzw== 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=UFL3D/u/QrlWsQALkjcjRsKNkiPBxzNuqZkiMRAJIDE=; b=UBMpPaMkGr9iCXp3XuGSZOnUEGTYmzxwHUk+JMTdenqKhlJWlW79tpoH2MFukjv7rTJ21GeHV1SESCMDvuyrmtq5eZY2mFt7o8MAhDEEDeymy6Zm/FopSiq5Y42XEz2yyp0O3taeIkDq6Tf7Y1LsNYS6xZjhf8nVWq4zOuzwxgw= Received: from PH7PR21MB3263.namprd21.prod.outlook.com (2603:10b6:510:1db::16) by PH8PR21MB3812.namprd21.prod.outlook.com (2603:10b6:510:216::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.6; Tue, 19 Sep 2023 19:23:39 +0000 Received: from PH7PR21MB3263.namprd21.prod.outlook.com ([fe80::69a5:e3db:6bba:9f1]) by PH7PR21MB3263.namprd21.prod.outlook.com ([fe80::69a5:e3db:6bba:9f1%7]) with mapi id 15.20.6838.003; Tue, 19 Sep 2023 19:23:39 +0000 From: Long Li 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 Thread-Topic: [PATCH 1/1] net/mana: add 32 bit short doorbell Thread-Index: AQHZ4xiOA4amZHCZtkOdzUllHV8Mf7AhDPeQgABqugCAARXUsA== Date: Tue, 19 Sep 2023 19:23:39 +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: PH7PR21MB3263:EE_|PH8PR21MB3812:EE_ x-ms-office365-filtering-correlation-id: 746a6184-2e51-44e6-e368-08dbb945eddc x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ybro/7PRyJYsguyPbg7pnjpiOCw6jruPuZKLsRvexI8z+moq/wqV0tSq8j+JclOZeiBL2NmzaCuiUS48soqFUt9fuXIVGnsl9GlhKrNt9nCUl4x35Cq/SqR0GBG/UJTpjfdmAKxOirHjNcFFMH+P9tJYe/AW1j5EvItGDOuJXXRVVL68ClfDp15AIxMhOTSJRTMoHhsq1yXf98dqcJ9JJTf5WwN8IOYAIRvbqoMpOBg0UShapGEYzyzn5a5Ovi7ZeN0T8n6/Ql9heOZ3QI9/lwm/JXEonM280rA91F/7l7xZegKEWuuf8Y+ruXt+qkD1DiuRDT7CQjK3mSLnQPC3JTgieGT7B+tA4Mq5gawBOMfaVXmYIuKUE2QjNryzG6Near4RtuC5z39j/GDYOOcZGhj09UuP7Y+1OlJ4CT3COK+89QJVMzUmet8KTvS13/M8LizZlXxnygfRHnFiMXJCn4bOLP+sHnWV/KT/Z7F2c+YNTSc5OqbEdU08+gyR0hQg5QGa58FN4PiIqbut6z7LiVWno2Byu92lxGKfKShi4e0U3xJ9Jlwu0o4h30lYYelERVPphmRTLTUVQ0Wz4OmntI8iZN12VjepeKBnRPnVqwRe1jZ+IcPQljtc869UBFVRDz45zf0mpicP9Qb3OJKnVYbdspoGlU4dMNgPM2XRUAc= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR21MB3263.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(136003)(376002)(396003)(346002)(366004)(451199024)(1800799009)(186009)(38100700002)(38070700005)(55016003)(6506007)(7696005)(33656002)(86362001)(82950400001)(82960400001)(122000001)(8936002)(26005)(2906002)(4744005)(9686003)(478600001)(10290500003)(71200400001)(5660300002)(52536014)(8676002)(4326008)(110136005)(41300700001)(66556008)(76116006)(66446008)(54906003)(66476007)(64756008)(8990500004)(66946007)(316002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?sJExeh4yEHQ35DdZsxmpNutr3zKZXbPatRRMmLcS1KvbDdAuM5runPtzyKMt?= =?us-ascii?Q?559SPZnAqUiR85Pyytc/o6pDsdNDul/NANvI4FeQvZ77sx0xjE6CCcLisOuc?= =?us-ascii?Q?ui5+6TtMN4zxGacDKnoqqvjNna6v1V7ypWsR0djjx9ZKb5pwQl20VM/6VZfM?= =?us-ascii?Q?53WuBN1JBnvs0mE+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?= =?us-ascii?Q?Ki+NTLYkJuMib+RFHMb2+RwQsslI7T802m6uCseu1qGlb0JAGKA5D53pIOU6?= =?us-ascii?Q?GXAK3gD6FxYz6daleCNUkkZ9lnNBmN/c3lKyx+0t5TA+zQ1AcBr8JqU8/iFn?= =?us-ascii?Q?VCFGIv98XKwxI9znDWGkjBwVcwW4+jci8Z2Pd3QoyQjDLitWNmzOseVRML+D?= =?us-ascii?Q?h7l4iNhgYGe0K3eSSJJK2POxES/945oky2LOnrcD3BDsMlYj7kwdSounof0D?= =?us-ascii?Q?xyavZ3dP+I8HO3Adqpajk6wru9sfbHWoSZv49P+d2KELxUIdl1ruchQmuKGi?= =?us-ascii?Q?9aKOYozauqtknr9FWMu7Qx6R+pg+Jxepe9O5vweEHx6mNSaJ9Wjyl0ZzEzPD?= =?us-ascii?Q?EBtx7m7FfByWdffN4bm43dkf1NI0DfNGBHrQozmlBe0dsT2b067zqC+bfclC?= =?us-ascii?Q?QozUBlhsAUMLgd5NCjnPDMCQAI34TEwCvqNDUbNpNk//vfAmIkKZCpj5xfpO?= =?us-ascii?Q?3d+qviZhAbhHfaY4lLFxMhh1LIuWtoofWGNPDd3L?= 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: PH7PR21MB3263.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 746a6184-2e51-44e6-e368-08dbb945eddc X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Sep 2023 19:23:39.6986 (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: BdQHsSDSeuE8ZKsYUlFDpfSwDlnP0lpsi3iWQx6i51nTu5lfDQMWyNnRYdK5cCpTMSpX2BfInUaJh54D6rO01w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR21MB3812 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 > > > +#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? > > >=20 > 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. >=20 > Thanks, > Wei I'm not sure how HW can take care of this when it overflows. When it happen= s, the HW will miss a doorbell and CQ queue will get full. And eventually y= ou'll lose completions for TX/RX. In mana_alloc_and_post_rx_wqes() and mana_rx_burst(), the code has check fo= r RX/TX_WQE_SHORT_DB_THRESHOLD to make sure tail_incr doesn't overflow when= ringing the doorbell. In gdma_poll_completion_queue(), you need to have a similar mechanism to no= t overflow tail_incr when ringing the doorbell. Thanks, Long