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 7B8BEA04B3; Tue, 28 Jan 2020 08:31:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C4CE31C0D5; Tue, 28 Jan 2020 08:30:51 +0100 (CET) Received: from relay.smtp.broadcom.com (unknown [192.19.211.62]) by dpdk.org (Postfix) with ESMTP id D572D1C0C9 for ; Tue, 28 Jan 2020 08:30:47 +0100 (CET) Received: from dhcp-10-123-153-55.dhcp.broadcom.net (bgccx-dev-host-lnx35.bec.broadcom.net [10.123.153.55]) by relay.smtp.broadcom.com (Postfix) with ESMTP id EFF842904F4; Mon, 27 Jan 2020 23:30:46 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com EFF842904F4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1580196647; bh=/KleoL/IXTYZ9+95qAYZR8bermH+kVyi20yZveac+zY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DHTvE6Xn/zHFM7opJaQN8mJJpZTF+W0MoxwaNl7KyKOqPKzltn5RJ067ozVyRgZS+ ENwV/wQiTL1Ervk0OZfQY6FNl0yA78Usglii8QDvaaCxFVh1EzaFhaLDC7To7ZHXlG F9FuQcdOqhb2rJ6uMZoTFceEHuaMxGOP/Aumae8A= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Tue, 28 Jan 2020 12:59:15 +0530 Message-Id: <20200128072923.9912-2-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.10.1.613.g2cc2e70 In-Reply-To: <20200128072923.9912-1-somnath.kotur@broadcom.com> References: <20200128072923.9912-1-somnath.kotur@broadcom.com> Subject: [dpdk-dev] [PATCH 1/9] net/bnxt: fix bnxt_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" 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") Reviewed-by: Kalesh Anakkur Purayil Signed-off-by: Somnath Kotur --- 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 b31f104..e218433 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 */ -- 1.8.3.1