From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 44071A0096 for ; Sun, 2 Jun 2019 19:43:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 33D0B1B96B; Sun, 2 Jun 2019 19:43:14 +0200 (CEST) Received: from mail-yb1-f196.google.com (mail-yb1-f196.google.com [209.85.219.196]) by dpdk.org (Postfix) with ESMTP id 48EDA5424 for ; Sun, 2 Jun 2019 19:43:07 +0200 (CEST) Received: by mail-yb1-f196.google.com with SMTP id x187so3187586ybc.11 for ; Sun, 02 Jun 2019 10:43:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kyXr9Uju49QG6C38sFxJkWrv7PcK76G/hgLCSFOV4s8=; b=MAD4KlCPEfwmsXKw1uABDQ0RaNWkhn1SOZDaoF/8tbCuycYQXJqn8AV3ztpFB6JbiW cwQQcdjd41lGiypEoWSFVxcnX9OCl41b3e5CmYwGvKtGf1ox9cVMMT9ZxssIHTa41MMQ PqlWno+KwSb1h/YFRXSjYUAFVWxUn9olpEMww= 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; bh=kyXr9Uju49QG6C38sFxJkWrv7PcK76G/hgLCSFOV4s8=; b=m8UvTA4zzUYd02109bt7OgxE5htQgq/tSxz2Zi+txZymcqTEzzEkJPUg5zKYawkA4I v+ij4hjczC3QDNuCH5DU6mg1ALRdkpMq1B6QLKvxxc0vfCElXrE2ykiL3j+LvFSF2DMO fPHY2iu3FJZBJdkHsOYbjstNA5/HF42Chioz0Yfo8mF/TSTl3WwreU7ZVCwVs3Q5F7h3 ru+s5Yu/aV/v6TjGWYVG62D30umqErpx3bKvhHCwo+3F+T4IaDXu8cwJ8AoAq0AMIzDY kRRkc8SL98mbUUoP4HCxmFJySEAxjC/8smejbLxa4b0qU0lhH8LhBaiiGCtR0/lcp8nz OtHQ== X-Gm-Message-State: APjAAAVwSEtbYtVmXevcwnITg/8Rc2fnnAsIQSivgoZ35lDiEKtillp+ JvwO5+nFnPmcn6C8zuXpa2O8IhztsnH0XG1T0xvrHV6lilZUQz18LU7fa2cL4th+yvlffxyF/tT hdYiZIaHpREAF9Gimu1FSXg3kzJmUiG+ybTmjBWNbcilN+vuP/XIw5h3fuASuXv01 X-Google-Smtp-Source: APXvYqzq5sMbd2viOnzD6Y3tjCwUrp7bL52mAM0h+BV0nG9ooaKKfpV/LX6l8B0x4+YlhBPMZgCG5A== X-Received: by 2002:a25:8541:: with SMTP id f1mr11021368ybn.417.1559497386570; Sun, 02 Jun 2019 10:43:06 -0700 (PDT) Received: from lrichardson-VirtualBox.attlocal.net (69-218-223-106.lightspeed.rlghnc.sbcglobal.net. [69.218.223.106]) by smtp.gmail.com with ESMTPSA id n78sm1000819ywd.2.2019.06.02.10.43.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Jun 2019 10:43:05 -0700 (PDT) From: Lance Richardson To: dev@dpdk.org Cc: ajit.khaparde@broadcom.com, ferruh.yigit@intel.com, Lance Richardson , stable@dpdk.org Date: Sun, 2 Jun 2019 13:42:38 -0400 Message-Id: <20190602174247.32368-4-lance.richardson@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190602174247.32368-1-lance.richardson@broadcom.com> References: <20190602174247.32368-1-lance.richardson@broadcom.com> Subject: [dpdk-dev] [PATCH 03/11] net/bnxt: fix width in stats ctx endian conversion 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" Use 32-bit conversion width when converting to 32-bit values. Fixes: 6371b91fb66d ("net/bnxt: add ring alloc/free") Cc: stable@dpdk.org Signed-off-by: Lance Richardson Reviewed-by: Ajit Kumar Khaparde --- drivers/net/bnxt/bnxt_hwrm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 8db18ea61..e88719d06 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -1109,7 +1109,7 @@ int bnxt_hwrm_ring_alloc(struct bnxt *bp, case HWRM_RING_ALLOC_INPUT_RING_TYPE_RX: req.ring_type = ring_type; req.cmpl_ring_id = rte_cpu_to_le_16(cmpl_ring_id); - req.stat_ctx_id = rte_cpu_to_le_16(stats_ctx_id); + req.stat_ctx_id = rte_cpu_to_le_32(stats_ctx_id); if (stats_ctx_id != INVALID_STATS_CTX_ID) enables |= HWRM_RING_ALLOC_INPUT_ENABLES_STAT_CTX_ID_VALID; @@ -1259,7 +1259,7 @@ int bnxt_hwrm_stat_clear(struct bnxt *bp, struct bnxt_cp_ring_info *cpr) HWRM_PREP(req, STAT_CTX_CLR_STATS, BNXT_USE_CHIMP_MB); - req.stat_ctx_id = rte_cpu_to_le_16(cpr->hw_stats_ctx_id); + req.stat_ctx_id = rte_cpu_to_le_32(cpr->hw_stats_ctx_id); rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB); @@ -1287,7 +1287,7 @@ int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, HWRM_CHECK_RESULT(); - cpr->hw_stats_ctx_id = rte_le_to_cpu_16(resp->stat_ctx_id); + cpr->hw_stats_ctx_id = rte_le_to_cpu_32(resp->stat_ctx_id); HWRM_UNLOCK(); @@ -1303,7 +1303,7 @@ int bnxt_hwrm_stat_ctx_free(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, HWRM_PREP(req, STAT_CTX_FREE, BNXT_USE_CHIMP_MB); - req.stat_ctx_id = rte_cpu_to_le_16(cpr->hw_stats_ctx_id); + req.stat_ctx_id = rte_cpu_to_le_32(cpr->hw_stats_ctx_id); rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB); -- 2.17.1