From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by dpdk.org (Postfix) with ESMTP id 7131758EF for ; Tue, 29 Sep 2015 04:24:41 +0200 (CEST) Received: by pacex6 with SMTP id ex6so191025941pac.0 for ; Mon, 28 Sep 2015 19:24:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=ZmGFBUzgpQbe53kUMtEd4zyjkMtlUCddQO9qiUqzRf0=; b=GpPFfZGm23NnhCPeNzLGojxoy72d7ulpa9FkZExPvXE0zBmspNIfoltGV+OZgzA/z+ vfvMxR4ffESAn0piAswIAplySIWBYgUV82yTjLh652B+xJs5pGRgVf3iQkcAxGdwks+I ioxpYPuL8xErJIRs0E774YwBA1dpCY/ZKUtwwcIgy03tFMoLG1u0Efn0o3bJTwunfhX+ AcOyYDxm4UM4tiRjtGgrS9n9hDAzKV9fCheKH+K5rzINOlFVHtRWhtDKx6jk2EW+AfbM 1undGW0yabWB3e0+Re88iGqsiZAtBhICBNkq/MXAMOVqksDQAnJl0SRjSw86TNdmHmGS QeTw== X-Gm-Message-State: ALoCoQlJcplzKwLqLrCo9N6UUqNaXMOmniGBWAwsB4b8YMyBYDa8jfYsuURa03L6AopLV1221OEr X-Received: by 10.66.220.37 with SMTP id pt5mr30862562pac.138.1443493480740; Mon, 28 Sep 2015 19:24:40 -0700 (PDT) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by smtp.googlemail.com with ESMTPSA id ya10sm13486890pbc.69.2015.09.28.19.24.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Sep 2015 19:24:40 -0700 (PDT) To: Tomasz Kulasek , dev@dpdk.org References: <1435589444-1988-1-git-send-email-tomaszx.kulasek@intel.com> <1436981189-3320-1-git-send-email-tomaszx.kulasek@intel.com> <1436981189-3320-4-git-send-email-tomaszx.kulasek@intel.com> From: Tetsuya Mukawa X-Enigmail-Draft-Status: N1110 Message-ID: <5609F667.2010800@igel.co.jp> Date: Tue, 29 Sep 2015 11:24:39 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <1436981189-3320-4-git-send-email-tomaszx.kulasek@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCHv4 3/9] null: extend number of virtual queues 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: Tue, 29 Sep 2015 02:24:42 -0000 On 2015/07/16 2:26, Tomasz Kulasek wrote: > This patch adds a possibility to configure more than one queue on null > device. > > Signed-off-by: Tomasz Kulasek > --- > drivers/net/null/rte_eth_null.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c > index a8b3191..39ffcde 100644 > --- a/drivers/net/null/rte_eth_null.c > +++ b/drivers/net/null/rte_eth_null.c > @@ -71,8 +71,8 @@ struct pmd_internals { > unsigned nb_rx_queues; > unsigned nb_tx_queues; > > - struct null_queue rx_null_queues[1]; > - struct null_queue tx_null_queues[1]; > + struct null_queue rx_null_queues[RTE_MAX_QUEUES_PER_PORT]; > + struct null_queue tx_null_queues[RTE_MAX_QUEUES_PER_PORT]; > }; > > > @@ -213,7 +213,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id, > if ((dev == NULL) || (mb_pool == NULL)) > return -EINVAL; > > - if (rx_queue_id != 0) > + if (rx_queue_id >= dev->data->nb_rx_queues) > return -ENODEV; > > internals = dev->data->dev_private; > @@ -246,7 +246,7 @@ eth_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id, > if (dev == NULL) > return -EINVAL; > > - if (tx_queue_id != 0) > + if (tx_queue_id >= dev->data->nb_tx_queues) > return -ENODEV; > > internals = dev->data->dev_private; > @@ -279,8 +279,8 @@ eth_dev_info(struct rte_eth_dev *dev, > dev_info->driver_name = drivername; > dev_info->max_mac_addrs = 1; > dev_info->max_rx_pktlen = (uint32_t)-1; > - dev_info->max_rx_queues = (uint16_t)internals->nb_rx_queues; > - dev_info->max_tx_queues = (uint16_t)internals->nb_tx_queues; > + dev_info->max_rx_queues = RTE_DIM(internals->rx_null_queues); > + dev_info->max_tx_queues = RTE_DIM(internals->tx_null_queues); > dev_info->min_rx_bufsize = 0; > dev_info->pci_dev = NULL; > } Hi Thomasz, To do like above, should we change below variables also? static int eth_dev_null_create(const char *name, const unsigned numa_node, unsigned packet_size, unsigned packet_copy) { const unsigned nb_rx_queues = 1; const unsigned nb_tx_queues = 1; (snip) } Tetsuya