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 32439A04B5; Thu, 29 Oct 2020 16:35:19 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 12E6BD01E; Thu, 29 Oct 2020 16:30:49 +0100 (CET) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 07CFBD01C for ; Thu, 29 Oct 2020 16:30:47 +0100 (CET) Received: by mail-pg1-f196.google.com with SMTP id f38so2641173pgm.2 for ; Thu, 29 Oct 2020 08:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=j5eK7ssj3FmntH8uQ5O2wEm6S00WU93Y4EEXUY7oX8Q=; b=oXUo5o80eZqgI67KdJyrXgNYDQUHO3wkf4/6PkAVrAWf5eReRmHSx3sMXfNrfOSEA4 Qt6UN3cnMjJ4DiSp0r/pmAcuhOLgapD3+RejWC1Gn+CbtIAk7U1LC6HZIW+12RPsFC+P wZnZbF0UAe2nNKM6LNFk2AwO2bddQrZvzlwP4k5bUINalus63LxoE4h3MBNPcV12NmPq 40pvl6H59QmpplnT8OCo1nxg+OvI/NZA0lrejWl9nP+FfMxe71g3NTlgU5fAsUv1Cd+h M2gO6UdUiqFzHC8jEMfTG4dk/PzP/GTKBJaZgxGneDmcNl2ngB1NQ8yaENbkbAwmyIO4 DD7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=j5eK7ssj3FmntH8uQ5O2wEm6S00WU93Y4EEXUY7oX8Q=; b=gO6WrmdodBHfFA+kM0HTrsXpy8zyTJa9e3+8HOQ2YmaQ6gT+I8Ax2oScgtJ6m9joVV pxuHoSNt1pFNRTHrc8ZF85PiT9/J+yBmUT6Gj9CHekSBikxMa7Burnm4U3l0vpqTtB8x wIVGgLDT0cuzPlrf+W02zD77QSmhEr5XZdOHezKw2BiHHcjXfzMtuws3z+jRJVmKusWP ZhFRaza9m4ShugQDGAFW32cBTMQ/kcgySET3NxSyZY97dSUY7T/sSug6D4OePm9yyWhw PMFsYOIc0eJqZ88tPwZMDsmVTVPja3mV/2MdUrBRaDvWDtU39rk1D+i4x8DAYOZVbDXx 1GGA== X-Gm-Message-State: AOAM533jIEbyCNAKze4opldF/lqo5erDMSQDupQSDAYZoZNueTPHtjeD dWKKi9uzZRFAraerYz1u1z+Gdw== X-Google-Smtp-Source: ABdhPJyEhybWGIjQLdLcz7TQhyG61W9DwLmmcRS32V9nobVbr2oS6he/4VEDuV5MxWsx5fiZD4652Q== X-Received: by 2002:a63:1102:: with SMTP id g2mr4369021pgl.98.1603985446316; Thu, 29 Oct 2020 08:30:46 -0700 (PDT) Received: from hermes.local (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id t9sm205750pjo.4.2020.10.29.08.30.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2020 08:30:46 -0700 (PDT) Date: Thu, 29 Oct 2020 08:30:43 -0700 From: Stephen Hemminger To: Timothy McDaniel Cc: dev@dpdk.org, erik.g.carrillo@intel.com, gage.eads@intel.com, harry.van.haaren@intel.com, jerinj@marvell.com, thomas@monjalon.net Message-ID: <20201029083043.2ef50bc1@hermes.local> In-Reply-To: <1603985122-19888-4-git-send-email-timothy.mcdaniel@intel.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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" On Thu, 29 Oct 2020 10:24:57 -0500 Timothy McDaniel wrote: > +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 */ > +}; Is there any case where these int values could be negative? Would you be better off using unsigned types?