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 9771DA0526; Tue, 21 Jul 2020 10:32:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6D51E1BFF9; Tue, 21 Jul 2020 10:32:07 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70072.outbound.protection.outlook.com [40.107.7.72]) by dpdk.org (Postfix) with ESMTP id B740E1BFEF; Tue, 21 Jul 2020 10:32:05 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=agCNf9RUpg09ZZIlBqSmv8rk0C17U69godRgMtuo8lWn7v1Xm/1iUF1Dbx49XkuYgxxg115NHXg163WL93kqTdkAuYd8V8EztWdsdttsCLoaN3OU2gul+gyLzYP4LfgOl5XXjSBzr4ls07hL6VEjZirCBKnVDWnf7wFAhH6pIE9vkq/TbEA7ESY2f6wfTaWH8ur6Fdp4PCYkvl/PLWUYBEgWRK9mysog/C79Ph0m1E7LuWnMKJy5V7LIO9670I62A5iA7CMiWbniJij1G/0quVnV8/gmw8pQ7UUWdwCSAlvCLscTWjaAxQHoG+68NYWnY3lx/7h4/VNribJcCMVomw== 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=ZtodkudQcBWZhsQQdxqVJiOiSpiQhyZV40NhvYpCV+g=; b=XnaYpGf9cJDnNgu9fbm7YOA4xBtrPlo/f0Wt8OjRb9DLV3jrgIzeY5qT2aP3HxSvuKi4EsMs4Si1WYvBeLRBP/Js3jQE6WH6ZPx2yAMeij+0MapD3cXeSjAZ58+H1eDz+uNJ5OSe5G4PrKxVspgHHLVobBkGInZskxOxW1k4BrxKxOypyf/G8v0Hh598qSY+3RhszombECaS838yc/0792c53nW20h/2p7Lb6zRi3oyqHSrWTuf45dMcVnVE5SXx+S4/NJKhNLshqUvU8ZDQk9CaS1CEfhauw0qY4H4DStMsUhst0JXNwYYJYiD5ncNixGuYN66kBGaRIl9+Oo1UUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZtodkudQcBWZhsQQdxqVJiOiSpiQhyZV40NhvYpCV+g=; b=dG8nbZ41955rU6mgSMH6qx3b/He27Dvn3+TNhRXsQOEZjiqAK6ZAFr2lj8ThgrRwhG47QyYdh+AD8sq2wLEMIg6ZZkcL36/QSkP92uxXXonz3m8+d8ACQZ+0nKwChcvIQbzVJQGViKmuVmKPRNy6IBXPsGDp+aakANr543AQVXs= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=mellanox.com; Received: from AM0PR05MB6707.eurprd05.prod.outlook.com (2603:10a6:20b:15b::17) by AM0PR05MB4594.eurprd05.prod.outlook.com (2603:10a6:208:b0::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.25; Tue, 21 Jul 2020 08:32:04 +0000 Received: from AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::ecd3:6008:3784:4012]) by AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::ecd3:6008:3784:4012%5]) with mapi id 15.20.3195.026; Tue, 21 Jul 2020 08:32:04 +0000 From: Raslan Darawsheh To: dev@dpdk.org Cc: ferruh.yigit@intel.com, olivier.matz@6wind.com, stable@dpdk.org Date: Tue, 21 Jul 2020 11:31:55 +0300 Message-Id: <1595320315-15549-1-git-send-email-rasland@mellanox.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1594901556-11826-1-git-send-email-rasland@mellanox.com> References: <1594901556-11826-1-git-send-email-rasland@mellanox.com> Content-Type: text/plain X-ClientProxiedBy: AM0PR02CA0079.eurprd02.prod.outlook.com (2603:10a6:208:154::20) To AM0PR05MB6707.eurprd05.prod.outlook.com (2603:10a6:20b:15b::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mellanox.com (37.142.13.130) by AM0PR02CA0079.eurprd02.prod.outlook.com (2603:10a6:208:154::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3216.20 via Frontend Transport; Tue, 21 Jul 2020 08:32:04 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [37.142.13.130] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b8ac4a70-1d82-481f-e726-08d82d508c38 X-MS-TrafficTypeDiagnostic: AM0PR05MB4594: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:126; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LWxHFNKWdXnmZ3cN6AsoaRPpAqlUNWHEvIDYy6c9V7F52SNJ4Kkr9NqogsDgL7vjxUvtxrN4U7U25faC+QQT/bmfT+655ChGo2IKOEh8CwJ4fXZgkU8RqT7ETdkJ9VsBkx0cdCQw0QwJULcHzuKVV+UhdnPmMqZf9S1V/9BRQgfZUeYPX05tVBTa5ARwiWv+enLgHCctY0WsSWlQPzZfpY7OHWbOcAZs+zt8wsx6qVgwzgRg2DSaw8M5urZ6XtUdRVzYFL90+yKEpKWsce3vnVQLSdnjjgYk4JR/pPX5PpC+82A9GoPk6qBvveVxjvX2iK31AL8zF46ikuwr9QEM0w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB6707.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(39860400002)(376002)(366004)(396003)(136003)(316002)(52116002)(26005)(8676002)(8936002)(4326008)(55016002)(36756003)(2906002)(7696005)(8886007)(6916009)(2616005)(5660300002)(478600001)(6666004)(66476007)(66556008)(66946007)(86362001)(956004)(16526019)(186003)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: XwzZInBK2yCr79vFTWLHMWjPprICSYDtP2//uSvOiYfwe7KgiJX+8/0UjACg6TFWPH+kGeDwSQV9dKml+n0tvJZDPR4dgi9CM38aTwihliq7oP0UOMGdaIXeEsyRjjwLmcdSVYUzmk81CJJpc9ga1RcKQ3z7nEkoRNS7gA8SYUnDa2cyHM8fo2Sq3IIc7SNpLFZ3O4uIIBUFD4tDXS5CkjVl9k8CuHPManaJhIiOw6IT3w0VBrZ3Kbuc71eOBWE3DyzVNGjJxy2ZhpOcclhXTI7jATARNWWpAfm1y0RDOUdKPb48P3nV1IA5CNc8nK9gYO6WUwjOrCb0OABaj3YdMBNn3tXGCgH2jBxWZGSWHQ/x+tLBgS9CtjwMGnl4LoFXaQTVkAw6CwJQjQad4zoyTNb5ASvpQ7Ek6HaanOlHE5HiacV3lxA0/5AGIxDVH/Gx65MBlwV8G+xijCKNnEJ6UZcI24t5BQXCmH483Li4K8DUNuwM3Uo4MN7bBzyRXxRY X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: b8ac4a70-1d82-481f-e726-08d82d508c38 X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB6707.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2020 08:32:04.7880 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: uHWRlIrcnWAvZWExSfXFxRpaj9FhSHFM3rlZLcwgopwArTE3v1OrShkOALF6I2q2x+FCBxpHLC7xHA+L5q7cDQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4594 Subject: [dpdk-dev] [PATCH v2] net: fix compilation with pedantic enabled 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" when trying to compile rte_mpls with pedantic enabled, on old compilers like 4.8 it will complain about bit field definition. error: type of bit-field 'bs' is a GCC extension [-Werror=pedantic] error: type of bit-field 'tc' is a GCC extension [-Werror=pedantic] error: type of bit-field 'tag_lsb' is a GCC extension [-Werror=pedantic] This fixes the compilation error by adding extension to the header definition. Fixes: e480cf487a0d ("net: add MPLS header structure") Cc: olivier.matz@6wind.com Cc: stable@dpdk.org Signed-off-by: Raslan Darawsheh --- v2: fixed commit log spelling issue added reference to old compilers where it fail. change the implementation from changing the type of the bit fields to adding __extension__ to the header definition --- lib/librte_net/rte_mpls.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_net/rte_mpls.h b/lib/librte_net/rte_mpls.h index db91707..3e8cb90 100644 --- a/lib/librte_net/rte_mpls.h +++ b/lib/librte_net/rte_mpls.h @@ -21,6 +21,7 @@ extern "C" { /** * MPLS header. */ +__extension__ struct rte_mpls_hdr { uint16_t tag_msb; /**< Label(msb). */ #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN -- 2.7.4