From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 39B7E1B4B7 for ; Thu, 29 Nov 2018 14:23:15 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9E86230A81AD; Thu, 29 Nov 2018 13:23:14 +0000 (UTC) Received: from ktraynor.remote.csb (ovpn-117-230.ams2.redhat.com [10.36.117.230]) by smtp.corp.redhat.com (Postfix) with ESMTP id 074E61001F50; Thu, 29 Nov 2018 13:23:12 +0000 (UTC) From: Kevin Traynor To: Ali Alnubani Cc: Shahaf Shuler , dpdk stable Date: Thu, 29 Nov 2018 13:20:45 +0000 Message-Id: <20181129132128.7609-45-ktraynor@redhat.com> In-Reply-To: <20181129132128.7609-1-ktraynor@redhat.com> References: <20181129132128.7609-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Thu, 29 Nov 2018 13:23:14 +0000 (UTC) Subject: [dpdk-stable] patch 'net/mlx4: fix initialization of struct members' has been queued to stable release 18.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 13:23:15 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/08/18. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From 131bde364fc068a58936376088b33377f9554fa1 Mon Sep 17 00:00:00 2001 From: Ali Alnubani Date: Tue, 13 Nov 2018 19:11:06 +0000 Subject: [PATCH] net/mlx4: fix initialization of struct members [ upstream commit d924d6b964d1dd4a720f61051c14507428b62e95 ] This patch fixes compilation errors with meson and the clang compiler caused by some of the struct members not being initialized. ``` ../drivers/net/mlx4/mlx4_mr.c:357:37: error: missing field 'end' initializer [-Werror,-Wmissing-field-initializers] struct mlx4_mr_cache entry = { 0, }; ^ ../drivers/net/mlx4/mlx4_mr.c:401:36: error: missing field 'end' initializer [-Werror,-Wmissing-field-initializers] struct mlx4_mr_cache ret = { 0, }; ^ ../drivers/net/mlx4/mlx4_mr.c:691:35: error: missing field 'end' initializer [-Werror,-Wmissing-field-initializers] struct mlx4_mr_cache ret = { 0, }; ^ ``` The compilation errors reproduce with clang version 3.4.2 (tags/RELEASE_34/dot2-final) on RHEL. Fixes: 9797bfcce1c9 ("net/mlx4: add new memory region support") Signed-off-by: Ali Alnubani Acked-by: Shahaf Shuler --- drivers/net/mlx4/mlx4_mr.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/mlx4/mlx4_mr.c b/drivers/net/mlx4/mlx4_mr.c index c2066ea4b..726788a60 100644 --- a/drivers/net/mlx4/mlx4_mr.c +++ b/drivers/net/mlx4/mlx4_mr.c @@ -355,6 +355,7 @@ mr_insert_dev_cache(struct rte_eth_dev *dev, struct mlx4_mr *mr) dev->data->port_id, (void *)mr); for (n = 0; n < mr->ms_bmp_n; ) { - struct mlx4_mr_cache entry = { 0, }; + struct mlx4_mr_cache entry; + memset(&entry, 0, sizeof(entry)); /* Find a contiguous chunk and advance the index. */ n = mr_find_next_chunk(mr, &entry, n); @@ -399,6 +400,7 @@ mr_lookup_dev_list(struct rte_eth_dev *dev, struct mlx4_mr_cache *entry, continue; for (n = 0; n < mr->ms_bmp_n; ) { - struct mlx4_mr_cache ret = { 0, }; + struct mlx4_mr_cache ret; + memset(&ret, 0, sizeof(ret)); n = mr_find_next_chunk(mr, &ret, n); if (addr >= ret.start && addr < ret.end) { @@ -689,6 +691,7 @@ alloc_resources: for (n = 0; n < ms_n; ++n) { uintptr_t start; - struct mlx4_mr_cache ret = { 0, }; + struct mlx4_mr_cache ret; + memset(&ret, 0, sizeof(ret)); start = data_re.start + n * msl->page_sz; /* Exclude memsegs already registered by other MRs. */ @@ -1278,6 +1281,7 @@ mlx4_mr_dump_dev(struct rte_eth_dev *dev) continue; for (n = 0; n < mr->ms_bmp_n; ) { - struct mlx4_mr_cache ret = { 0, }; + struct mlx4_mr_cache ret; + memset(&ret, 0, sizeof(ret)); n = mr_find_next_chunk(mr, &ret, n); if (!ret.end) -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-29 13:11:36.190289893 +0000 +++ 0044-net-mlx4-fix-initialization-of-struct-members.patch 2018-11-29 13:11:34.000000000 +0000 @@ -1,8 +1,10 @@ -From d924d6b964d1dd4a720f61051c14507428b62e95 Mon Sep 17 00:00:00 2001 +From 131bde364fc068a58936376088b33377f9554fa1 Mon Sep 17 00:00:00 2001 From: Ali Alnubani Date: Tue, 13 Nov 2018 19:11:06 +0000 Subject: [PATCH] net/mlx4: fix initialization of struct members +[ upstream commit d924d6b964d1dd4a720f61051c14507428b62e95 ] + This patch fixes compilation errors with meson and the clang compiler caused by some of the struct members not being initialized. @@ -26,7 +28,6 @@ clang version 3.4.2 (tags/RELEASE_34/dot2-final) on RHEL. Fixes: 9797bfcce1c9 ("net/mlx4: add new memory region support") -Cc: stable@dpdk.org Signed-off-by: Ali Alnubani Acked-by: Shahaf Shuler