From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id 0DCC1D49E for ; Thu, 10 Nov 2016 17:01:26 +0100 (CET) Received: by mail-wm0-f48.google.com with SMTP id t79so40690019wmt.0 for ; Thu, 10 Nov 2016 08:01:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=WitiSaBUoFiUQAw4gJtCfI9BKoWa89WoP35lrY2yTZk=; b=pkkg21suvFIECKg9G3BPusqYV8CTf45PkcNYRBmNpzrivHWvtDQeBRvkNVl+WCswnC /airbrm0gQ0yE8UIpTA/zx7ok2rRA/6kk2Xc3a8pC9q/gplj7MKGGV95ocLpvEm9IUgi 0mMm5ZHtxS0eCOFOSfxuk/8U44Nikv/392U5Saiy0+4pz7KcQZ5OavRAY07RK7V+BW7m AJajKPvHm8jYtBKqpdYPHAyqZBIYKKQ3hBgIbjDllUupvZhBNV7P6tQdZ9JiLybyv5zy q9RgKSDvpdDN6bNi/yeO5x837bEMkbw78kkIm4fVRE/m81/o5qDJYOnHgqBZR4WWq9CM m9fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=WitiSaBUoFiUQAw4gJtCfI9BKoWa89WoP35lrY2yTZk=; b=Sn2fw9ONz244Kk/RoiqNrzTee4kvI2CA/Us/IROAxK60tQs0aNq1OfpS8S85k6s7Xq cO4DD8rSUJrHOOAYRq28U1/rp2LYc97ilD3F1vu0DeO6UocflF5ENlKTJjK0FqXWmn72 lBzHqCPcZmBtr4gKaEsP+mXdYyP/qQoDV6r5Mf4buSujGpJ/tMS8Ykiapp1d0X//Od0C i6pgpXoAc1gugJSqYr3F/50VZ0kwIgWAwbP0dCpXrhJntFyMiyghpws0G3J5BSUJTX9u /rZibib9bIo5NfDhTwwt4EF4HUg7NY4xdf8Lp0I+eLnFEUQqjRDiyMxqC1SXcZ7Fi7LV /dOw== X-Gm-Message-State: ABUngvdJA6Um2m+Zbwwcfjdx7QFnuDQz3AcKW5gxD+GUrxSSc3m6I2f9AZTZXrRyeR2+CD2L X-Received: by 10.194.106.41 with SMTP id gr9mr5856604wjb.202.1478793686446; Thu, 10 Nov 2016 08:01:26 -0800 (PST) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id l2sm6161088wjy.39.2016.11.10.08.01.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Nov 2016 08:01:25 -0800 (PST) From: Thomas Monjalon To: Alejandro Lucero Cc: dev@dpdk.org, Bert van Leeuwen Date: Thu, 10 Nov 2016 17:01:24 +0100 Message-ID: <14529976.iPBWLuWW87@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: <1478786449-44745-1-git-send-email-alejandro.lucero@netronome.com> <3059112.zVgrzqmBCq@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] ethdev: check number of queues less than RTE_ETHDEV_QUEUE_STAT_CNTRS 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, 10 Nov 2016 16:01:27 -0000 2016-11-10 15:43, Alejandro Lucero: > On Thu, Nov 10, 2016 at 2:42 PM, Thomas Monjalon > wrote: > > > 2016-11-10 14:00, Alejandro Lucero: > > > From: Bert van Leeuwen > > > > > > A device can have more than RTE_ETHDEV_QUEUE_STAT_CNTRS queues which > > > is used inside struct rte_eth_stats. Ideally, DPDK should be built with > > > RTE_ETHDEV_QUEUE_STAT_CNTRS to the maximum number of queues a device > > > can support, 65536, as uint16_t is used for keeping those values for > > > RX and TX. But of course, having such big arrays inside struct > > rte_eth_stats > > > is not a good idea. > > > > RTE_ETHDEV_QUEUE_STAT_CNTRS come from a limitation in Intel devices. > > They have limited number of registers to store the stats per queue. > > > > > Current default value is 16, which could likely be changed to 32 or 64 > > > without too much opposition. And maybe it would be a good idea to modify > > > struct rte_eth_stats for allowing dynamically allocated arrays and maybe > > > some extra fields for keeping the array sizes. > > > > Yes > > and? what is your issue exactly? with which device? > > Please explain the idea brought by your patch. > > > > Netronome NFP devices support 128 queues and future version will support > 1024. > > A particular VF, our PMD just supports VFs, could get as much as 128. > Although that is not likely, that could be an option for some client. > > Clients want to use a DPDK coming with a distribution, so changing the > RTE_ETHDEV_QUEUE_STAT_CNTRS depending on the present devices is not an > option. > > We would be happy if RTE_ETHDEV_QUEUE_STAT_CNTRS could be set to 1024, > covering current and future requirements for our cards, but maybe having > such big arrays inside struct rte_eth_stats is something people do not want > to have. > > A solution could be to create such arrays dynamically based on the device > to get the stats from. For example, call to rte_eth_dev_configure could > have ax extra field for allocating a rte_eth_stats struct, which will be > based on nb_rx_q and nb_tx_q params already given to that function. > > Maybe the first thing to know is what people think about just incrementing > RTE_ETHDEV_QUEUE_STAT_CNTRS to 1024. > > So Thomas, what do you think about this? I think this patch is doing something else :) I'm not sure what is better between big arrays and variable size. I think you must explain these 2 options in another thread, because I'm not sure you will have enough attention in a thread starting with "check number of queues less than RTE_ETHDEV_QUEUE_STAT_CNTRS".