From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 8EDE4AABD for ; Tue, 17 Apr 2018 03:11:41 +0200 (CEST) Received: from nis-sj1-27.broadcom.com (nis-sj1-27.lvn.broadcom.net [10.75.144.136]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id AB65E30C00B for ; Mon, 16 Apr 2018 18:11:40 -0700 (PDT) Received: from C02VPB22HTD6.vpn.broadcom.net (unknown [10.10.117.92]) by nis-sj1-27.broadcom.com (Postfix) with ESMTP id 406F0AC076E for ; Mon, 16 Apr 2018 18:11:40 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Date: Mon, 16 Apr 2018 18:11:24 -0700 Message-Id: <20180417011126.12622-13-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.15.1 (Apple Git-101) In-Reply-To: <20180417011126.12622-1-ajit.khaparde@broadcom.com> References: <20180417011126.12622-1-ajit.khaparde@broadcom.com> Subject: [dpdk-dev] [PATCH 12/14] net/bnxt: use UINT64_MAX to initialize filter ids 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: , X-List-Received-Date: Tue, 17 Apr 2018 01:11:42 -0000 Use UINT64_MAX to initialize l2, ntuple, em filter_id fields instead of hardcoded -1; Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_filter.c | 8 ++++---- drivers/net/bnxt/bnxt_hwrm.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c index c92806b4f..9351460c2 100644 --- a/drivers/net/bnxt/bnxt_filter.c +++ b/drivers/net/bnxt/bnxt_filter.c @@ -68,9 +68,9 @@ void bnxt_init_filters(struct bnxt *bp) STAILQ_INIT(&bp->free_filter_list); for (i = 0; i < max_filters; i++) { filter = &bp->filter_info[i]; - filter->fw_l2_filter_id = -1; - filter->fw_em_filter_id = -1; - filter->fw_ntuple_filter_id = -1; + filter->fw_l2_filter_id = UINT64_MAX; + filter->fw_em_filter_id = UINT64_MAX; + filter->fw_ntuple_filter_id = UINT64_MAX; STAILQ_INSERT_TAIL(&bp->free_filter_list, filter, next); } } @@ -963,7 +963,7 @@ bnxt_flow_validate(struct rte_eth_dev *dev, ret = bnxt_validate_and_parse_flow(dev, pattern, actions, attr, error, filter); /* No need to hold on to this filter if we are just validating flow */ - filter->fw_l2_filter_id = -1; + filter->fw_l2_filter_id = UINT64_MAX; bnxt_free_filter(bp, filter); return ret; diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index c7a6157d9..11204bf42 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -317,7 +317,7 @@ int bnxt_hwrm_clear_l2_filter(struct bnxt *bp, HWRM_CHECK_RESULT(); HWRM_UNLOCK(); - filter->fw_l2_filter_id = -1; + filter->fw_l2_filter_id = UINT64_MAX; return 0; } @@ -3583,8 +3583,8 @@ int bnxt_hwrm_clear_em_filter(struct bnxt *bp, struct bnxt_filter_info *filter) HWRM_CHECK_RESULT(); HWRM_UNLOCK(); - filter->fw_em_filter_id = -1; - filter->fw_l2_filter_id = -1; + filter->fw_em_filter_id = UINT64_MAX; + filter->fw_l2_filter_id = UINT64_MAX; return 0; } @@ -3695,7 +3695,7 @@ int bnxt_hwrm_clear_ntuple_filter(struct bnxt *bp, HWRM_CHECK_RESULT(); HWRM_UNLOCK(); - filter->fw_ntuple_filter_id = -1; + filter->fw_ntuple_filter_id = UINT64_MAX; filter->fw_l2_filter_id = UINT64_MAX; return 0; -- 2.15.1 (Apple Git-101)