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 76ED1A04B3; Tue, 28 Jan 2020 22:02:15 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2C9681D5AB; Tue, 28 Jan 2020 22:02:09 +0100 (CET) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 909EB1D5A5; Tue, 28 Jan 2020 22:02:05 +0100 (CET) Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.242.48]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id E226430C1FB; Tue, 28 Jan 2020 12:55:10 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com E226430C1FB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1580244910; bh=T2zE0TAjqDO25qF9UcTp1Q4syPGlTJKfhmgZop9Lgf8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JFNHBSHe4kXnj3KMz6hDYRa6/GqJwqUlJqqSMT5PV7WW1k+WT1r3wFqI28p9BhRmb Y2WUtI4qmpgH/LipqdasWta8TcQAaCclKitHohwpsb1Ot9c/+1WKDBi9o/3JtKXFhc 8o84aUaTI6J+7bgWkT13pQ9C6p1T1O3Dz+ELET1w= Received: from C02VPB22HTD6.wifi.broadcom.net (c02vpb22htd6.wifi.broadcom.net [10.69.74.102]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 682E914008D; Tue, 28 Jan 2020 13:02:04 -0800 (PST) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Somnath Kotur , stable@dpdk.org, Kalesh Anakkur Purayil Date: Tue, 28 Jan 2020 13:01:51 -0800 Message-Id: <20200128210159.6972-2-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122.2) In-Reply-To: <20200128210159.6972-1-ajit.khaparde@broadcom.com> References: <20200128072923.9912-1-somnath.kotur@broadcom.com> <20200128210159.6972-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 1/9] net/bnxt: fix alloc filter to use a common routine 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" From: Somnath Kotur Invoke bnxt_get_unused_filter() inside bnxt_alloc_filter() so that all filters are allocated from one common routine. Fixes: f92735db1e4c ("net/bnxt: add L2 filter alloc/init/free") Cc: stable@dpdk.org Reviewed-by: Kalesh Anakkur Purayil Signed-off-by: Somnath Kotur Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_filter.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c index b31f10479..e2184334f 100644 --- a/drivers/net/bnxt/bnxt_filter.c +++ b/drivers/net/bnxt/bnxt_filter.c @@ -26,13 +26,11 @@ struct bnxt_filter_info *bnxt_alloc_filter(struct bnxt *bp) { struct bnxt_filter_info *filter; - /* Find the 1st unused filter from the free_filter_list pool*/ - filter = STAILQ_FIRST(&bp->free_filter_list); + filter = bnxt_get_unused_filter(bp); if (!filter) { PMD_DRV_LOG(ERR, "No more free filter resources\n"); return NULL; } - STAILQ_REMOVE_HEAD(&bp->free_filter_list, next); filter->mac_index = INVALID_MAC_INDEX; /* Default to L2 MAC Addr filter */ -- 2.21.0 (Apple Git-122.2)