From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BBD06A0A0E for ; Mon, 10 May 2021 18:10:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AF6BF4003E; Mon, 10 May 2021 18:10:31 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2061.outbound.protection.outlook.com [40.107.237.61]) by mails.dpdk.org (Postfix) with ESMTP id 84A8D4003E for ; Mon, 10 May 2021 18:10:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tsq3T3qp2pOCg+veKeurmZJhusrVYQrOA5YvIfHMqjc9mPoavKOQ9fvT52pD9kn2V809qUlPbRt8dM5IjHimt+cUip/a3mvdz2IMsL37Csck93uZrAwWOk5NOhLe6Qh2yRp7bs/4bj0+xNf9SbZaKifylGymOFoXKCJtjTS2t2P3q+U8TGWvACHDeMlSA9EPhSCU4gK/mKcVNUEtwoQT+LZ1ACEqsnVzuiV0Z8PQpdc91Z/8IwFtIo8H3AdqoO8yf1O1QbReGDjYDEfoMIFQppgJx+8PQS84ZOwE3XPOlCuvT4HO9mIDW17xXJL9TAYLY/Xuz/Ry3z6D2k9SCzHD0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8j/EP0nYzDimLQW2hLzC1YUThJ+3HN4Im77z8v6WZEg=; b=aDGfDuyS3sbfXOMxDqL8syq/o1IBxet76Nw1tXsrEz2ci6AZyBlGU/mfZnSnmsM6tD434y2HxwWCWTiT5Ar7Kn04bsmNM+TvjJjAiY1jBauUG1BOnveBAV7BThDJKUk9YcYgAczTkg4wtFa+LjlUtb4AoAUNZ7KBTMCwj8POHCWKhu+kG9DQVVgX9K3HcANMWq85TDb7G0R66vG9tNJKk+mCtulsIRYC3PICTlymLVKhH8YYboZYs2DirMQLABpEJjZdwU+aJoocg+mI+ICcka/tIdMvHsYqld50uXjRAXSNyEyJKK2/Suvvawl8MWmIYPnPIm6FNJSO+V1g8DF9xw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=oktetlabs.ru smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8j/EP0nYzDimLQW2hLzC1YUThJ+3HN4Im77z8v6WZEg=; b=rbcw9lUwWCH/CYgd9eX6eYAvp79w9F6d6Z2zxkO3c/46FCulV7k659zelUen49hp7OJP4ipsuqFoXEikNZv+Kw7FKdqkrYUXFkVRiOh1hBvRf5J5EU6gMA38+tDb+E+tnDxiMhHv3xakoairtgZVT0MNrzGPmDX/AeryHHvMeO3WOaDMjdGMqkreyzLGwxnXXwy24SrUMq6QT6vnNt0xFFwriZJZny5VULZh0oYWC74kCZW4AxgDIm5lu/ZJQ0ZvJNQMiTAKkZ4MtKSxDhxQPn8ly3SsoS9s+ZqhB4rxR1C0CZeERCnfY9+C98HlJHBC4bgbTd44y+TVSfjY1v5tPQ== Received: from BN9PR03CA0598.namprd03.prod.outlook.com (2603:10b6:408:10d::33) by BY5PR12MB3857.namprd12.prod.outlook.com (2603:10b6:a03:196::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.26; Mon, 10 May 2021 16:10:28 +0000 Received: from BN8NAM11FT032.eop-nam11.prod.protection.outlook.com (2603:10b6:408:10d:cafe::93) by BN9PR03CA0598.outlook.office365.com (2603:10b6:408:10d::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:10:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; oktetlabs.ru; dkim=none (message not signed) header.d=none;oktetlabs.ru; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT032.mail.protection.outlook.com (10.13.177.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:10:28 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:10:24 +0000 From: Xueming Li To: Natanael Copa CC: Luca Boccassi , Thomas Monjalon , Andrew Rybchenko , David Marchand , dpdk stable Date: Tue, 11 May 2021 00:00:22 +0800 Message-ID: <20210510160258.30982-73-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8cba4c3e-db16-4d14-41da-08d913ce20b8 X-MS-TrafficTypeDiagnostic: BY5PR12MB3857: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lQtbIkFvLuNuTWWVYcdFUFIIxdcQtGHudfQ8b6vFGRj+QRdU95Wl7SgPESnZ+MrqtU26EN95yUM8ia/bw/5BuAZyeQMPocyZIue8dJa8L/f5/83tGF4sTDA57VD7PsCaOqEMId7Ys0OnWsjy7Wr++g6zBGpGqW5PuoHfJF3D+MhADvXKlF6ENdNEfDAF88gp1CfwxXyYMiB+3wZTzLYT1zv7CDZ8OpZ6otc2SQJB1w+0eUCvGgi79o7znjKooX5YpHyEhlD/4r0roiy3RmsD7unl05CMUpTKzVl+B5Bz9Kh/kMO85jhyFEmZfpODv+9ngi5NdZS4XfptyUUwIx2o8tNNAE2wuUy5x/Dod3b+P8crEFbHYM/3BPjzA5wnUB6NCM68Vr5hOUX4VW0bhqhHKj+3w3nkxkH+Ps4fAPoTurA2rsWVYXHbyD3PBiZpUiGRsYFXCobBowsfYdWdK2bg7Cg9S6TvI7bTtqNF2V3F3h0E9K/0y7/YJPmiaHQeeuCeN8rypn7Y0ONzSHz/MOlm5Bryyh+Xfz2ZQPDyy9WBAs96L52Fl0T3TatNfrQ3O0u7x3fKLFThdOEBYnlpPydN9xq8OK8lg5E7S46pp3S/aLZ6sr6hi4TzKPW62d/HM5IZ/4ZldqqNMgUXw3rgKXxUYfwuSY8F9aoxSlry3Up62t5cvVMmNZHVH6u9UXzFooNt3TyjeMz35w/z1hiRN3Cw/eX/X/HEpjLIiJ/XOTkkSyslnPdSJ6JlRN+uf6DB5sh6ln9eYOivsF1sFS+NRqiVRQ== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(376002)(396003)(136003)(39860400002)(346002)(46966006)(36840700001)(54906003)(70586007)(47076005)(53546011)(2906002)(16526019)(83380400001)(70206006)(5660300002)(1076003)(4326008)(316002)(82310400003)(8936002)(8676002)(186003)(55016002)(86362001)(7696005)(478600001)(36756003)(26005)(426003)(2616005)(82740400003)(6916009)(7636003)(966005)(36860700001)(6286002)(36906005)(356005)(336012); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:10:28.1013 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8cba4c3e-db16-4d14-41da-08d913ce20b8 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT032.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB3857 Subject: [dpdk-stable] patch 'bus/dpaa: fix build with musl' has been queued to stable release 20.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 20.11.2 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/12/21. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/fc4664ada56f15a73045f6222247522c17d3a53f Thanks. Xueming Li --- >From fc4664ada56f15a73045f6222247522c17d3a53f Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 5 Nov 2020 22:17:12 +0100 Subject: [PATCH] bus/dpaa: fix build with musl Cc: Luca Boccassi [ upstream commit e9fd4b87f08d4da01ea9bde075f02e702b65a784 ] The header files argp.h and error.h do not exist in musl libc. Fix build with musl libc by using err(3) instead of the GNU-specific error(3). We could have used the identical errx("...: %s", strerror(ret))` but strerror(3) is not thread-safe and the strerror_r variant has two incompatible versions, one GNU specific and one XSI-compliant. Avoid the mess by letting "err" use the thread-local errno. This also fixes error message for kzmalloc failures which previously would always have given "Unknown error -1", since that is what strerror(-1) returns. Let "err" use the proper error message from errno which is set by kzalloc. Fixes: 9d32ef0f5d61 ("bus/dpaa: support creating dynamic HW portal") Fixes: f09ede6c8fd1 ("bus/dpaa: add BMAN driver core") Fixes: 5b22cf744689 ("bus/dpaa: introducing FMan configurations") Fixes: 39f373cf015a ("bus/dpaa: add compatibility and helper macros") Signed-off-by: Natanael Copa Signed-off-by: Thomas Monjalon Acked-by: Andrew Rybchenko Acked-by: David Marchand --- drivers/bus/dpaa/base/fman/netcfg_layer.c | 4 ++-- drivers/bus/dpaa/base/qbman/bman_driver.c | 13 +++++++++---- drivers/bus/dpaa/base/qbman/qman_driver.c | 17 ++++++++++++----- drivers/bus/dpaa/include/netcfg.h | 1 - drivers/common/dpaax/compat.h | 1 - 5 files changed, 23 insertions(+), 13 deletions(-) diff --git a/drivers/bus/dpaa/base/fman/netcfg_layer.c b/drivers/bus/dpaa/base/fman/netcfg_layer.c index b7009f2299..120deb0bb6 100644 --- a/drivers/bus/dpaa/base/fman/netcfg_layer.c +++ b/drivers/bus/dpaa/base/fman/netcfg_layer.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -90,7 +90,7 @@ netcfg_acquire(void) */ skfd = socket(AF_PACKET, SOCK_RAW, 0); if (unlikely(skfd < 0)) { - error(0, errno, "%s(): open(SOCK_RAW)", __func__); + err(0, "%s(): open(SOCK_RAW)", __func__); return NULL; } diff --git a/drivers/bus/dpaa/base/qbman/bman_driver.c b/drivers/bus/dpaa/base/qbman/bman_driver.c index 750b756b93..ee35e03da1 100644 --- a/drivers/bus/dpaa/base/qbman/bman_driver.c +++ b/drivers/bus/dpaa/base/qbman/bman_driver.c @@ -11,6 +11,7 @@ #include #include "bman_priv.h" #include +#include /* * Global variables of the max portal/pool number this bman version supported @@ -40,7 +41,8 @@ static int fsl_bman_portal_init(uint32_t idx, int is_shared) ret = pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset); if (ret) { - error(0, ret, "pthread_getaffinity_np()"); + errno = ret; + err(0, "pthread_getaffinity_np()"); return ret; } pcfg.cpu = -1; @@ -60,7 +62,8 @@ static int fsl_bman_portal_init(uint32_t idx, int is_shared) map.index = idx; ret = process_portal_map(&map); if (ret) { - error(0, ret, "process_portal_map()"); + errno = ret; + err(0, "process_portal_map()"); return ret; } /* Make the portal's cache-[enabled|inhibited] regions */ @@ -104,8 +107,10 @@ static int fsl_bman_portal_finish(void) cfg = bman_destroy_affine_portal(); DPAA_BUG_ON(cfg != &pcfg); ret = process_portal_unmap(&map.addr); - if (ret) - error(0, ret, "process_portal_unmap()"); + if (ret) { + errno = ret; + err(0, "process_portal_unmap()"); + } return ret; } diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c index 6d9aaff164..dfbafe581a 100644 --- a/drivers/bus/dpaa/base/qbman/qman_driver.c +++ b/drivers/bus/dpaa/base/qbman/qman_driver.c @@ -9,6 +9,8 @@ #include #include "qman_priv.h" #include +#include + #include /* Global variable containing revision id (even on non-control plane systems @@ -50,7 +52,8 @@ static int fsl_qman_portal_init(uint32_t index, int is_shared) map.index = index; ret = process_portal_map(&map); if (ret) { - error(0, ret, "process_portal_map()"); + errno = ret; + err(0, "process_portal_map()"); return ret; } qpcfg.channel = map.channel; @@ -96,8 +99,10 @@ static int fsl_qman_portal_finish(void) cfg = qman_destroy_affine_portal(NULL); DPAA_BUG_ON(cfg != &qpcfg); ret = process_portal_unmap(&map.addr); - if (ret) - error(0, ret, "process_portal_unmap()"); + if (ret) { + errno = ret; + err(0, "process_portal_unmap()"); + } return ret; } @@ -146,7 +151,8 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd) q_pcfg = kzalloc((sizeof(struct qm_portal_config)), 0); if (!q_pcfg) { - error(0, -1, "q_pcfg kzalloc failed"); + /* kzalloc sets errno */ + err(0, "q_pcfg kzalloc failed"); return NULL; } @@ -155,7 +161,8 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd) q_map.index = QBMAN_ANY_PORTAL_IDX; ret = process_portal_map(&q_map); if (ret) { - error(0, ret, "process_portal_map()"); + errno = ret; + err(0, "process_portal_map()"); kfree(q_pcfg); return NULL; } diff --git a/drivers/bus/dpaa/include/netcfg.h b/drivers/bus/dpaa/include/netcfg.h index d7d1befd24..bb18a34e3d 100644 --- a/drivers/bus/dpaa/include/netcfg.h +++ b/drivers/bus/dpaa/include/netcfg.h @@ -9,7 +9,6 @@ #define __NETCFG_H #include -#include /* Configuration information related to a specific ethernet port */ struct fm_eth_port_cfg { diff --git a/drivers/common/dpaax/compat.h b/drivers/common/dpaax/compat.h index c69e76ab96..7166f8cceb 100644 --- a/drivers/common/dpaax/compat.h +++ b/drivers/common/dpaax/compat.h @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:28.538785500 +0800 +++ 0074-bus-dpaa-fix-build-with-musl.patch 2021-05-10 23:59:26.430000000 +0800 @@ -1 +1 @@ -From e9fd4b87f08d4da01ea9bde075f02e702b65a784 Mon Sep 17 00:00:00 2001 +From fc4664ada56f15a73045f6222247522c17d3a53f Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit e9fd4b87f08d4da01ea9bde075f02e702b65a784 ] @@ -25 +27,0 @@ -Cc: stable@dpdk.org