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 067B6A0597; Wed, 8 Apr 2020 10:30:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E2C571C0CA; Wed, 8 Apr 2020 10:29:36 +0200 (CEST) Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by dpdk.org (Postfix) with ESMTP id 95F7C1C0B2 for ; Wed, 8 Apr 2020 10:29:32 +0200 (CEST) Received: by mail-lj1-f195.google.com with SMTP id r24so6697694ljd.4 for ; Wed, 08 Apr 2020 01:29:32 -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=+sLIOXCx5PseK1IYCcMb8oM57EVHYgxEVkT3VBtq9AI=; b=m7RJIrJMZNTcJzqbFpXL9IP9UeK9bAyEp8IdTnj6CxZ5AswPnZ5+YkS90HeVwcGrTh PHjHXsoUj1VHwixRlLqkekSpMWko4jgARIQ2syeNH9RswUAc4t+v2Ab4T1Mx+7Kws8Ow PxxdIS/lt+rFvbMxDOOYlUpPr7LYuXfjmpfrjBPT9oE9Y+NQHh4mqGrj+74Lg0yvx9uO J/YfoqMd5E/EA1UO2vZ4b3H36muSRsD2D0+hBl5m9Itz+AfElwsOfmp+SMbZqhBi0h5Y NGaOjJP7RAIr5VMpSW2J8N771Odortba4LE6alNYkR9GXnOzWRagzvqZM0+LgDFkmuaZ JN5A== 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=+sLIOXCx5PseK1IYCcMb8oM57EVHYgxEVkT3VBtq9AI=; b=TBykAk4m1QopT/c0bFMG4g7xcOAMzhWKY653vWdiQnXBi2g3mdcKXV5Osu2lZeEMzq RxzQuVl8AyEcGU5N0fWc469CNmclV/4JTSoXH1G0VglklIuc6ZcFO7rw2Da6G7K6dVsw 7FSqDzU9naCl+sqxjDjI7WJf7FgtDpNWU9DvndStW2MvfYNfNrnZFelNU8AJmfUlIjC+ MTZdPCXIC+f5u3Br4okJ7i4hd5bcpWOy9d7esqSdr82Q1mxBRmFm1FeAKZe859n6pM9l 6ihhPfmRKK3Pqei3JvVWvOTA5go7lbiVaRiQuIx3QPbxbwPQsteAj2K5Ek5nPSsWoeU0 4mLQ== X-Gm-Message-State: AGi0PuZ6CkiyIHGe0XMzyxHlM+CFhZ49IyhqWU1ejo6xUp2A4Tuqalhp BhwrFFPmWf0K4Uajki5IEpBiAh1hGhI= X-Google-Smtp-Source: APiQypIwwPmnYucpY4sdUEPuQghRySu6nfHqbXxmMS3JwBcgbpiRUJba3wszWPqmW4fc0VjlEJiqQQ== X-Received: by 2002:a2e:91da:: with SMTP id u26mr4368101ljg.232.1586334571972; Wed, 08 Apr 2020 01:29:31 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2020 01:29:31 -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 Date: Wed, 8 Apr 2020 10:28:57 +0200 Message-Id: <20200408082921.31000-7-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 06/30] net/ena/base: remove conversion of the ind tbl 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" After the indirection table is being saved in the device, there is no need to convert it back, as it's already saved in host_rss_ind_tbl array. As a result, the call to the ena_com_ind_tbl_convert_from_device() is not needed. Signed-off-by: Michal Krawczyk --- v3: * This patch was added - previously part of the v2-04 drivers/net/ena/base/ena_com.c | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c index 04f5d21d6f..d500e1ddfb 100644 --- a/drivers/net/ena/base/ena_com.c +++ b/drivers/net/ena/base/ena_com.c @@ -1279,30 +1279,6 @@ static int ena_com_ind_tbl_convert_to_device(struct ena_com_dev *ena_dev) return 0; } -static int ena_com_ind_tbl_convert_from_device(struct ena_com_dev *ena_dev) -{ - u16 dev_idx_to_host_tbl[ENA_TOTAL_NUM_QUEUES] = { (u16)-1 }; - struct ena_rss *rss = &ena_dev->rss; - u8 idx; - u16 i; - - for (i = 0; i < ENA_TOTAL_NUM_QUEUES; i++) - dev_idx_to_host_tbl[ena_dev->io_sq_queues[i].idx] = i; - - for (i = 0; i < 1 << rss->tbl_log_size; i++) { - if (rss->rss_ind_tbl[i].cq_idx > ENA_TOTAL_NUM_QUEUES) - return ENA_COM_INVAL; - idx = (u8)rss->rss_ind_tbl[i].cq_idx; - - if (dev_idx_to_host_tbl[idx] > ENA_TOTAL_NUM_QUEUES) - return ENA_COM_INVAL; - - rss->host_rss_ind_tbl[i] = dev_idx_to_host_tbl[idx]; - } - - return 0; -} - static int ena_com_init_interrupt_moderation_table(struct ena_com_dev *ena_dev) { size_t size; @@ -2735,10 +2711,6 @@ int ena_com_indirect_table_get(struct ena_com_dev *ena_dev, u32 *ind_tbl) if (!ind_tbl) return 0; - rc = ena_com_ind_tbl_convert_from_device(ena_dev); - if (unlikely(rc)) - return rc; - for (i = 0; i < (1 << rss->tbl_log_size); i++) ind_tbl[i] = rss->host_rss_ind_tbl[i]; -- 2.20.1