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 DC69445CA2; Thu, 7 Nov 2024 12:49:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 79245402AC; Thu, 7 Nov 2024 12:49:36 +0100 (CET) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 322AA40280 for ; Thu, 7 Nov 2024 12:49:35 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 01FCA21D0E; Thu, 7 Nov 2024 12:49:34 +0100 (CET) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH v7 4/7] ring: make dump function more verbose Date: Thu, 7 Nov 2024 12:49:34 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F891@smartserver.smartshare.dk> X-MimeOLE: Produced By Microsoft Exchange V6.5 In-Reply-To: <20241030212304.104180-5-konstantin.ananyev@huawei.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v7 4/7] ring: make dump function more verbose Thread-Index: AdsrCueigzqPRsiYSgiqgULvFARxtgF/+nKA References: <20241021174745.1843-1-konstantin.ananyev@huawei.com> <20241030212304.104180-1-konstantin.ananyev@huawei.com> <20241030212304.104180-5-konstantin.ananyev@huawei.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Konstantin Ananyev" , Cc: , , , , , , , 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 > From: Konstantin Ananyev [mailto:konstantin.ananyev@huawei.com] > Sent: Wednesday, 30 October 2024 22.23 >=20 > From: Eimear Morrissey >=20 > The current rte_ring_dump function uses the generic rte_ring_headtail > structure to access head/tail positions. This is incorrect for the RTS > case where the head is stored in a different offset in the union of > structs. Switching to a separate function for each sync type allows > to dump correct head/tail values and extra metadata. >=20 > Signed-off-by: Eimear Morrissey > --- > +static const char * > +ring_get_sync_type(const enum rte_ring_sync_type st) > +{ > + switch (st) { > + case RTE_RING_SYNC_ST: > + return "single thread"; > + case RTE_RING_SYNC_MT: > + return "multi thread"; > + case RTE_RING_SYNC_MT_RTS: > + return "multi thread - RTS"; > + case RTE_RING_SYNC_MT_HTS: > + return "multi thread - HTS"; > + default: > + return "unknown"; > + } I would prefer "ST", "MT" "MT_RTS" and "MT_HTS" instead of the "human = readable" strings. With or without suggested change, Acked-by: Morten Br=F8rup