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 7FBCDA056A; Thu, 5 Mar 2020 23:23:39 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B67422BB8; Thu, 5 Mar 2020 23:23:38 +0100 (CET) Received: from mail-qt1-f193.google.com (mail-qt1-f193.google.com [209.85.160.193]) by dpdk.org (Postfix) with ESMTP id 414132BA8 for ; Thu, 5 Mar 2020 23:23:38 +0100 (CET) Received: by mail-qt1-f193.google.com with SMTP id a4so297624qto.12 for ; Thu, 05 Mar 2020 14:23:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scylladb-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1jZtoRYbVXDrwh/2SsGuuQ+1S73qrTlqis8A9SuO83E=; b=YJzCpnxeTzLkbGVSG2DLH7DKyC+jZ+IVVNBQCa+7ysGwZLEWmubh2wts0EPt4XGvEK MWUegFeyKrEdK4CHjD72DWztQ6EwR2ZYfrFwwDgE9a2R5crWO7xP3a2ZV32eApkzonra dlMmMEkXgl9hqTvVQ5aGHq0axDkEryYg44KL8h66vSpw4vJdRExTDx2E1rxF4uM2RL9i a6d8VeKpuecFRADn4UTLLnUYabhsblQ3AydvEvpk6VidRt27G4qaJER6RR5J04mRbk23 qHZ2aGDctqgFMNThZFrbmtdo4HFhlWb9NNoHUnrEyC5i1rGw3kWz8tbZbS5qeJcljyXt WWig== 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:mime-version :content-transfer-encoding; bh=1jZtoRYbVXDrwh/2SsGuuQ+1S73qrTlqis8A9SuO83E=; b=m1Cfk9KD5kkxKCaTOtxQ5tRBk2CTrRYIpGMNSOWoYzfdxg+8/A7ObQFvVnUDFx19CD LNKcSR/ZJiLqrg6TBVwtTO7yghQF/srzEhbNim7hfS8i5ABmIAn/5o5jTD753Cz2tJsJ /ogwqbS9rwekMNmrElPVDLAwT5FVhtI1Am4Ow4BwtvThGA0um9daxUKzzW60op2tyMxU Df9DDL6j5sC8odx7vuLZLgKY8JsSYyh4ytC59248FMfHvlnKipiNZHq7P2WCWtYAyjcW vO2QhcMJ+x6mDcTEk9kkezdYVk4JldTDrpHRPPG72fE7g34k8tTmkDwwOo1rPlfRbIlz PeBQ== X-Gm-Message-State: ANhLgQ1YcteylAEkwNCJWvj4mEbu78T3d3bZSA5eJZFEtmLS+wPTor60 NIuZ0yNojrM50xUVnZY1T5ImJRC/4E64IQ== X-Google-Smtp-Source: ADFU+vsIvXxQSvMcXIsJfmr89iSK9QNehKb+cyG66XPkwnPxLANhNCq9GGlz03IYPDdUozjsfNAi2A== X-Received: by 2002:aed:2519:: with SMTP id v25mr403743qtc.176.1583447016972; Thu, 05 Mar 2020 14:23:36 -0800 (PST) Received: from localhost.localdomain (ool-2f14799e.dyn.optonline.net. [47.20.121.158]) by smtp.googlemail.com with ESMTPSA id o23sm6820280qtt.19.2020.03.05.14.23.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2020 14:23:36 -0800 (PST) From: Vlad Zolotarov To: dev@dpdk.org Cc: Vlad Zolotarov Date: Thu, 5 Mar 2020 17:23:33 -0500 Message-Id: <20200305222333.18784-1-vladz@scylladb.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v1] ena_ethdev: don't override the user provided queue length 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" There is a funny logic that seems to be outdated which tries to detect a situation when a user requests a default size of the queue and configures a device specific default value. This seems to be not in line with the DPDK current design that expects the user to go via the rte_eth_dev_info_get() in order to get device specific values. And if the user doesn't care it should pass 0 as a queue length and this case is also being taken care of on the rte_eth level. Signed-off-by: Vlad Zolotarov --- drivers/net/ena/ena_ethdev.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 665afee4f..bf632dee0 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -1221,9 +1221,6 @@ static int ena_tx_queue_setup(struct rte_eth_dev *dev, return -EINVAL; } - if (nb_desc == RTE_ETH_DEV_FALLBACK_TX_RINGSIZE) - nb_desc = adapter->tx_ring_size; - txq->port_id = dev->data->port_id; txq->next_to_clean = 0; txq->next_to_use = 0; @@ -1292,9 +1289,6 @@ static int ena_rx_queue_setup(struct rte_eth_dev *dev, return ENA_COM_FAULT; } - if (nb_desc == RTE_ETH_DEV_FALLBACK_RX_RINGSIZE) - nb_desc = adapter->rx_ring_size; - if (!rte_is_power_of_2(nb_desc)) { PMD_DRV_LOG(ERR, "Unsupported size of RX queue: %d is not a power of 2.\n", -- 2.20.1