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 096B9A2EDB for ; Wed, 2 Oct 2019 07:57:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5A4351BF01; Wed, 2 Oct 2019 07:55:06 +0200 (CEST) Received: from rnd-relay.smtp.broadcom.com (unknown [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 7CF512C02 for ; Wed, 2 Oct 2019 07:54:32 +0200 (CEST) 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 3F06730D4F8; Tue, 1 Oct 2019 22:53:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 3F06730D4F8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1569995601; bh=IuYMQ9cQ2qaUwuOUY1fhN5hTv59nyo2+n+8civNP0SE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rLY9ktFh/IcnGW7qbX8afBdUN1wGGy1gNnAg0OgoRWrAmNWI0z8j2zE0B+zHdDjqN 7V4x8CmPMnRWUnjm9hkBlrt7/gSZE06AXRTuOhmkVq+TK4zoVbvdjHSqIwIQHCGLZw RR2AsAWYXhpf7kUSlJuLXBCpAgROOSlyAsdXLbq4= Received: from localhost.localdomain (unknown [10.230.30.225]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 515DD140069; Tue, 1 Oct 2019 22:54:31 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Kalesh AP , Somnath Kotur Date: Tue, 1 Oct 2019 22:54:23 -0700 Message-Id: <20191002055423.99659-18-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20191002055423.99659-1-ajit.khaparde@broadcom.com> References: <20191002055423.99659-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 17/17] net/bnxt: use macro for getting default vnic 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: Kalesh AP Minor code cleanup. BNXT_GET_DEFAULT_VNIC macro returns the default VNIC of the function and fixed code to use the macro. Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index b3a37e1554..bc9a910ee3 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -1118,7 +1118,7 @@ static int bnxt_promiscuous_enable_op(struct rte_eth_dev *eth_dev) if (bp->vnic_info == NULL) return 0; - vnic = &bp->vnic_info[0]; + vnic = BNXT_GET_DEFAULT_VNIC(bp); old_flags = vnic->flags; vnic->flags |= BNXT_VNIC_INFO_PROMISC; @@ -1143,7 +1143,7 @@ static int bnxt_promiscuous_disable_op(struct rte_eth_dev *eth_dev) if (bp->vnic_info == NULL) return 0; - vnic = &bp->vnic_info[0]; + vnic = BNXT_GET_DEFAULT_VNIC(bp); old_flags = vnic->flags; vnic->flags &= ~BNXT_VNIC_INFO_PROMISC; @@ -1168,7 +1168,7 @@ static int bnxt_allmulticast_enable_op(struct rte_eth_dev *eth_dev) if (bp->vnic_info == NULL) return 0; - vnic = &bp->vnic_info[0]; + vnic = BNXT_GET_DEFAULT_VNIC(bp); old_flags = vnic->flags; vnic->flags |= BNXT_VNIC_INFO_ALLMULTI; @@ -1193,7 +1193,7 @@ static int bnxt_allmulticast_disable_op(struct rte_eth_dev *eth_dev) if (bp->vnic_info == NULL) return 0; - vnic = &bp->vnic_info[0]; + vnic = BNXT_GET_DEFAULT_VNIC(bp); old_flags = vnic->flags; vnic->flags &= ~BNXT_VNIC_INFO_ALLMULTI; @@ -1960,7 +1960,7 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev, if (rc) return rc; - vnic = &bp->vnic_info[0]; + vnic = BNXT_GET_DEFAULT_VNIC(bp); if (nb_mc_addr > BNXT_MAX_MC_ADDRS) { vnic->flags |= BNXT_VNIC_INFO_ALLMULTI; -- 2.20.1 (Apple Git-117)