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 E66EB43A1E; Wed, 31 Jan 2024 14:49:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F2AC402D0; Wed, 31 Jan 2024 14:49:47 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 176E240275 for ; Wed, 31 Jan 2024 14:49:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706708986; x=1738244986; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=EilzkbJiEzZ5ixyU5nxNhYVnSebNFM8ohoyaNTnCmI4=; b=RQ1kDJW/D6CQSdX72JlmzsmE1m+zl+1Ce7ZZ9ZLHacUoacucRMNPKZWa ipXbCyqHoAQKnVo7qwNumQxMaW6Yf9pm8+dlS4qpX/tPs7otG4lYLpjVA OJ0VCwNgZc/M23m0TG1nFePgjECFmLhMMQen05E3LZZp+1paAmNiGG0eV l2EhHGLUCbvnYPiNcg3Pqq7CHGEky0ZzuL78mQ/SJgpqwCEq/Dg+uRr0l UiukQU9Su4fA8mE3WXslS/6I1IvVbilb3mFsDX18vQNKInKGFI+SAH0Hp qJu82cGW+cogxE0BBfFcatrccQHADnPOppaE6s/bvtdVk31jfMFJniA6h A==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="407323406" X-IronPort-AV: E=Sophos;i="6.05,231,1701158400"; d="scan'208";a="407323406" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2024 05:49:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="911791559" X-IronPort-AV: E=Sophos;i="6.05,231,1701158400"; d="scan'208";a="911791559" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga004.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 31 Jan 2024 05:49:44 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 31 Jan 2024 05:49:44 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 31 Jan 2024 05:49:43 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Wed, 31 Jan 2024 05:49:43 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 31 Jan 2024 05:49:43 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RuMzId8GLccCiFJfAvXlX+PaLRLcyu2rQEWQzaHB/3bbYx2iYLTkbl+gZjxmLSpY1wyKRC2oK9dKX25kSavN1NTpQTspTnKfIcrd+Zob5i7XGLybR+stq3EBxuM0MCTWSKIah3YEEjcE1Ei0LkDlKaXHiR70Amzrt1iV7C4loqbjH/3UmCNloPjzduVYB3cLs04lTUW68TFvJEJwsa/lbG0jIlVCepT15XlF8Oeoy9DQoBCL70KLntPy6iteL29pGGWKm3mNRQb5IHymx5/jxoVoJPTEOt9yZsEpTqjvEeWdILcZ+I2CfX2tVrGHufqoCCjRRnQ78Z1coyqMste9fQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gMUd6z2OKr0gsQedeKOMJg/1Fi30RVxQCGxUHISTVfM=; b=li/JRcFXMBa7Oe5M0fSQsI2KVqAmK3l9w+VbucVzQTvPbbJ/9ZTKZ9g93idZyydvoLXONkEVCLsDjLTRjf2sQfA/bWnD6+qlftEkSp81sZUuV5rzOuq3TnYiLJOISV66BwVxq+tmtqoz+g0Kl+HErAr1IzdTC6AYEl08uHB0HNESLEIEG7ZlN1CwoMYIvknWGKT/y2Ji3ElzHEU8n9XqX0hNTc6sHl/b8sjJ3iAckcKiiQ+LBT7eTj7sVNAmr6xESKK3hQHfp0aNDBi3ebhQT1EduUgjWstTL5OiavMaVFuOUSfR10vebe19IdBqjQCwCN3+WSoqXbupAeYAZENowQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by DS7PR11MB6294.namprd11.prod.outlook.com (2603:10b6:8:96::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.34; Wed, 31 Jan 2024 13:49:41 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::df88:b743:97f8:516c]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::df88:b743:97f8:516c%5]) with mapi id 15.20.7249.017; Wed, 31 Jan 2024 13:49:39 +0000 Date: Wed, 31 Jan 2024 13:49:34 +0000 From: Bruce Richardson To: Tyler Retzlaff CC: , Andrew Boyer , Andrew Rybchenko , Chenbo Xia , "Konstantin Ananyev" , Maxime Coquelin Subject: Re: [PATCH] mbuf: replace GCC marker extension with C11 anonymous unions Message-ID: References: <1706657173-26166-1-git-send-email-roretzla@linux.microsoft.com> <1706657173-26166-2-git-send-email-roretzla@linux.microsoft.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1706657173-26166-2-git-send-email-roretzla@linux.microsoft.com> X-ClientProxiedBy: DU2PR04CA0162.eurprd04.prod.outlook.com (2603:10a6:10:2b0::17) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DS7PR11MB6294:EE_ X-MS-Office365-Filtering-Correlation-Id: 877b62cc-7895-4b34-4a3c-08dc2263783b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jj4cZEjl7IF/Qh3h4S+gUbto8m1x1fmJ7od2XjnqzNZhWKsZx/xhLoXoTUZyLsGs1chSluyVgUaC9nIst7nzoS4hiEg1qmBCCTdTJzKr5GLHUt6+OpRoVkiZeudMixzKyXvvrxY/MyxbvOgLmIrww19nqo0qN0qZipQ2CHqqpTAMPPEtpFb4ce78/pjHbNznAUKTnfEYoGck2ld3H9rb0nRi6hKFvxwchhP+2OyscpXKJigEcBS3G6z1AEfZ7zYs1tBgOS3Y5LsmZSMdzdSSnBqHElxcn3jYa2iQ+RXCjaD6jDo96GPZvqiFgJ2uMcr78h2mv/5nKS9tSqq0riUE3OUzHE6Q6s4OlEWzPmpCLzvXxC7yfRx1DpzSMhauYomLngIvan0RPMVGvmgWC4POWsc5KuoHCSq38APgKgMN8ZbT+jvAUbKEdY2Zf3MboTnhZALJvkj0quE6NFJ4MnNTGKfBDqT4A5jaiT8qoOsClo+nJw6nrHfIm281PKBpmFAwM7FJrfXWdjeywMa15fSce7KQIZ6pyCH6CNb7JoTljbX5cPYXXBNTP2J298fZnKZC X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(346002)(136003)(39860400002)(376002)(366004)(230922051799003)(451199024)(64100799003)(1800799012)(186009)(316002)(44832011)(82960400001)(66556008)(6916009)(66946007)(66476007)(2906002)(54906003)(4326008)(8936002)(8676002)(6512007)(86362001)(5660300002)(38100700002)(83380400001)(26005)(6666004)(6486002)(6506007)(41300700001)(478600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?TW6WhD7MIlJfAddg1G5COjT/DtNk1LcUB9NYmdCir3W1KbWGTzX8fU+3hhfa?= =?us-ascii?Q?bZ55GWgxoMiFXlSre0ITb1aC0FGQ11VO4INAd64cxt50WCWd9okMFdjQvOcD?= =?us-ascii?Q?EdJ/4Nh5N/2bdLalgSjxqushCFY+s3plQ43szgQJTDq9MTCNwLsoAaNGuD9N?= =?us-ascii?Q?AbxfN91ez/xGJLGlVt6ri6GjOIZgaCbep/N6YzXVY1AZiwq8vNSe+W4zk8JY?= =?us-ascii?Q?1APHV7bk/+U/ZCOahA9DrZDDQ3ZdPzsmCNfGTpY4PjeP9sDehCZmigmFwHoX?= =?us-ascii?Q?9EG4FJ12AIxOD1YdZdbGdk4xGv4WskZnfzwX2jn4aocaPzTU3OjboWv6l5VB?= =?us-ascii?Q?bklINkzU5jl2cF8mPeKMwBloQF0vUWZsux+dyCXTlziU4nHK+23Bana3OjFX?= =?us-ascii?Q?de0J/6JG52tYqFAU49gXKXOrLLVhLWKkiGgu3CVFHMehe9nGjV5tjnmCDd26?= =?us-ascii?Q?aMUViQZyijX5BcdvflUpmvzSKnVAAB0d7z0Z/DYKSa5NNwhMVNCGl7xu7evf?= =?us-ascii?Q?42MwdXs2TPAZpSmK+PhJVPt7ON1uoU39JdqhGeNNOXPoXUwdurFLds1dCHvU?= =?us-ascii?Q?pT53KCXRGPSMcFCU837PpGrWhOVkftirlMoYzUDxsFwJtsbWITR7R1SUYwk4?= =?us-ascii?Q?u17RqzJ4+IqEusEKlZZ6WdV/blCtb2RzK/q0seeoneDRQJ5XZatenoxySDxv?= =?us-ascii?Q?n1bier64gCWfmXK0Ra3UY5QVY8D+uAVenau5hHj3cI+OzgKRKruALukRUW8C?= =?us-ascii?Q?jh9YAiwztzW08tcOseja/kwm02IViPi4ETF+hExTNfvlix7VEtRuiFD4ynaQ?= =?us-ascii?Q?EI5lmg9Lzi6mXc/bM1EUQhSurnG5imgA1oa3oMcHlIEyxvS68XFfp6RgLusv?= =?us-ascii?Q?gjhzBrY5g7sUN9YytHI3mSjgSqSLnlmDGyLcbg/1P2F2kgF9kPnkMNWIkf8e?= =?us-ascii?Q?rLiXWU7UixnPzYh90C5Krv+AMD9opDg3ic9RxkemCm2qnFdd7a4nsGxg0O2D?= =?us-ascii?Q?B5sb117hBSPLpC0La/SOE6ytOBQbU3is5krTYFutbFA0ihyEmXGohGKwtoUX?= =?us-ascii?Q?Wys0Dn2iIFsgn6BL6X1Ifm+3S+wHR6VeEx5qxJu1MAuSR3m7PS3fXDsOtvsy?= =?us-ascii?Q?aZFxypenfFaU/6o+cbkRYPm1IvARv90cWkDn5sd6MmtrAZ+72XNzNs+03479?= =?us-ascii?Q?Z+vg/hT061WYkFJQCxSRdb/4rLNAg1IL0N+jNWCLMKBjm3Ls6jOOdhgs+Unj?= =?us-ascii?Q?n9v2ZTsnjpOBWAw7WlWd7wh+aspiHErP0HuABfGdKbIevLjgLXfLCprBWjY2?= =?us-ascii?Q?a4BGFfPvIc37pTnMlPKY14H+ZdpyEWdS9K17L6Uy716zrTPXk5GWJZXbF8e5?= =?us-ascii?Q?f0oozhCfb5HhqxDKHR+RbuiUsjrOTOAXTOhq3AcvBBQJgkR7el3dQaM6uynY?= =?us-ascii?Q?klQhyp8seOvkIiLLPPqQIgVSgPYQXI6ZPXK4sztUSSK6Hv63dMcbhR+DVn4K?= =?us-ascii?Q?s198ZAsOWbqKywUFkmpPy//qKLf/r5XBi2UONAEi8z0e8sEL8cXqKnbUwiHK?= =?us-ascii?Q?dro/v3LMSE7tUAgJNGaaaii+aFkV55wdU3i2VUFmAKErbfk1OwtlRPvv5j28?= =?us-ascii?Q?IA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 877b62cc-7895-4b34-4a3c-08dc2263783b X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jan 2024 13:49:39.5708 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iDz2UUNqAzWMYLzePB44OxmnoP9Cr99hg1z7Xcwon9gSmKCRebyCragaNdxLMXZuP5j0C4funpXTLJ5D01DgSf8RuAlKhDmw40h03RiQhAY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB6294 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, Jan 30, 2024 at 03:26:13PM -0800, Tyler Retzlaff wrote: > Replace the use of RTE_MARKER with C11 anonymous unions to improve > code portability between toolchains. > > Update use of rte_mbuf rearm_data field in net/ionic, net/sfc and > net/virtio which were accessing field as a zero-length array. > > Signed-off-by: Tyler Retzlaff > --- > drivers/net/ionic/ionic_lif.c | 8 +- > drivers/net/ionic/ionic_rxtx_sg.c | 4 +- > drivers/net/ionic/ionic_rxtx_simple.c | 2 +- > drivers/net/sfc/sfc_ef100_rx.c | 8 +- > drivers/net/sfc/sfc_ef10_rx.c | 12 +-- > drivers/net/virtio/virtio_rxtx_packed_avx.h | 8 +- > lib/mbuf/rte_mbuf_core.h | 135 +++++++++++++++------------- > 7 files changed, 94 insertions(+), 83 deletions(-) > @@ -464,9 +464,10 @@ enum { > * The generic rte_mbuf, containing a packet mbuf. > */ > struct rte_mbuf { > - RTE_MARKER cacheline0; > - > - void *buf_addr; /**< Virtual address of segment buffer. */ > + union { > + void *cacheline0; > + void *buf_addr; /**< Virtual address of segment buffer. */ > + }; This marker is never used, so we should just look to drop it. I think it was originally added to have an equivalent to the cacheline1 marker. However, that would be an ABI change, so I'm ok to have this as-is for now. /Bruce