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 89863A00C3; Fri, 13 May 2022 03:34:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 278F740E64; Fri, 13 May 2022 03:34:31 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 01D1340DDE for ; Fri, 13 May 2022 03:34:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652405670; x=1683941670; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=nIO0rP33U0clc6OVNAMYHoevORiJuvhwA7v8JGQ7ryg=; b=mH4/+2N8o7j5DE7PsH+BalFC8DEzvaYIDa/8DYII9cAqb3aEE6kfxOYI MLM++CZ+td3gg4QoY3ANYPIwZvR4OhU+hzKEYb8fZvNV7XWy561raYl7V lnBCUJdtQoNw9kJ19Fj74wOrnB5tMR7IvoQYAHnZOu5oxzStdenIbb2nA m3bUY6fJehkcOedporvt/gt5NVRDAB8qjLGnHRzukLJBOekledbUdMyUj g3yL0COdHHp8k3OMJcuKL69qVPGKfEIvmDtc6n/MTLSTpx1jQ0J6irCua h/4mDgk7jtRR7nDT7SvaQPxlW+sinsf7ECULX+RnvAy6RTdrQjf91PVUn g==; X-IronPort-AV: E=McAfee;i="6400,9594,10345"; a="257728463" X-IronPort-AV: E=Sophos;i="5.91,221,1647327600"; d="scan'208";a="257728463" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2022 18:34:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,221,1647327600"; d="scan'208";a="896038477" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga005.fm.intel.com with ESMTP; 12 May 2022 18:34:27 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 12 May 2022 18:34:27 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Thu, 12 May 2022 18:34:26 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Thu, 12 May 2022 18:34:04 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lh2zW7b8+OdI8SLL9438Ea94ChxIMk7BN9DkomVdrTH31MQf7X+WAz+WPILjGglftpY/vuDTc7f4FcxlVq+XaOPGUzY6ZOaVZaU1XpjijqmfbfAu2u1MV5C4utaoH53qx6OhsnH+F8tZ7L9Thsx4lrBvHmSSAT8WM6CseRnK8IK7OGChlKAPdqMFcV+2FXLjU9/aw4GVflwDLryUzvD40gVlIBBqrGfBvI54TBaQauvjpaV+kHQwiqvagrM2c2qkIoZQgoYTwYM3ujY3V1lNoaaH1H1sUkTA2Qm0wNnnkiXfQQB+joDPCR3h99mjS3TrFiZdrhTYwjJxxRFjWR6rxw== 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=Y0F2XJvojl0AyI/jg/e9V4wX4Mq/Hv/yEMAgc+HAjS8=; b=AospfX6v6aoL9iWQ6DbwEqPVm/HkaR5o/cXm3RKN1OLiGqVBUGwNWqb9xPY6GNEPmaVL7hhxxFhxv73EfIjyoVjRHYKw1hKNZTpeGe+pTGRR+E+DiV0dIgqJ0iP9rijDfU74TyeUHmBQnTSlBS0UjQ1LfK1Uu5JptRPlYwx6F/UDt8+n0NIw9NZ4sLisGb4bd28kzDG5arkTR1029HrwLMcCw24QA7lgh+ib+36boEx15EyX7/pcLxQivqDGJmNDfMFmUMHShceerebTGRYFzifvE/nTzYMNZCGZ2U8IrnJc12tAKsKQA/G/UuCRvm4jl6Nr3x0hRxbVUfoDXq0rFg== 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 Received: from PH7PR11MB5984.namprd11.prod.outlook.com (2603:10b6:510:1e3::15) by BYAPR11MB2661.namprd11.prod.outlook.com (2603:10b6:a02:c5::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.13; Fri, 13 May 2022 01:34:02 +0000 Received: from PH7PR11MB5984.namprd11.prod.outlook.com ([fe80::81b5:584a:8203:dcea]) by PH7PR11MB5984.namprd11.prod.outlook.com ([fe80::81b5:584a:8203:dcea%6]) with mapi id 15.20.5250.013; Fri, 13 May 2022 01:34:02 +0000 From: "Zhang, Ke1X" To: Stephen Hemminger CC: "Li, Xiaoyun" , "Wu, Jingjing" , "Xing, Beilei" , "dev@dpdk.org" Subject: RE: [PATCH v5] fix mbuf release function point corrupt in multi-process Thread-Topic: [PATCH v5] fix mbuf release function point corrupt in multi-process Thread-Index: AQHYZcYEKUyWRwernE+MnNt61gi0C60bf2eAgACCwbA= Date: Fri, 13 May 2022 01:34:02 +0000 Message-ID: References: <20220510025428.110325-1-ke1x.zhang@intel.com> <20220512055719.181652-1-ke1x.zhang@intel.com> <20220512102655.35af90a9@hermes.local> In-Reply-To: <20220512102655.35af90a9@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 312521a0-d4ed-45b2-8c63-08da3480a93b x-ms-traffictypediagnostic: BYAPR11MB2661:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: lP96j5TLJEm5IduFhMMkqxMSA8E/bq+G0pqHxHM8dE0WIe5KMi5XH7qtkQ9HNGwAgEB/jeV6eeCmPIJKWIEMcITyD+8B34G0z/b+luA/0Bhgzpslolx+oNkPk3MijXUoy5Pe3jhpKa4G/hDdwr0vHeonxnBGPHWZp38DOxlBKEKdBdvDUWmmxN5zWyPwIs/c7kdRXmB1Om+xJjhy6hfiRldCOepUBTbJPuKD+MdSqjqSlcrxcQ8Pl92fRlTGstau3rbZCXh2fY6gLbe7YqlYjm1k3y8Z1L4YwB/3mNdQkEsz63oUV6VRgLmfidbPo8dzCBHeLikqd5bpXKz/SeHaMgyxzPSKUMXCIJPPykyG9eva0jIUdHXqVvXGMJzZOpNXUURUHtX1gaAfHg0TCgZy1clVMk+YPwcVhg10F4RHo50oKnkqD0nv9+VAuNpKoZ2VdlL+L2YVf5FJn4Hk3Z58HnxN5TfV+mc/3mQvOmjxBkla99DIA+G0bsXlfMAUszoQxnHEfXTaFlBxF0FePd7G1yfbIJfhB9z49nFrSh8gbC0xL+zweHXq3nw2GIRFZwiVp0KheBQTDEtqhhVnGKB9PEfzaq76sUzfZv7/JRgUvMWBLiBnmjV/I+DkXaqtrQuHTMD0VZGpfMei2EuaVt/0wbEY/wH+UoY5l6JwN9KM+C0mdnwGnT8H4WWhjCrezlu2UJ9eJywRdoh9xMyacXBlJw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR11MB5984.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(71200400001)(38100700002)(38070700005)(52536014)(82960400001)(8936002)(122000001)(508600001)(5660300002)(33656002)(55016003)(186003)(9686003)(83380400001)(26005)(2906002)(7696005)(53546011)(86362001)(6506007)(54906003)(4326008)(8676002)(6916009)(66476007)(66556008)(66446008)(64756008)(316002)(76116006)(66946007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?MECuFCA07Q3fy4aCEXDYn4F8BK2MdFQX+eO4KJuWicyyFqahl2wZaE4H6YPV?= =?us-ascii?Q?B67wCfgHVH//dBn+Wif2RvLXWnt8ZWwQqYMdSERPg62R4a7ealhGglYQ+eaN?= =?us-ascii?Q?7McpFS3hPaZxIr1ek5jz1pV2bkCl1XqtaqUa6b6GGvdudJEQfnejtgE3Ob42?= =?us-ascii?Q?ZEVBpT8YAitD85sqBXN9py0p29Z38BSzaNMQaCzCfyHjM1bBZxS4nni1jkqX?= =?us-ascii?Q?dMXUCR2qeSFETkSD2rVxz+BOrYi/Ku9GR1bKtsWQNnJhxMZReU2Xt+66KMmE?= =?us-ascii?Q?Mr02uXDs87iQTubA+QJNpQ1PQevvK8QOQYssCMMlLzP8GhOLIk9q3WeoRo42?= =?us-ascii?Q?xC9OJI8tJJY93hY2i70qCaUZUZGCWNrSktZw24DX0b/xQOgIquJKH/v0n2r8?= =?us-ascii?Q?046Q0o23yKOOZaqusD1T74tODpUdeF7eniKrxqh5u3eSpU3lBSCwpjJhPkUU?= =?us-ascii?Q?Z/EZENUh39G47WAyPm0ZWpXagwV0xdJnSiixRhZTDE99U/HyqCqYMA+2Uk1j?= =?us-ascii?Q?U/jMEG0yEmO/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= =?us-ascii?Q?ISJ3sJxNAG3vblzmqGiMFRNlslmAOEHEW7bHgCMscwIo44ROZ1+IiwlI23nT?= =?us-ascii?Q?MwbBXg0AOFQeIF1gNeGKRw05sBELBdyUhG78ZIBrXjPLLwZBMjKfoYvWdA1J?= =?us-ascii?Q?I1/z3O0tScSahw+4Bbn9tR7nY/o2oQZ6FRIyarhgJir9uoQs+q4OHaWjjovc?= =?us-ascii?Q?IUyzJztfo5OhD43my0BbVGMXKISlrCkYMGT/wZhssPmOW6IG1+YXXlsi4Dzj?= =?us-ascii?Q?gp8H/EUL3H5TefB5KdL0/89DqsAJTuDTAJPm6kTmTf0Nd/FNcYherzMrJXwE?= =?us-ascii?Q?gZbkAex8eg=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB5984.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 312521a0-d4ed-45b2-8c63-08da3480a93b X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2022 01:34:02.5588 (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: Es0LXF38PfUUKSYdlBU2MQ78D1CxgvqJBfrNz84sTmgWZxydWF86fjzHeCyMLwrgNyOt9AfHvNZPgtbgZ+ZDzA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2661 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 > -----Original Message----- > From: Stephen Hemminger > Sent: Friday, May 13, 2022 1:27 AM > To: Zhang, Ke1X > Cc: Li, Xiaoyun ; Wu, Jingjing ; > Xing, Beilei ; dev@dpdk.org > Subject: Re: [PATCH v5] fix mbuf release function point corrupt in multi- > process >=20 > On Thu, 12 May 2022 05:57:19 +0000 > Ke Zhang wrote: >=20 > > > > -static const struct iavf_rxq_ops def_rxq_ops =3D { > > - .release_mbufs =3D release_rxq_mbufs, > > +static > > +struct iavf_rxq_ops iavf_rxq_release_mbufs_ops[] =3D { > > + [IAVF_REL_MBUFS_DEFAULT].release_mbufs =3D release_rxq_mbufs, > > + [IAVF_REL_MBUFS_SSE_VEC].release_mbufs =3D > iavf_rx_queue_release_mbufs_sse, > > }; > > > > -static const struct iavf_txq_ops def_txq_ops =3D { > > - .release_mbufs =3D release_txq_mbufs, > > +static > > +struct iavf_txq_ops iavf_txq_release_mbufs_ops[] =3D { > > + [IAVF_REL_MBUFS_DEFAULT].release_mbufs =3D release_txq_mbufs, > > + [IAVF_REL_MBUFS_SSE_VEC].release_mbufs =3D > iavf_tx_queue_release_mbufs_sse, > > + [IAVF_REL_MBUFS_AVX512_VEC].release_mbufs =3D > iavf_tx_queue_release_mbufs_avx512, > > }; >=20 > Did you have to take const off of these? Thanks for your comments, I check the other code like linux kernel , I foun= d there are no const for the function pointer, like: static struct pci_driver ice_driver =3D { .name =3D KBUILD_MODNAME, .id_table =3D ice_pci_tbl, .probe =3D ice_probe, .remove =3D ice_remove, #ifdef CONFIG_PM .driver.pm =3D &ice_pm_ops, #endif /* CONFIG_PM */ .shutdown =3D ice_shutdown, #ifndef STATIC_QOS_CFG_SUPPORT .sriov_configure =3D ice_sriov_configure, #endif /* !STATIC_QOS_CFG_SUPPORT */ #ifdef HAVE_RHEL7_PCI_DRIVER_RH .pci_driver_rh =3D &ice_driver_rh, #endif /* HAVE_RHEL7_PCI_DRIVER_RH */ .err_handler =3D &ice_pci_err_handler }; So I don't add the const.