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 85A9CA00C3; Thu, 20 Jan 2022 12:25:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2DE87426E4; Thu, 20 Jan 2022 12:25:28 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id BED1C40042 for ; Thu, 20 Jan 2022 12:25:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642677925; x=1674213925; h=message-id:date:subject:to:references:from:in-reply-to: content-transfer-encoding:mime-version; bh=CFOVzhFsiteTYftT1VJPA6nP8jdeZ9iz3FIGjnQYf48=; b=hAOxsmR78Ap22CSuzR0taNFldduDYmqGPtL8pBbd1kX5wI4PI17zZEN9 2H48QPSFl3qrz/e0/NlI3ZoChwvMGG+no/TlpGF+0VsrTIyVmQXMrZlX5 YS5VdJEotfTtgPaPkAmAgcyiMTu9fH3cBA1mzoxRS/U8FpQY9uh3GgD8L zhS5x1WH8xgXWk6GsOVt1WfNsIlTSBwkeouZr0crvcyrwfbXmfZn0WxrK hQeumbIzWO/WAMJ0TIMC6eRhZ3yfDB2/G2sV+T01ChKeD+AU/qqbF0jy5 x1Ogw6nTq5MjbC1v2s8pZNZfnMpF6iWopgAbBR+x62rDO+BTVrVxwJX/h Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10232"; a="232692759" X-IronPort-AV: E=Sophos;i="5.88,302,1635231600"; d="scan'208";a="232692759" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jan 2022 03:25:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,302,1635231600"; d="scan'208";a="622866153" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga002.fm.intel.com with ESMTP; 20 Jan 2022 03:25:22 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 20 Jan 2022 03:25:21 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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.2308.20 via Frontend Transport; Thu, 20 Jan 2022 03:25:21 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.176) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Thu, 20 Jan 2022 03:25:21 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mO+LbdVXL3Iavua6L0ErKeQq1W2GrUbMrT7Hv+th24yngLFWw6QsovamYp+sLQuUONB6TT5ANSe5S6ZkyBykb+ZqjI4m7GLrn9UwCkKq7ZmuzLJDXylpLK3gdOONhkuZAKSoimQ9iCJ+gaxCW4js9H5iIP2CQWGbty7Wm1k3+sNG/rNoTzP9jGl/Ki8BCOCNW3h8TQmW3BpTFzkKg9Xe9Mu5NwwB/CQ61txvBYwZGycPTKLmEzeoBfY3i/2LqLVVn5xFXL0z17hO+JQn3HbnCWuCAOjySEA0ymmQoa6ew5eD1499EL5ec7yzLl0ObLo4Wifs7sein27MUEDw41VW3w== 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=mfy36D7noogzqP28CAAaqxKScDCFYNc6oRefKtiIqbI=; b=TWGSE55x6kaRU9Vcbh1CybYI9PjwRT0zK5PCQc1BwI9gx9HWzAxqn+LTX146X7k/HTddMtf8Pa1ZvsRQaUkxqrnmEonbW0VY0fvalCt6eU71/Jqhmo0voe8/7yOweI3X0/ZxH2s3ZOVdaEent6nMkTQlN8i6fswlVNc7UYwGVHWylqY2PW34qKQZIuNhkEZgzs1qMF4tIkXu1pe0FcOcbxl8L9NAkr+9ZYYjap/vYATud0y3gvdvO8R2EUGMYPIwXpjDci06h/eGemV19NAcoZoq6VUS+yMlvvb4RCD+8r6qSPMljOutouAXGws/hz+/vtaI+wBqkkBP8vmLh/NOPw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by BL3PR11MB5697.namprd11.prod.outlook.com (2603:10b6:208:33c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.7; Thu, 20 Jan 2022 11:25:18 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e%7]) with mapi id 15.20.4909.010; Thu, 20 Jan 2022 11:25:18 +0000 Message-ID: <03f0fde7-24af-eb6e-9500-b130def07f42@intel.com> Date: Thu, 20 Jan 2022 11:25:02 +0000 Subject: Re: [PATCH] net/cxgbe: rework mailbox access to fix gcc12 -Wdangling-pointer Content-Language: en-US To: Rahul Lakkireddy , References: <2fb9036973f109fb6d53389b176b15ee0d13030b.1642627535.git.rahul.lakkireddy@chelsio.com> From: Ferruh Yigit X-User: ferruhy In-Reply-To: <2fb9036973f109fb6d53389b176b15ee0d13030b.1642627535.git.rahul.lakkireddy@chelsio.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO2P265CA0047.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:61::35) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 658d29a7-f0df-4c0f-4251-08d9dc07898f X-MS-TrafficTypeDiagnostic: BL3PR11MB5697:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rp+Cy9650Nzcb5N7VdeJbo0s2NWH1OAtpbFRmZrjr1WW84O7+4ag/icMt0p+lLc7X1KZIVnPYZZofzdD78QBnxeBoWr+/2jSiYr3/HEKK1S03riAhGN9lGKqIlhCl7A10uETSXhtiohx0P/sj2a4p5MOuiDiBeA8I/IiuZze4kuPiZrZmDDgzuMdkAtvuukIX/EXUI68XSnLQcSwwnGaLRz3MN7oZpE6qzW9h5VTuvk1nhv3vh9Qr+McI9YQc/05TBFEiOiT4v1pQw3eQJkLUuedYAAinMSFLHOKRZ22Y9W/c8rGEvwm/IyQNL42Lzfz87Nl9WTpKk6J+OOC7o29RlpGJZdCnvJg+J20xGrgjoBq79QxtA71S9N6GxYaw1RHG7hR1dozEUtn18wwcN+cm3H9nrgOXwh+hsthu4P4RBFt3Wd/9IgOqgpE7weYjNMIEnA5BibGx2pJbmw4PL7qLZR3E8TauCjLlUtYiaN+8IuEuKI8gq1m3f9IDrnvegrAKqck1vRlIVYkjUHHUHvaoBuEUcfgqBsSL0+bAxkiutZ65ehZlW6GEMlS/AgCOU1C7HNwKp+LPi4SguMXbQQF9LtqKG+mzcE93Gs/2R/G9D3l6wqsfoh+YhNGh5BSy4mctXtmMr81GzgWAS9KXVS5P4TBdmq55wnurYjuZxCu6n6p+1WdB5daliLo1puDeSUeQmxNH36tPezEIXiXAU1yRA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66476007)(86362001)(26005)(6506007)(36756003)(66946007)(83380400001)(82960400001)(6512007)(53546011)(186003)(15650500001)(38100700002)(31686004)(6666004)(44832011)(66556008)(2616005)(2906002)(6486002)(8936002)(5660300002)(8676002)(508600001)(31696002)(316002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cThNcmY1cDY2V0R3NUNRSk9CNXJEYXEvT1pQSEJCYW9RSlV6Mko0Z0RVM2JJ?= =?utf-8?B?ZWprbHhiZDFtVStsOWhDaFVjSWVXTXo1bWh2Uy9oWEdsUXV1elQxeVczL2h2?= =?utf-8?B?dFFLTTFJcFVFU3Vvd29NVHZlODgrTTRtQXZQZXN4bmw5SFAwWnRLVHE4eWhN?= =?utf-8?B?ckZZa3ZaRmlvSmhvUlN5a0tWTjJzUzFPZkhjblNNd3pUMjJiMjRPemIrMnp6?= =?utf-8?B?WVc0QWZEUFZMQnQxVTNaR2FHYU4vejJiQXBoZU9kdk9sK044QkpOZ3dvditF?= =?utf-8?B?NWU1QXhodmZVN3dEVXZsaVY3cWR6NnVXSUZUNW1sYlhLWUUxOFc2bWo4UTEx?= =?utf-8?B?WE1jZ3N6VDcyMk9pOWRrSy9VVSt0MGNnV3hsZElyQWZxeDNDeHJWWXJMaEhz?= =?utf-8?B?Y1hldTRxSXZGeDl5cmszMlhtd3cwS1A5RUJvMlEvZ2dOaEVnemliS2tRR0l5?= =?utf-8?B?YTNzbTM3V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namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2022 11:25:18.3821 (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: G7s7RyeGVgnigrsV0bWSY8XpY/dpf+UTK1kXKJc84TVgei4efdslpgq41w+J1/tFC0luCksD/+N2IhhqQ+yR7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR11MB5697 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 1/19/2022 9:56 PM, Rahul Lakkireddy wrote: > Rework mailbox access serialization to dynamically allocate and > free mbox entry. Also remove unnecessary temp memory and macros. > > Observed with: gcc-12.0 (GCC) 12.0.1 20220118 (experimental) > > In file included from ../lib/eal/linux/include/rte_os.h:14, > from ../lib/eal/include/rte_common.h:28, > from ../lib/eal/include/rte_log.h:25, > from ../lib/ethdev/rte_ethdev.h:164, > from ../lib/ethdev/ethdev_driver.h:18, > from ../drivers/net/cxgbe/base/t4vf_hw.c:6: > In function ‘t4_os_atomic_add_tail’, > inlined from ‘t4vf_wr_mbox_core’ at ../drivers/net/cxgbe/base/t4vf_hw.c:115:2: > ../drivers/net/cxgbe/base/adapter.h:742:9: warning: storing the address of local variable ‘entry’ in ‘((struct mbox_list *)adapter)[96].tqh_last’ [-Wdangling-pointer=] > 742 | TAILQ_INSERT_TAIL(head, entry, next); > | ^~~~~~~~~~~~~~~~~ > ../drivers/net/cxgbe/base/t4vf_hw.c: In function ‘t4vf_wr_mbox_core’: > ../drivers/net/cxgbe/base/t4vf_hw.c:86:27: note: ‘entry’ declared here > 86 | struct mbox_entry entry; > | ^~~~~ > ../drivers/net/cxgbe/base/t4vf_hw.c:86:27: note: ‘adapter’ declared here > > Reported-by: Ferruh Yigit > Signed-off-by: Rahul Lakkireddy Thanks for the update. Applied to dpdk-next-net/main, thanks.