From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yk0-f179.google.com (mail-yk0-f179.google.com [209.85.160.179]) by dpdk.org (Postfix) with ESMTP id B742D5A38 for ; Wed, 19 Aug 2015 03:48:08 +0200 (CEST) Received: by ykdt205 with SMTP id t205so177910485ykd.1 for ; Tue, 18 Aug 2015 18:48:08 -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=Ys6KB6B6qrVJ1f+N3WVUtal/EE85Ec6IwAXX/6sAJ84=; b=e0qX5boV6hgnE9YA1aHX7qO697xvA8ib7GGesdFsmXC2cqI7n/LYX8H2wIW0Pjx3m5 QgW5h/XdSPd8ynCWijhyN71dHa1UgpNVuqvzFznKxri7uRvK3Fdl1U+mHQr8Q9x33raG 9y1CWpx2wZbFmkmbYw49jx5iwb6i6jSURXhGV5248/fQysefpTYXzXMO7sxVp2uQfpSv yJ+ocSulDYspwrvbgZkiQuIBHvbIsXe0/+Qhqnm3HMxu5GMZhLknGjWx4iBOkahHrPKd K+1gogQMPKIvMVnOSNQbtyNLcL0+p8s2GwcJ8wlxRwmAwuuVGuojD2A0UCevkV5C3vRK K0UA== X-Gm-Message-State: ALoCoQkbwKvMjzJaWCZC8rSIaFZGxyFI2Yx4IFADLl4GwSDplD0GQAw++J4WuShjxJjM/TJX7CZz MIME-Version: 1.0 X-Received: by 10.129.113.6 with SMTP id m6mr11327670ywc.12.1439948888176; Tue, 18 Aug 2015 18:48:08 -0700 (PDT) Received: by 10.13.198.71 with HTTP; Tue, 18 Aug 2015 18:48:08 -0700 (PDT) Date: Tue, 18 Aug 2015 22:48:08 -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: Wed, 19 Aug 2015 01:48:09 -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 .