From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yk0-f174.google.com (mail-yk0-f174.google.com [209.85.160.174]) by dpdk.org (Postfix) with ESMTP id C28958D9F for ; Thu, 20 Aug 2015 18:39:39 +0200 (CEST) Received: by ykdt205 with SMTP id t205so43639304ykd.1 for ; Thu, 20 Aug 2015 09:39:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=dmZsEI/JDzBsiFr84e8zpkxmzUkuMzFVm/X9cB9RjRE=; b=epKY/1DmlylOMo2MfoaQMJINQDaihWCKzzFEr59YRztY3PYLsTI7+WLF5tKbGA+U2G zCUOmphqIA0se7LB1260NUOMBSnWQuyWToa1Z6nBAFkTClScCgDOAdiz4fkqOWS10vnM BkXkr4wUHzphqmD0bW3PgSR7dWGik74KfgVS32TxidB6dB1n2O9OBiaHzAx0YS11Vb1b RwJO/kChWQ7SjR1r1Vxyn8mOlbri/JW8VydJJSYdSVYfHgXQZm6zYQWbmCnJ4nsEuyyU L856I0TMEWcjJIqfml9SQioeR7HzwTTlqfIgAZC3JyyzkrOK/fLEjEnL47G6l5+j1i72 4RZw== X-Gm-Message-State: ALoCoQlbDdsHLfEjuiWAvVb8OJmXayvwiLlRbWcqvceScUDHMUpued1cbNvZrStSleZBJHTQPtjw MIME-Version: 1.0 X-Received: by 10.129.115.3 with SMTP id o3mr4717361ywc.43.1440088779101; Thu, 20 Aug 2015 09:39:39 -0700 (PDT) Received: by 10.13.198.71 with HTTP; Thu, 20 Aug 2015 09:39:39 -0700 (PDT) Date: Thu, 20 Aug 2015 13:39:39 -0300 Message-ID: From: Ariel Rodriguez To: "dev@dpdk.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] ISSUE IN rte_bitmap X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Aug 2015 16:39:40 -0000 Hi , i am facing a issue regarding with the maximum amount of bits that the rte_bitmap allows. Example : bmp_mem_size = rte_bitmap_get_memory_footprint(40000000); OK (bmp_mem_size==2101312 (size in bytes aligned). Around 2MB) but if i do this: bmp_mem_size = rte_bitmap_get_memory_footprint(4294967292); (MAX uint32_t). (bmp_mem_size == 64). obviously this is wrong , besides the validation problem inside the function rte_bitmap_get_memory_footprint, the main problem is that the rte_bitmap api uses word size (4 bytes ints) for calculations of the max bitmap size and ,of course, make them turn around. In the rte_sched code there is a similar issue. In theory (By doc) the qos scheduler can handle a configuration like this: struct rte_sched_port_hierarchy { uint32_t queue:2; /**< Queue ID (0 .. 3) */ uint32_t traffic_class:2; /**< Traffic class ID (0 .. 3)*/ uint32_t pipe:20; /**< Pipe ID */ (Compile time configuration) 1M subscribers uint32_t subport:6; /**< Subport ID */ 32 subport uint32_t color:2; /**< Color */ }; If one try to make a struct rte_sched_port* with that configuration (4095 MAX pipe profiles) , the api fails because when the function rte_sched_port_config() tries to initialize the maximum memory use for that configuration previously calling rte_sched_port_get_array_base() , that function generates invalid total size, because the total memory size needed is beyond 4Gb , bigger than unsigned int max limit. (Again here the code is using uint32_t data for size calculation). I know maybe the case use of qos scheduler is not intend for that huge configuration but looking at the code there is no limitation except for the 4 bytes RSS struct rte_sched_port_hierarchy bit fields .