From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0599BA04B5; Thu, 29 Oct 2020 17:10:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7690BC9C2; Thu, 29 Oct 2020 17:10:18 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 5D851C9C2 for ; Thu, 29 Oct 2020 17:10:15 +0100 (CET) IronPort-SDR: o/SH1YG7NJVz3r87xklEgao/gBn8C2Fh+Qv9zYPiJDzAlWG9a0AMQzC200vN5jYBqd+zI8wO+5 W08fKvH2IzJQ== X-IronPort-AV: E=McAfee;i="6000,8403,9788"; a="168590486" X-IronPort-AV: E=Sophos;i="5.77,430,1596524400"; d="scan'208";a="168590486" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2020 09:10:13 -0700 IronPort-SDR: LAOgtxOA0KifAfVHFeLLRpshFHz1mlw6cbu/48sxfPUfRnWHupE3/SmLM58GUSzfzQYVwcDq69 Ra8s0Xq41kIQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,430,1596524400"; d="scan'208";a="469186807" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by orsmga004.jf.intel.com with ESMTP; 29 Oct 2020 09:10:13 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 29 Oct 2020 09:10:13 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 29 Oct 2020 09:10:12 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 29 Oct 2020 09:10:12 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.168) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Thu, 29 Oct 2020 09:10:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TbimUgVXViXXWhYj8gOBIYZvSWyosIbiqqAPvcApRuFQC46NYREGsZiW5cY1JgqsNUJ36e0itD5WG/rO322u8S9UXHHPZgLEnE2JvDWU8yeqRpO8KguvT5Eu/vNSfTlmYVBcpNEOdVHcAdc+n/lycf3Nv7rTGycSDXjCabiZvwlSZzdE8at9uj77LvcwdKMUI71VBCDjfWwWnDlro3vrm7FL/57ON1+9DLzAlQP7+8GP/tsxtKJcUezSqNGeMtD8j6Lsa3fL2mr4B7gmjwIRjiPYQ3fcWzkc2ItR5o0JPEF947P/QnxoqzzS0JPs2Gd2WHIU2onmjJ12MhgJXgV/Kg== 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-SenderADCheck; bh=IcDiv7E7dC6QzK9qYkj5LBXl90WJHpH6T3JxmNDCyh4=; b=O8w/jYq0zl2kDkR8AHY3oZ5XguHVqnP4g4JQMM/ofWRpxrqCuSLAzuMMULA0474nnJo4Du0FkQWHPEAr0USJjmVaDjcKXLIHUTf3w8zhodSmXTquoyg2zmzdCaISt6v9vtDJdvWPbjz/bRN5u456eGx0GoFRmvnzZexzDtgpFe+JmWtZwm1+1Kwk4KKFJq14j0h1eM2DFy/xfxLMGghwST8pDIxBjWSdTAZtmaa32zz7ygfRP5qLKMHRJIRONhH/RWB43t8znrtoECob4yzlGLqmCIi/1jpZbs4QZrhcqIu7VJMiAmzBFMPiE28J8FHs2ikcO4jphoMZt410et5qLQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IcDiv7E7dC6QzK9qYkj5LBXl90WJHpH6T3JxmNDCyh4=; b=tsURbXPd3+rv+e2ZJtBnpMaPGyet5HMeGGK43tQgEHIc9us0qPAdGgLfssLJOZHHY2jg1SnXp+ZQrOzT60PZhUe7RW+Flbkp7htaFq7NxWZgVHzQcGqZd/RmaEhR1OsTK2ZVNTLB73kuVR9mUvYRdD4rud+CnQRchH7XyVTSsps= Received: from BL0PR11MB3090.namprd11.prod.outlook.com (2603:10b6:208:74::23) by BL0PR11MB3361.namprd11.prod.outlook.com (2603:10b6:208:6d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.27; Thu, 29 Oct 2020 16:10:11 +0000 Received: from BL0PR11MB3090.namprd11.prod.outlook.com ([fe80::a56b:d37:aa25:473e]) by BL0PR11MB3090.namprd11.prod.outlook.com ([fe80::a56b:d37:aa25:473e%6]) with mapi id 15.20.3499.024; Thu, 29 Oct 2020 16:10:11 +0000 From: "McDaniel, Timothy" To: Stephen Hemminger CC: "dev@dpdk.org" , "Carrillo, Erik G" , "Eads, Gage" , "Van Haaren, Harry" , "jerinj@marvell.com" , "thomas@monjalon.net" Thread-Topic: [dpdk-dev] [PATCH v4 03/23] event/dlb2: add private data structures and constants Thread-Index: AQHWrgh2+BXSfg+6WUW2f2lf53SuPamuv0TQ Date: Thu, 29 Oct 2020 16:10:10 +0000 Message-ID: References: <1599855987-25976-2-git-send-email-timothy.mcdaniel@intel.com> <1603985122-19888-1-git-send-email-timothy.mcdaniel@intel.com> <1603985122-19888-4-git-send-email-timothy.mcdaniel@intel.com> <20201029083043.2ef50bc1@hermes.local> In-Reply-To: <20201029083043.2ef50bc1@hermes.local> 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.5.1.3 authentication-results: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=intel.com; x-originating-ip: [162.251.9.49] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f6b0df82-87c9-4f85-1a81-08d87c251cbb x-ms-traffictypediagnostic: BL0PR11MB3361: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4941; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: u8JK1NSkKr2tOuWqiBB2IbGomzZAxEMw/ih7b3X0E2VvAmAQbuY9IzC5dbJE1yp96SgHJlyKgWMwCjRi4WuSP4uMCXNUBXMLzdg9Im/OPr5GHUejro7oWuv/sW8tqRi5YAYwmfX0SwcmHZsTNY2fInbVb0KuODRThdMHJMaXlBHQioD5yI+h7KxaD3myVaFr01/6FYJigKHYu2XZ6AJhcaSD322TqTUaRaaVS6VNXlnMIWw+WPvRo80zz8HRSv9pPVHWhRB7JUaXM2mN6IcIJIyLlJ7y1kNaZKjsiektYmU6cH2ahjLIvOqyWN0eHqcl x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR11MB3090.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(376002)(346002)(39860400002)(366004)(136003)(8676002)(66946007)(76116006)(71200400001)(64756008)(83380400001)(33656002)(52536014)(66476007)(66446008)(66556008)(86362001)(5660300002)(8936002)(316002)(2906002)(54906003)(186003)(478600001)(9686003)(55016002)(7696005)(26005)(4326008)(6506007)(6916009)(53546011); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: KJ7EEdJQUFIWBiwdqIdiKO+sL9fl18dMb8HgaJWEVP10rs/VmuyZ9LZe2SgF+0I5mOJeAQ0GPDb0OBs8BhOGZWcD6Bl6wIsAIHSa4phaNDf2Ij48aD8u2+vl3cAGzgGZ6I5iGqxpeWxQ+Zb+3m7UfpjI4ck4mKZa6LvBaUP1jhzH0Wal/dvvXaEqT4ASaXfUT/4HYoOnoAszPTpxU81YmUuZlNV7GmAMVjsVrsto3QXRHf0W/31PKP1/+6sOA18Bu321fBWIhNPB9NIjSycZTt2d+mEsze1HYou1v/P0GcqUfOeQk8i4gDa3DIpPhWNCTPAhwxSQI6lHnSWcl1IynaSAnk1o5VnPq7BUiA1Har15kGzdWCnw9tA2LVLb1s1msjk2I/pwDcndLI+LHQkAeXEZcdPv3eyiEw9li8pZxNu1p309uLSRYZXdyPVLYfUq+0WD4FzAIZ+Db2hMxpkUtlYT+Z4COt3F9KvU/F00KQNMtv46LTOxBrSR5g/w3hDCEnesWWSyHcNlj2XJ8Z1HmHtQ0QkypF+Alpy3Y/X2odVYOFbbMK1dTc6oedHkWLR8RUornPUhrtSN2EkGtLTC0BKqVQ6y5uRYDttPx+MuSfwumqFsTG3dCqeEOq55QEy+w0dDwOWahk/v7fRvdD2v/g== 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: BL0PR11MB3090.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f6b0df82-87c9-4f85-1a81-08d87c251cbb X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Oct 2020 16:10:10.9304 (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: eRwI96QZ7cPag5I4aeXGl1KkLAoXRGqkDeGgCuFU4PFMmZ2qyQdZ0bPheK72WjGvOy6x7taz0+eGMT4fA/mUhoY86+Rp/jxPEJCjLhtle2E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB3361 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v4 03/23] event/dlb2: add private data structures and constants X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Stephen Hemminger > Sent: Thursday, October 29, 2020 10:31 AM > To: McDaniel, Timothy > Cc: dev@dpdk.org; Carrillo, Erik G ; Eads, Gag= e > ; Van Haaren, Harry ; > jerinj@marvell.com; thomas@monjalon.net > Subject: Re: [dpdk-dev] [PATCH v4 03/23] event/dlb2: add private data > structures and constants >=20 > On Thu, 29 Oct 2020 10:24:57 -0500 > Timothy McDaniel wrote: >=20 > > +struct dlb2_port { > > + uint32_t id; > > + bool is_directed; > > + bool gen_bit; > > + uint16_t dir_credits; > > + uint32_t dequeue_depth; > > + union dlb2_port_config cfg; > > + uint32_t *credit_pool[DLB2_NUM_QUEUE_TYPES]; /* use __atomic > builtins */ > > + uint16_t cached_ldb_credits; > > + uint16_t ldb_credits; > > + uint16_t cached_dir_credits; > > + bool int_armed; > > + uint16_t owed_tokens; > > + int16_t issued_releases; > > + int cq_depth; > > + uint16_t cq_idx; > > + uint16_t cq_idx_unmasked; > > + uint16_t cq_depth_mask; > > + uint16_t gen_bit_shift; > > + enum dlb2_port_state state; > > + enum dlb2_configuration_state config_state; > > + int num_mapped_qids; > > + uint8_t *qid_mappings; > > + struct dlb2_enqueue_qe *qe4; /* Cache line's worth of QEs (4) */ > > + struct dlb2_enqueue_qe *int_arm_qe; > > + struct dlb2_cq_pop_qe *consume_qe; > > + struct dlb2_eventdev *dlb2; /* back ptr */ > > + struct dlb2_eventdev_port *ev_port; /* back ptr */ > > +}; >=20 > Is there any case where these int values could be negative? > Would you be better off using unsigned types? These structure members should never go negative. I believe that I could c= hange them to unsigned if required, but I don't think it really matters for these.