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 5453CA057B; Wed, 1 Apr 2020 16:24:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1F85D1C0C2; Wed, 1 Apr 2020 16:22:01 +0200 (CEST) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by dpdk.org (Postfix) with ESMTP id 688A51C08C for ; Wed, 1 Apr 2020 16:21:58 +0200 (CEST) Received: by mail-lj1-f193.google.com with SMTP id q19so25895199ljp.9 for ; Wed, 01 Apr 2020 07:21:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NF11IBWIaOn2+GIileSyCNBvfLqcWt+j6mIcrSCXPh8=; b=x7aRfjxwSUTC7KWPmQoeDzez34weBkmZkfO3fiUxjyQvsNx5T7K9PhBiAGdMsAXUR5 N/Kgzc9egKWCdFr65FYrojcWw2VrYyvud1Wjw5YkW7m91xD1uHmzjkF09UlOcZMfhHKe k08vQOxQKk4wkpTPKqpxNYCF0RYvijXTzPzgQSiDCIsj117i4HsFN3XMZqWq4BnDJ3tE qsxjAcffwLJewHMRTm8IvCb+JdUW2mV9l6IGXuzFjF6Uz0v8owLIGPgnJrPbclgv8DS7 JNZXNv4cAEae3YMA3aae08SRgYEoPa9zS65D4KFKUXaKQNYWf8E1ojp6h/E8oqLo6h/2 +7SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NF11IBWIaOn2+GIileSyCNBvfLqcWt+j6mIcrSCXPh8=; b=UonotkyAQ5C0IEoL5Eeu08jFN7wACa1miH9KmImAop+4Lg+/1Z7X/J9arZKo9d2eYo Agw9CbN9Ls7h3ACIBwPwHQwTHt6Lgn9tPZnl4JdN6Nh6//lO9cnPN8K5MqY6z+OS4yhD 1bxK00vhccdaXNp+hJM4msZVS3K0xbE6xzjKzbpMuSO24iCTkulujJQ8MbMSb5yz3wuv O2WNFuvkJCdiKXj8wMKvOmAuwxzuWI6rJIK7C/33mNbFbgv03lWW7ImiI9xNMXVKABmV NM8G9LBy8lhQ9K6dZ3kikaiLp580tjH+jxUQgagaY7ZG6ELnLPqWk/Znsy9f+Vgmr5Jt klng== X-Gm-Message-State: AGi0Puahd0X/01RlgJYYRGNfkuZfJAHfukU3HrDCcg09diIxhanh0yuq ZQxo8ZNKkoV4jU474oqXgP4oqk+D4Wo= X-Google-Smtp-Source: APiQypJQ6jCzQr7sD9cdQavCLmWQhRQulyg/b2JJh7AwxckfU7UFz9tuRlycsILEX5vyKeqj9sx4LA== X-Received: by 2002:a2e:b80a:: with SMTP id u10mr1151233ljo.109.1585750917735; Wed, 01 Apr 2020 07:21:57 -0700 (PDT) Received: from mkPC.semihalf.local (193-106-246-138.noc.fibertech.net.pl. [193.106.246.138]) by smtp.gmail.com with ESMTPSA id r21sm1435961ljp.29.2020.04.01.07.21.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2020 07:21:57 -0700 (PDT) From: Michal Krawczyk To: dev@dpdk.org Cc: mw@semihalf.com, mba@semihalf.com, gtzalik@amazon.com, evgenys@amazon.com, igorch@amazon.com, Michal Krawczyk , stable@dpdk.org Date: Wed, 1 Apr 2020 16:21:13 +0200 Message-Id: <20200401142127.13715-16-mk@semihalf.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200401142127.13715-1-mk@semihalf.com> References: <20200401142127.13715-1-mk@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 15/29] net/ena: set IO ring size to the valid value 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" IO rings were configured with the maximum allowed size for the Tx/Rx rings. However, the application could decide to create smaller rings. This patch is using value stored in the ring instead of the value from the adapter which is indicating the maximum allowed value. Fixes: df238f84c0a2 ("net/ena: recreate HW IO rings on start and stop") Cc: stable@dpdk.org Signed-off-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Guy Tzalik --- drivers/net/ena/ena_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 21c25b21b1..13a016227c 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -1099,16 +1099,15 @@ static int ena_create_io_queue(struct ena_ring *ring) ena_qid = ENA_IO_TXQ_IDX(ring->id); ctx.direction = ENA_COM_IO_QUEUE_DIRECTION_TX; ctx.mem_queue_type = ena_dev->tx_mem_queue_type; - ctx.queue_size = adapter->tx_ring_size; for (i = 0; i < ring->ring_size; i++) ring->empty_tx_reqs[i] = i; } else { ena_qid = ENA_IO_RXQ_IDX(ring->id); ctx.direction = ENA_COM_IO_QUEUE_DIRECTION_RX; - ctx.queue_size = adapter->rx_ring_size; for (i = 0; i < ring->ring_size; i++) ring->empty_rx_reqs[i] = i; } + ctx.queue_size = ring->ring_size; ctx.qid = ena_qid; ctx.msix_vector = -1; /* interrupts not used */ ctx.numa_node = ring->numa_socket_id; -- 2.20.1