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 68729A04FD; Mon, 3 Oct 2022 18:39:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5B35F40DFB; Mon, 3 Oct 2022 18:39:54 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id E939240695 for ; Mon, 3 Oct 2022 18:39:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664815192; x=1696351192; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=49IepK2p7GbXXYivYtZA/LtpreLLCHVsvyFuFh9vGu4=; b=V+0WB+2I6crCBnvZpPYW61xrs1jmgYCpBm5TJc+ml+pdhF4Sw+rRrFLt GZlD55eaf33CTJsv4W37hDGED/I10m8co3GkGkBMPuO724pVz9q9V1iUy PxwwyZfvJvcGQRWGUuTCr7qUJD702b6ZR9D6PeeZcV0U6Z7wwHSsl6xdC v4OfTDYNqqqKLuG/kryepsiK+QYlOlC29+twB1WVhRU8Xi1bLZ2JPM4FT +kPXMzI05II2j4sX/XWq6P4AoXmM95rU32tJknef84TnHwQZVKRLJG+1+ gzmr4wDnnZ98S2F2MEXtKtdHoLBqsXG8HkqDTyz4W3e/xzSfL4ILDItmu g==; X-IronPort-AV: E=McAfee;i="6500,9779,10489"; a="303615476" X-IronPort-AV: E=Sophos;i="5.93,365,1654585200"; d="scan'208";a="303615476" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2022 09:39:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10489"; a="574696643" X-IronPort-AV: E=Sophos;i="5.93,365,1654585200"; d="scan'208";a="574696643" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga003.jf.intel.com with ESMTP; 03 Oct 2022 09:39:50 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 3 Oct 2022 09:39:50 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Mon, 3 Oct 2022 09:39:49 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.170) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Mon, 3 Oct 2022 09:39:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eTJM+bHCAHE3+olLt58s5KN9kWy2en3Eaj3xP+dBX588EmOIh4cWWTI1ouZl26OW4dgpnIi+PF4+9Wl0sirwlzwE8rynZdGIZ9blEjQE6zCVZ0T0S6ZMwkFkoPAUtEuLG4igpLpcTv8xY9I0V0DSNO549c7Jvp7vEnBLPYCV3fgfeM2DsglHuIWAmPRJ2jYq1IIvwmJl2UK1NRIZAUpxV7WXztC7Y8wwoShBaSVjdnXFLEYHxfU8Bg1zC7xmvZxjkGp+lh74hl5GvjKwoNVBR4dSoqAwTFp5wpFH1HnSyzqbgn/rErYiOk/CQp8ZWwUmo+aUqm6C1ONc+wIu8TRcow== 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=Czvxn7dFUCpssMBSjJLB0Y2dNYNaSdMM7hHGmda8zEg=; b=MOvCkVFEXgu5eMhTrCNfy8EnsKmcNZ3VHRU3U2LYeV2yIIf7lyGjEcLPrfF57n0kJJIvmPoSAji5KEKNUsl3KBBQCm8Ah+61A+5XqpZ+JPawCppHHNbp5UDpMXfa0gjNwHI9iD8nRBO1c0RbD2SYCRLpQBtu51wfNiv3vmVbD8jLXhjP8n9FHsdaMlROdpSzpM9b+U6HZy66hn7ry/0sUPnXnwVYMiw+G+K+C9dAkxeFOjN+2q/tubfdxt1Cn98fjavDZ0d/G5x/ahC/q09+tiCFYUamgT/XIYCIXiuI/r0Zb0I97A2GibBTKWugXI/Fo4N8SNkrFGT9gIkAmzxmJw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BY5PR11MB4451.namprd11.prod.outlook.com (2603:10b6:a03:1cb::30) by CY8PR11MB6843.namprd11.prod.outlook.com (2603:10b6:930:60::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.23; Mon, 3 Oct 2022 16:39:48 +0000 Received: from BY5PR11MB4451.namprd11.prod.outlook.com ([fe80::e6be:3feb:17fd:bdcf]) by BY5PR11MB4451.namprd11.prod.outlook.com ([fe80::e6be:3feb:17fd:bdcf%7]) with mapi id 15.20.5676.029; Mon, 3 Oct 2022 16:39:48 +0000 From: "Chautru, Nicolas" To: Thomas Monjalon CC: "dev@dpdk.org" , "gakhil@marvell.com" , "maxime.coquelin@redhat.com" , "trix@redhat.com" , "mdr@ashroe.eu" , "Richardson, Bruce" , "david.marchand@redhat.com" , "stephen@networkplumber.org" , "Zhang, Mingshan" , "hemant.agrawal@nxp.com" Subject: RE: [PATCH v10 6/7] bbdev: add queue related warning and status information Thread-Topic: [PATCH v10 6/7] bbdev: add queue related warning and status information Thread-Index: AQHY1PzsT/2t+zNqG0aLYt9k77mUIa38WkiAgACG+1A= Date: Mon, 3 Oct 2022 16:39:48 +0000 Message-ID: References: <1655491040-183649-6-git-send-email-nicolas.chautru@intel.com> <20220930184605.47655-1-nicolas.chautru@intel.com> <20220930184605.47655-7-nicolas.chautru@intel.com> <3072887.zE8UqtGg2D@thomas> In-Reply-To: <3072887.zE8UqtGg2D@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.500.17 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BY5PR11MB4451:EE_|CY8PR11MB6843:EE_ x-ms-office365-filtering-correlation-id: f19b12be-3d43-4d8a-b429-08daa55de2ce x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: V55zcAtee0Foz0oRiv0MAi9Zc6Kok6bJ9niMPQaiCBfpeKuV1wY7Ox/lruXEEHV1dJbcIQaVIUEWMxAQgKqM5sb/KrPXnTRQu4al5vAvZbUlB3FT1UhvOdA/TeH9basQLGJ1MMap0iu9miv+2Mrv1CnoOELZduwVh813UaJWAM4PlD14o7VvUV5p8eQNKhFS5j09Eb9WCHizskJrzUbG/1xGFDOoXWuMA+oVTFFcwfiVdvVWPm+tRJqiRNvvDetvVmvSHkqPhS+pBptHw72B+6qOlLDaSBlF1OyH1NQyL3BbxdBFILKFfwbvBoTYJH8BmHT8Xx2eHzCuacNpzSHevhA5ayqrM0Bu1CN8dR3OEYaUJQjbQfnsn5KPqsbPt7Qgy+tEp8tzAIVaMZS2/IS3AegI+1sWctHOJDEGMVvh+lJI2Nz3mil1E5AdJF08eJnNpocJhAH7HPbdkIdMeJp1VlFnpzxxsk1fGk6vK4Rhjsaz1RE23ul4l8Hz26jhXsCG5ojcvEbI2z8gbgsEa+DYNPLsqum7rhZA6BgWzhd0SmakEN+tCiCFTkwgjfVJ4rPlQHCgkd2hdijERbgINh9/7vvq4a5pOh9BwqngoAwOBi5j5cNa/AyIdxoMImVVDzNWCQ3FS9P7dzv1j9ppglZJSDviTp4oRmlKuvd6oJWVhsJnJYviGq4xdpcGDUyjfbw6Kius6HMe6XpGrZFu2RpAGjXIsMCXVGr9GpqHd5tpt2BzGEl3BddYBQvvdMomkBrHxJ5fQYZuQgo4EwDV5WC0tg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR11MB4451.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(39860400002)(136003)(396003)(346002)(376002)(366004)(451199015)(64756008)(122000001)(82960400001)(76116006)(66446008)(66476007)(4326008)(66556008)(66946007)(38100700002)(7696005)(316002)(33656002)(186003)(6506007)(478600001)(71200400001)(8676002)(53546011)(26005)(86362001)(54906003)(6916009)(9686003)(83380400001)(5660300002)(8936002)(41300700001)(55016003)(38070700005)(2906002)(52536014); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?1B2uyKMbnVcNMLesG3t7BfPGea14d6WxgkKOMMdiTSYXGQBK2EWk0Znyzd5s?= =?us-ascii?Q?YHvzT+RAkCjfQIUUc7MukNmhPKtmZWIdtCX7t7O+bc/cEaxzkW7L1TwfG1Tr?= =?us-ascii?Q?yTBv+iyo0jxvqRMUqgyE2uYAMxWps7+KjTUdTqeHUt1AxOS3N+OeBnVmIpL8?= =?us-ascii?Q?2GyQl5lv+cC40M3b1hQ/+vbLU27N8GuLq1dK0sfnvGWOsqXGGM8IzdKN2Og/?= =?us-ascii?Q?9m9Nr//PkmDpa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?= =?us-ascii?Q?88OiDewhMLKNb6b6yyNKSaTBIMPn2ORs5Z1WbDOPgIZOjQr6nLj2OojAypLV?= =?us-ascii?Q?2I1M7DRdRXD/OATfEK24Xo2b51MfFiFrnsv0WR9YtWU4owLQ4n8bma5qONUX?= =?us-ascii?Q?93tJY69ILORy6uPgPjKvJqx4vhudnCZzzPVEKo8+f6JrWagLJFF3CufXwr8m?= =?us-ascii?Q?RVto5Md7NOdIwikWn0Jh4OBeU6aaXaopcjS1R1e1rTIqHyuPrqLQCvFLFL86?= =?us-ascii?Q?9m7R5Me5eOP59EutC7o5E7psh4Za45wYEODTpqRZj55p9UIJLfJhXYC8Aigy?= =?us-ascii?Q?NLcyzF/Y72oelWM6wPw/bXqLAlUIVFunAIH1cY5VH4kuUrUvkV33S6WmVxvi?= =?us-ascii?Q?WXN3mFPTrOt1bW+oV89V+GK0bSLM/Jg/v5fF8qEZWgIwpLUYxXgL4WIFMMr+?= =?us-ascii?Q?D2mAp+1uKqEFV4WDfD/CrxA6ZJCnjHJYIGQNnG6F?= 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: BY5PR11MB4451.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f19b12be-3d43-4d8a-b429-08daa55de2ce X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Oct 2022 16:39:48.1460 (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: vNMZ3tBEGgy94IFJCY8Ft2G/n9X+rJrQAwBTk8sPNz0kIWqMLEwNBnNqd0gN4b9kbWN9kdj2PovDycbRoPjjbU8qC4ZJ3C+aywFk27Wc+L0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR11MB6843 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 Hi Thomas,=20 I will update all your comments below today, thanks.=20 The one where we need your confirmation is specifically this comment from y= our, I believe we discussed but good to make sure we are all aligned:=20 > But the big question is why do we need this "MAX" value? > The guideline is to avoid using such MAX value for long term compatibilit= y. This is not a _MAX enum but a _SIZE_MAX for array related to that enum. Not= e that the actual max value of the enum exists but is used a private macro.= =20 The distinction is that the application cannot make any assumptions on what= is the maximum enum value (ie. we don't want enum with MAX value, that is = not future proof has captured in doc). But the application can make some assumption on the sizing of array based o= n such an enum. The difference being the padding which allows for the enum = growth without breaking ABI or application. The previous name was _PADDED_MAX to make it clear this not a max enum but = a padded value. Then more recenrtly the consensus in the community was to c= hange this to _SIZE_MAX to be arguably more explicit this is to be used for= array size. The comments I believe also make it clear this is not a MAX en= um. Does that make sense and do you agree this is best consensus so far to move= forward? Thanks Thomas,=20 Nic > -----Original Message----- > From: Thomas Monjalon > Sent: Monday, October 3, 2022 1:29 AM > To: Chautru, Nicolas > Cc: dev@dpdk.org; gakhil@marvell.com; maxime.coquelin@redhat.com; > trix@redhat.com; mdr@ashroe.eu; Richardson, Bruce > ; david.marchand@redhat.com; > stephen@networkplumber.org; Zhang, Mingshan > ; hemant.agrawal@nxp.com > Subject: Re: [PATCH v10 6/7] bbdev: add queue related warning and status > information >=20 > Looking at this patch because I have been alerted about the ABI compat > handling. > I see some details that should have been caught in earlier reviews. >=20 > 30/09/2022 20:46, Nicolas Chautru: >=20 > > +/* > > + * Maximum size to be used to manage the enum > > +rte_bbdev_enqueue_status including padding for future >=20 > This line is long. > It is always better to split lines logically, for instance here, before "= including". >=20 > > + * enum insertion >=20 > It could be made clear that the real enum size is smaller or equal. >=20 > > + */ > > +#define RTE_BBDEV_ENQ_STATUS_SIZE_MAX 6 > [...] > > +enum rte_bbdev_enqueue_status { > > + RTE_BBDEV_ENQ_STATUS_NONE, /**< Nothing to report */ > > + RTE_BBDEV_ENQ_STATUS_QUEUE_FULL, /**< Not enough room in > queue */ > > + RTE_BBDEV_ENQ_STATUS_RING_FULL, /**< Not enough room in > ring */ > > + RTE_BBDEV_ENQ_STATUS_INVALID_OP, /**< Operation was > rejected as invalid */ > > +}; >=20 > A comment is missing at the end of the enum to remind updating the MAX. >=20 > But the big question is why do we need this "MAX" value? > The guideline is to avoid using such MAX value for long term compatibilit= y. >=20 > [...] > > +/** > > + * Converts queue status from enum to string >=20 > Should be imperative form: "Convert". > A dot is missing at the end of the sentence. >=20 > > + * > > + * @param status > > + * Queue status as enum > > + * > > + * @returns > > + * Queue status as string or NULL if op_type is invalid >=20 > It is not aligned with above parameter. > Choose an indentation format and keep it consistent. >=20 > [...] > > # added in 22.11 > > rte_bbdev_device_status_str; > > + rte_bbdev_enqueue_status_str; > > rte_bbdev_enqueue_fft_ops; > > rte_bbdev_dequeue_fft_ops; >=20 > It is not alphabetical order. >=20 >=20