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 4504AA0093 for ; Tue, 19 May 2020 15:10:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1F19F1D6D5; Tue, 19 May 2020 15:10:01 +0200 (CEST) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 46DD11D6C9 for ; Tue, 19 May 2020 15:10:00 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id w7so15787306wre.13 for ; Tue, 19 May 2020 06:10:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BS+hUSZGL4V9e58xox8RQ3YxG0pzsq2G5kBvjysV1Ro=; b=Jye40tdIL/a9r6s03UDCMaQrl/RsnWipF2H8mT842Lfkukrl/IkBRiH4unaj3cBR3+ JhQGfZpFo0YUzCcRbecVzE7D1lTJMYGcu0BCwVD/XaXZUkzgr0av4LZm/ttc2xzpsef2 kcSdLl50hfKWVuod6vCsZnByO72JuQVdIqNXNFxkesWz4TQkvVQF3Lald84etpP8LulJ w+CQpNHDhNw13EuKtGLKIsx6nBVnYnbwskJs+9rVBS2L17B0yAtwwi1sojgyG7bFKigg xAhsBRwf91wDUKV4aIc0ilTCiuqnTnaamNUoJTZ1EUU8D53dgTaklYLC/9XTh86HxDYz Mk5Q== 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:mime-version:content-transfer-encoding; bh=BS+hUSZGL4V9e58xox8RQ3YxG0pzsq2G5kBvjysV1Ro=; b=X6dNa2mfjjLJGAXRbTH5W7Vj1vVrA2xhpba6Uc90p67JQNnoMYPEaldXSFXETJT6MO bC4c5PHL74KTOxUBX0Bglmr3b6AKStSjxTNXNEt8M9mk2XE8OffgVRe8IhIghvcHQ5UP kkoK+ZdZNEh29oQqALXjBqpG2m77Dv8eoXznKvxa0sz3hidj6NJ1nhVTgCcz8mDXxV0Q bYww6lnGzsQ3DJpYxrlrgO0TOIugB+upSV/UFa3S521aJr6Tx12qsgJZJHjXtm7kBhie crbfmt8mTwg0y1Qw5W841mY8auydRsPyqnEJVzbX1XXIByybmVyvGg6DB9k93TTElDX1 TaEw== X-Gm-Message-State: AOAM532pIR17wpZlD1/AHLtpayLHm1gGAnNqRJx1PzXcfwu2BVKehZKH UXtiYsY7JvzsbpBTIqsmkKc= X-Google-Smtp-Source: ABdhPJwLUmtNZUvdfwyzYJhSfPZU7p/vHStf2MWJuqW+/x5dTKuJtFDMAiek15NN+F5iwXGoDkONzQ== X-Received: by 2002:a5d:5706:: with SMTP id a6mr24653355wrv.141.1589893799978; Tue, 19 May 2020 06:09:59 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id y207sm4344001wmd.7.2020.05.19.06.09.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:09:59 -0700 (PDT) From: luca.boccassi@gmail.com To: Thomas Monjalon Cc: Matan Azrad , dpdk stable Date: Tue, 19 May 2020 14:03:35 +0100 Message-Id: <20200519130549.112823-80-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519130549.112823-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> <20200519130549.112823-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx4: fix build with -fno-common' has been queued to stable release 19.11.3 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 stable release 19.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/21/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. Thanks. Luca Boccassi --- >From 624db5a0ab8e9cddd0f2322bb2c840e71f2e780e Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Wed, 8 Apr 2020 02:09:00 +0200 Subject: [PATCH] net/mlx4: fix build with -fno-common [ upstream commit a5e5af7f20b4106b68eeedf83daada0371b83918 ] 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 mlx4_glue is referencing the glue functions struct and is set after calling dlopen. If compiling with -fno-common (default in GCC 10), the variables must be declared as extern to avoid multiple re-definitions. In case the glue layer is split in glue library, the variable mlx4_glue needs to have its own storage for the rest of the PMD. Signed-off-by: Thomas Monjalon Acked-by: Matan Azrad --- drivers/net/mlx4/mlx4.c | 4 ++++ drivers/net/mlx4/mlx4_glue.h | 2 +- drivers/net/mlx4/mlx4_rxtx.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index ab5e6c66cb..7771417ebe 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -49,6 +49,10 @@ #include "mlx4_rxtx.h" #include "mlx4_utils.h" +#ifdef MLX4_GLUE +const struct mlx4_glue *mlx4_glue; +#endif + static const char *MZ_MLX4_PMD_SHARED_DATA = "mlx4_pmd_shared_data"; /* Shared memory between primary and secondary processes. */ diff --git a/drivers/net/mlx4/mlx4_glue.h b/drivers/net/mlx4/mlx4_glue.h index 668ca86700..5d9e985495 100644 --- a/drivers/net/mlx4/mlx4_glue.h +++ b/drivers/net/mlx4/mlx4_glue.h @@ -84,6 +84,6 @@ struct mlx4_glue { void *attr); }; -const struct mlx4_glue *mlx4_glue; +extern const struct mlx4_glue *mlx4_glue; #endif /* MLX4_GLUE_H_ */ diff --git a/drivers/net/mlx4/mlx4_rxtx.h b/drivers/net/mlx4/mlx4_rxtx.h index 8baf33fa94..9de6c59411 100644 --- a/drivers/net/mlx4/mlx4_rxtx.h +++ b/drivers/net/mlx4/mlx4_rxtx.h @@ -124,7 +124,7 @@ struct txq { /* mlx4_rxq.c */ -uint8_t mlx4_rss_hash_key_default[MLX4_RSS_HASH_KEY_SIZE]; +extern uint8_t mlx4_rss_hash_key_default[MLX4_RSS_HASH_KEY_SIZE]; int mlx4_rss_init(struct mlx4_priv *priv); void mlx4_rss_deinit(struct mlx4_priv *priv); struct mlx4_rss *mlx4_rss_get(struct mlx4_priv *priv, uint64_t fields, -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 14:04:47.718686898 +0100 +++ 0080-net-mlx4-fix-build-with-fno-common.patch 2020-05-19 14:04:44.248648953 +0100 @@ -1,8 +1,10 @@ -From a5e5af7f20b4106b68eeedf83daada0371b83918 Mon Sep 17 00:00:00 2001 +From 624db5a0ab8e9cddd0f2322bb2c840e71f2e780e Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Wed, 8 Apr 2020 02:09:00 +0200 Subject: [PATCH] net/mlx4: fix build with -fno-common +[ upstream commit a5e5af7f20b4106b68eeedf83daada0371b83918 ] + 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 @@ -17,8 +19,6 @@ In case the glue layer is split in glue library, the variable mlx4_glue needs to have its own storage for the rest of the PMD. -Cc: stable@dpdk.org - Signed-off-by: Thomas Monjalon Acked-by: Matan Azrad --- @@ -28,7 +28,7 @@ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c -index 8e298788af..5d7202720b 100644 +index ab5e6c66cb..7771417ebe 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -49,6 +49,10 @@