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 4336EA04C1; Thu, 21 Nov 2019 21:32:40 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 555BC2BA3; Thu, 21 Nov 2019 21:32:39 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 24C782BA2 for ; Thu, 21 Nov 2019 21:32:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574368357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PaDKkzm/p1PdWeo3PZRGDFQDS6FNtEn+S57MkTzrYaM=; b=LszbEnyClrKdU64yopj9r05oYSaMip1o5RL6N2yXF/yE5dtc/z0D8nWRowlZtvpX4bBjOW eHx5TRwvgl46m695bkhoOBC1ZM1kC9/UEKccJVINKXfZijLikOsza9peuOKzErdHLwTVTl O3JeHyLwOP3xepg9w5+a+O7wfsV6DpY= Received: from mail-vk1-f198.google.com (mail-vk1-f198.google.com [209.85.221.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-401-45OSXTCsPuyNIXTTFB94OQ-1; Thu, 21 Nov 2019 15:32:36 -0500 Received: by mail-vk1-f198.google.com with SMTP id l4so1833200vkn.6 for ; Thu, 21 Nov 2019 12:32:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tl3+bRlC4ne7zx0rFWGhKaebGXH01xKFzLuxyFkMTyM=; b=L3BF/vnM8IYLCVuqBFRMYn63gIwYLe13mxwubwf9idTDdkO54natqskkQv0fEF9TT9 CaiTUZ7nOmLqxLB+OLde7Klv8IdX4ZrXxsMKfHn4sbFun7CPFxyWNsfYymIjs/MdW3mX T8RVDptiqHCqYKZqofBBzEPlECjtM/8WNzORQxvV4j+N9ojRqbkLu5t5qNptkZpLLEf9 b1zji4mKwMs0dZ6gv1/+2zOQnnr7uKAg+kVmuyOuRdrARsRK1GQPKshsoCmzzWfrV1MI Kyuh+8ooqHJVImgvUjDLkJghyb2hNzoMPBM5OqM7hpqMwNEpDVRbTG1tjEhXQjDFqsBU pMrQ== X-Gm-Message-State: APjAAAWYenDRO68bsCpuOVqoOb9gBSqYXEfIa7xviY2Xhlw5NvhWyaUH kOsgIMuBuzQSEim87uEpGyTkH5fI/JCBLih1NAFqJDiQKMYBvVv8l+5o2lu+ft9PdUyPg14EbDE pGuNucra28fYllkOJ1go= X-Received: by 2002:a1f:9553:: with SMTP id x80mr7298727vkd.39.1574368354392; Thu, 21 Nov 2019 12:32:34 -0800 (PST) X-Google-Smtp-Source: APXvYqx+6Ec6+VwNAWiEXFAETKX6Uca1i9bcmfzwRUgFkMy1VpxisK3tbAkz2npcq9YHimXklmHpyfiv6mMdTcziZNA= X-Received: by 2002:a1f:9553:: with SMTP id x80mr7298680vkd.39.1574368353896; Thu, 21 Nov 2019 12:32:33 -0800 (PST) MIME-Version: 1.0 References: <20191121151256.20613-1-david.marchand@redhat.com> <20191121084518.488dc568@hermes.lan> In-Reply-To: <20191121084518.488dc568@hermes.lan> From: David Marchand Date: Thu, 21 Nov 2019 21:32:22 +0100 Message-ID: To: Stephen Hemminger Cc: dev , Thomas Monjalon , "Yigit, Ferruh" , Wenzhuo Lu , Jingjing Wu , Bernard Iremonger X-MC-Unique: 45OSXTCsPuyNIXTTFB94OQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH] app/testpmd: reduce memory consumption 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, Nov 21, 2019 at 5:45 PM Stephen Hemminger wrote: > > On Thu, 21 Nov 2019 16:12:55 +0100 > David Marchand wrote: > > > - uint16_t nb_rx_desc[MAX_QUEUE_ID+1]; /**< per queu= e rx desc number */ > > - uint16_t nb_tx_desc[MAX_QUEUE_ID+1]; /**< per queu= e tx desc number */ > > - struct rte_eth_rxconf rx_conf[MAX_QUEUE_ID+1]; /**< per queue r= x configuration */ > > - struct rte_eth_txconf tx_conf[MAX_QUEUE_ID+1]; /**< per queue t= x configuration */ > > + uint16_t nb_rx_desc[RTE_MAX_QUEUES_PER_PORT+1]; /*= *< per queue rx desc number */ > > + uint16_t nb_tx_desc[RTE_MAX_QUEUES_PER_PORT+1]; /*= *< per queue tx desc number */ > > + struct rte_eth_rxconf rx_conf[RTE_MAX_QUEUES_PER_PORT+1]; /**< = per queue rx configuration */ > > + struct rte_eth_txconf tx_conf[RTE_MAX_QUEUES_PER_PORT+1]; /**< = per queue tx configuration */ > > Why not put all the per-queue stuff together in one structure > and put it at the end. Then dynamically size based on number of queues? This is something that could be done. At first glance, the code is relying on those arrays being contiguous, but it should not be a problem. The reason for the size '+1' is not obvious to me. Not saying that would be difficult to investigate and fix/rework all this. My approach seems the quickest and less risky after rc3. I can look at this post 19.11 (but volunteers are welcome, testpmd needs some love). --=20 David Marchand