From patchwork Mon Oct 26 17:24:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bing Zhao X-Patchwork-Id: 82219 X-Patchwork-Delegate: rasland@nvidia.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8B92FA04DD; Mon, 26 Oct 2020 18:24:57 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E13581E2B; Mon, 26 Oct 2020 18:24:54 +0100 (CET) Received: from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130]) by dpdk.org (Postfix) with ESMTP id 10E1B1D9E for ; Mon, 26 Oct 2020 18:24:53 +0100 (CET) From: Bing Zhao To: viacheslavo@mellanox.com, matan@mellanox.com Cc: dev@dpdk.org, orika@nvidia.com, rasland@nvidia.com, andreyv@nvidia.com Date: Tue, 27 Oct 2020 01:24:45 +0800 Message-Id: <1603733085-271968-1-git-send-email-bingz@nvidia.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] net/mlx5: fix bit field compiling error 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" Some old compilers and old specification will not support bit field with other types except integer or unsigned integer. Since the next and previous items are 64b and/or 32b aligned, bit field with "unsigned char" type will not save any space and the compiler will complain. Changing it to "unsigned int" type bit field will solve the issue. Fixes: f711b60d400b ("net/mlx5: modify hash Rx queue objects") Cc: andreyv@nvidia.com Signed-off-by: Bing Zhao --- drivers/net/mlx5/mlx5.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index c537af9..e5640c1 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -733,7 +733,7 @@ struct mlx5_ind_table_obj { struct mlx5_hrxq { ILIST_ENTRY(uint32_t)next; /* Index to the next element. */ rte_atomic32_t refcnt; /* Reference counter. */ - uint8_t shared:1; /* This object used in shared action. */ + uint32_t shared:1; /* This object used in shared action. */ struct mlx5_ind_table_obj *ind_table; /* Indirection table. */ RTE_STD_C11 union {