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 CFE7FA04A3 for ; Tue, 16 Jun 2020 15:33:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 493B41BF7F; Tue, 16 Jun 2020 15:33:16 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 48B8D1BF7B for ; Tue, 16 Jun 2020 15:33:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592314394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W9F7bErv+XLJzoULheSZbFRe20ZibC2cObp8osq1vFU=; b=DZNj6/8KMXJj6OJBF30FpZML94iQPPi10rC98kVll5QvqKXFcdpT5TP34BlFEoFEQVTA2C EbWpaTwLBqV0voN7QGtcqQJV+BS2bYv3mmtm2oVJSLL7XouY8/+S9A+sLebF4uJc3hbvKL ryZ73ymSho7vse684NT4AgYT5ypw4LQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-253-SMn2NwFpNFqfmaQHnZ7UAg-1; Tue, 16 Jun 2020 09:33:10 -0400 X-MC-Unique: SMn2NwFpNFqfmaQHnZ7UAg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B08C318585CC; Tue, 16 Jun 2020 13:33:09 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.205]) by smtp.corp.redhat.com (Postfix) with ESMTP id C847C5D9D3; Tue, 16 Jun 2020 13:33:08 +0000 (UTC) From: Kevin Traynor To: Thomas Monjalon Cc: Matan Azrad , dpdk stable Date: Tue, 16 Jun 2020 14:33:02 +0100 Message-Id: <20200616133304.6812-2-ktraynor@redhat.com> In-Reply-To: <20200616133304.6812-1-ktraynor@redhat.com> References: <20200616133304.6812-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'mlx5: fix build with -fno-common' has been queued to LTS release 18.11.9 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/19/20. 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. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/53a68781004e60d73a56856e5b8334b68769c9d8 Thanks. Kevin. --- >From 53a68781004e60d73a56856e5b8334b68769c9d8 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Mon, 15 Jun 2020 20:36:15 +0100 Subject: [PATCH] mlx5: fix build with -fno-common [ upstream commit 2889d38256906a5cbff717e7e524ec645c89c794 ] The variable storages of the same name are merged together if compiled with -fcommon. This is the default. This default behaviour allows to declare a variable in a header file and share the variable in every .o binaries thanks to merge at link-time. In the case of dlopen linking of the glue library, the pointer mlx5_glue is referencing the glue functions struct and is set after calling dlopen. If compiling with -fno-common (default in GCC 10), the variable must be declared as extern to avoid multiple re-definitions. In case the glue layer is split in glue library, the variable mlx5_glue needs to have its own storage for the rest of the PMD. Signed-off-by: Thomas Monjalon Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5.c | 4 ++++ drivers/net/mlx5/mlx5_glue.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 29370f58f0..649faad319 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -132,4 +132,8 @@ static rte_spinlock_t mlx5_shared_data_lock = RTE_SPINLOCK_INITIALIZER; int mlx5_logtype; +#ifdef MLX5_GLUE +const struct mlx5_glue *mlx5_glue; +#endif + /** * Prepare shared data between primary and secondary process. diff --git a/drivers/net/mlx5/mlx5_glue.h b/drivers/net/mlx5/mlx5_glue.h index 2d92ba8bcf..0ed754a070 100644 --- a/drivers/net/mlx5/mlx5_glue.h +++ b/drivers/net/mlx5/mlx5_glue.h @@ -167,5 +167,5 @@ struct mlx5_glue { }; -const struct mlx5_glue *mlx5_glue; +extern const struct mlx5_glue *mlx5_glue; #endif /* MLX5_GLUE_H_ */ -- 2.21.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-06-16 14:31:16.011171920 +0100 +++ 0002-mlx5-fix-build-with-fno-common.patch 2020-06-16 14:31:15.914226651 +0100 @@ -1 +1 @@ -From 2889d38256906a5cbff717e7e524ec645c89c794 Mon Sep 17 00:00:00 2001 +From 53a68781004e60d73a56856e5b8334b68769c9d8 Mon Sep 17 00:00:00 2001 @@ -3,2 +3,4 @@ -Date: Wed, 8 Apr 2020 02:08:59 +0200 -Subject: [PATCH] common/mlx5: fix build with -fno-common +Date: Mon, 15 Jun 2020 20:36:15 +0100 +Subject: [PATCH] mlx5: fix build with -fno-common + +[ upstream commit 2889d38256906a5cbff717e7e524ec645c89c794 ] @@ -20,2 +21,0 @@ -Cc: stable@dpdk.org - @@ -25,10 +25,10 @@ - drivers/common/mlx5/mlx5_common.c | 3 +++ - drivers/common/mlx5/mlx5_glue.h | 2 +- - 2 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c -index d8c01a5d14..42610459f7 100644 ---- a/drivers/common/mlx5/mlx5_common.c -+++ b/drivers/common/mlx5/mlx5_common.c -@@ -19,4 +19,7 @@ - int mlx5_common_logtype; + drivers/net/mlx5/mlx5.c | 4 ++++ + drivers/net/mlx5/mlx5_glue.h | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c +index 29370f58f0..649faad319 100644 +--- a/drivers/net/mlx5/mlx5.c ++++ b/drivers/net/mlx5/mlx5.c +@@ -132,4 +132,8 @@ static rte_spinlock_t mlx5_shared_data_lock = RTE_SPINLOCK_INITIALIZER; + int mlx5_logtype; @@ -39 +39 @@ - ++ @@ -41,5 +41,6 @@ -diff --git a/drivers/common/mlx5/mlx5_glue.h b/drivers/common/mlx5/mlx5_glue.h -index cd1136f382..184c41071e 100644 ---- a/drivers/common/mlx5/mlx5_glue.h -+++ b/drivers/common/mlx5/mlx5_glue.h -@@ -305,5 +305,5 @@ struct mlx5_glue { + * Prepare shared data between primary and secondary process. +diff --git a/drivers/net/mlx5/mlx5_glue.h b/drivers/net/mlx5/mlx5_glue.h +index 2d92ba8bcf..0ed754a070 100644 +--- a/drivers/net/mlx5/mlx5_glue.h ++++ b/drivers/net/mlx5/mlx5_glue.h +@@ -167,5 +167,5 @@ struct mlx5_glue {