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 9C252A0589; Fri, 27 Mar 2020 11:31:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B40611C13A; Fri, 27 Mar 2020 11:29:40 +0100 (CET) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by dpdk.org (Postfix) with ESMTP id 6EC871C10F for ; Fri, 27 Mar 2020 11:29:30 +0100 (CET) Received: by mail-lj1-f193.google.com with SMTP id w1so9616699ljh.5 for ; Fri, 27 Mar 2020 03:29:30 -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=loNrPIPZNrfMa3du/9QbKf6I8zWG43+lka0xmUCvXf0=; b=R7HhmjYMd5difjuVf8+KmZQRKZ085z62D7vmzLXoXKs2sJid8yxNVjwoPY+ms8sQz2 LZYUhJr7xeS49O0BcDBj188VJ/VvpKCVFFu+0ru0IswFLttaLyrQ6iyDLmYMiCUxKMGi +lvDa7yd25WBO4gNG1K+FXY0JtX0Q7I2BgjU+7Ncna1ekvhunQYKJaWofrD3g2MzIMa8 AcB+7Wr3jfEllJSu2ufQn2kyCMPLX6UZ/W5Xorcxdl8OYo1gRd1AP3D0O0TqbMb4Scf2 gut7dETsvRmC3yUAn/JqrN/NFJxlUUrFMW9jRzA/qAbn+B9pZtYBNnjpinlZlti5RdK1 QsSA== 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=loNrPIPZNrfMa3du/9QbKf6I8zWG43+lka0xmUCvXf0=; b=mBd8yCEYjFIMrvkuEs3DwUWmwEbcBE7culYAL6dF+h0AQqN8sFbLwj18psspplSonI k+t/7WhMbCfRS0n5h5Yug9LpVQOnpYMJliELnSLsyEN+zRyisEy9wqF5qno9uYy+vMsb a5As4iN1OltMqTjCljuADSApmmIlkGTAFBrq+yyhl25Nd64DAbn8LGrkelm+4X1Nxfid FqnfaSpw80wzFSD5IZlWORXyKCLYkfwKkXxdYZpPJv7ZfmuAnOp9fDLULmRWKPvogQG9 big+PGp294s5mg8to5GTneH8xchBtCfrVt9YL5q+lT+Dk2f6fx4ON2GeBxn04yAgVtUD Xorw== X-Gm-Message-State: ANhLgQ3CTGSDuRSM7y+XcG6c9WOSzARVTrF4WBtFsJiSnu3S4gdJ5CTi u0EGw+uALHcRIZnN2jQhX/C5MsvtsC34rg== X-Google-Smtp-Source: APiQypKwbzmwAQQqRN9H5Sb26kM3ugrTjadUbn+0jfnENSIq68mkQoDn1jrtEUKwDFOj7uGOBwzGHg== X-Received: by 2002:a2e:9dc4:: with SMTP id x4mr7651573ljj.263.1585304969808; Fri, 27 Mar 2020 03:29:29 -0700 (PDT) Received: from localhost.localdomain (193-106-246-138.noc.fibertech.net.pl. [193.106.246.138]) by smtp.gmail.com with ESMTPSA id i11sm2789587lfo.84.2020.03.27.03.29.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2020 03:29:29 -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: Fri, 27 Mar 2020 11:18:09 +0100 Message-Id: <20200327101823.12646-16-mk@semihalf.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200327101823.12646-1-mk@semihalf.com> References: <20200327101823.12646-1-mk@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 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 4c1e4899d0..5f9a44ff71 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -1098,16 +1098,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