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 A2AFFA0597; Wed, 8 Apr 2020 10:32:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D262E1C1A7; Wed, 8 Apr 2020 10:29:52 +0200 (CEST) Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) by dpdk.org (Postfix) with ESMTP id 1DAF81C120 for ; Wed, 8 Apr 2020 10:29:47 +0200 (CEST) Received: by mail-lf1-f66.google.com with SMTP id l11so4485023lfc.5 for ; Wed, 08 Apr 2020 01:29:47 -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=4/Y0SPHlpCA+KoWL4/VqqD9gixLYsmGGWaciVtTqh8Q=; b=Yuu6QlboM5DixhZZv9rfl1IQOp9ZfjiPnji2Mbuj1QbWCDgYm0yjrlh9VY8NUUyu/p KV3jKEXdz3fQrrelHcQC5rrLmzQU4FieN/pn4k/e0DerkBBI/VnASNImvnmF9ZGpH2Uv xcb/lGtc/4HfYWtpv1DxDWNLSt5d2WNnBbri90V3x54u+LStfqAW8Xqqg8LOSjx9Xr+R Y0bIPThVY+TPpwVM8JXUQ7EfSDIj32WKqVODWrtuYSJJbxrlkya5p6NxEJsUrwVdpGZu K57Z2okJVQ0t5ua/taMWo11TkIesx5swiwiANebYisvUNHsbHEAAcrGjOWyfyByyKsug 7uOw== 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=4/Y0SPHlpCA+KoWL4/VqqD9gixLYsmGGWaciVtTqh8Q=; b=YpbXjd5cIGolyyUxFQzog6VsYpPtHDXskUflK2SVtp0QnRjSrzwSfA7Jmuuvy4ozZc AmP/Rcs91QdLUEY05XfkmHLt0uXrxnhbqFe+iywrMo2UrXDpq4LdyXiSwsAvrAWaNp1I QmdtQ4v9EyYQx8pF0+rmTebwzgF8SRuEGfL/OZrc7aMCGrSjGpI2UJpTcPsmN0Trquts DiXicKrQI5howz83YLdDGaGXpU0BkjaKmosfMV8yJru7rcl2UHbMwj7KtVo7oUGhG+p2 4aiext/elBnbonOgIRMx8vwrmqds6iiZqa++V/57iRDofOaL5LB06n/wPDbj4nK8oDAl SEQA== X-Gm-Message-State: AGi0PuZhm8L2vml5SoMChvuWDNYflTwk5Zb2tWguvjWfGHgs16EciXDS vdLtJNUxF9Sqok3Cgs6vP9P5nfSmQHg= X-Google-Smtp-Source: APiQypLSuNncz0/XRj573WvNKrwT/+9r8KwBg87cCuhFjB66Ov46/a/nlniILom33mZIcBQ8nBp2/Q== X-Received: by 2002:a19:c7d8:: with SMTP id x207mr3792293lff.190.1586334586464; Wed, 08 Apr 2020 01:29:46 -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 e8sm765685lja.3.2020.04.08.01.29.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2020 01:29:45 -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, ferruh.yigit@intel.com, arybchenko@solarflare.com, Michal Krawczyk , stable@dpdk.org Date: Wed, 8 Apr 2020 10:29:08 +0200 Message-Id: <20200408082921.31000-18-mk@semihalf.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200408082921.31000-1-mk@semihalf.com> References: <20200408082921.31000-1-mk@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 17/30] 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 f1202d99f2..62e26a2a16 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