From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yk0-f169.google.com (mail-yk0-f169.google.com [209.85.160.169]) by dpdk.org (Postfix) with ESMTP id 3C9A08DA9 for ; Sun, 16 Aug 2015 07:46:36 +0200 (CEST) Received: by ykbi184 with SMTP id i184so36489498ykb.2 for ; Sat, 15 Aug 2015 22:46:35 -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=phT3vVhAYWIqNm/wSTzvqvJ0HBzAJokkVjVk+Wl3opM=; b=AEJFVOVp3v4Ja//VnIkbyQ2PxDk4OtWtc9QDBvmFtSZsDdXnPA1BldN+9sSKUZOj0I mVk7tZ1ToN2DhestdG8MEgyp+QbdnGeDLmetBg81x/ukUfKj1J89i+WcKKoKSINiC53j odBniGpKFF2jaK9Q424k3kZdB2m8yzYxF2AFIh6SV2oE3I8pOF583pZrZr0Jo+pVfrlJ IqPHSlmiekNs5NpqNjhYf2I/Y52m2Diod8/TqjjAlsTkwz0q/FO3YuXDE/1NsYZ7DExa eY0MSSdDliKqgc0V1TahQaGX6LsrJ8ZWTw/dMqavIGMvvIwOFfsEx3TBM/izfGnGxGsR uSVQ== X-Gm-Message-State: ALoCoQnfXDdN/unC7Kezx8yOQPqINJAJV/4sOm914SfoHGRnyEQmlGKebJkpLeMZtAuKhDLX6t6e MIME-Version: 1.0 X-Received: by 10.170.96.86 with SMTP id n83mr10208057yka.45.1439703995678; Sat, 15 Aug 2015 22:46:35 -0700 (PDT) Received: by 10.13.193.70 with HTTP; Sat, 15 Aug 2015 22:46:35 -0700 (PDT) Date: Sun, 16 Aug 2015 02:46:35 -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: Sun, 16 Aug 2015 05:46:36 -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 .