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 585FDA04DD; Wed, 28 Oct 2020 11:24:17 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C2948C958; Wed, 28 Oct 2020 11:24:14 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 2329FC944 for ; Wed, 28 Oct 2020 11:24:12 +0100 (CET) IronPort-SDR: zFAPLlG/CgvbRvDxtiv6SLPETLHPV+niUgp87R0FBkEfRKoCjN8MN1+A2/DWpQJD3U3FStlfGX uS0hudWkIGpA== X-IronPort-AV: E=McAfee;i="6000,8403,9787"; a="165645908" X-IronPort-AV: E=Sophos;i="5.77,426,1596524400"; d="scan'208";a="165645908" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2020 03:24:11 -0700 IronPort-SDR: QsDlOg66HqfEEW7GYBeSR/JvAPNW+sHgnzZg4K8d2jeUsOX1u15JAR2ZsgLFfobTGl3tlKXqu+ 7ZNr61wALXEw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,426,1596524400"; d="scan'208";a="525075323" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga006.fm.intel.com with ESMTP; 28 Oct 2020 03:24:10 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 28 Oct 2020 03:24:10 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 28 Oct 2020 03:24:09 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 28 Oct 2020 03:24:09 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.172) 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.1713.5; Wed, 28 Oct 2020 03:24:08 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RpCx5YvZ9j1Bzk8B2zTA3du1kNbRxazF28PoZyisZULZpvkKQX7UVfM1AQLDloRY3H6SjQaLAb0N9olAwhcIuDMXZus2kr98zRQMBl4aimohA6jfjej/ga4Ykwr9eKLMOofArTSBU6ubgXy+zsqZH8gOVFz7a8dwHbt62j3hZMieVrIjG0BzmRxUI/2c2p692xCVL3/2ZzuHGliE3v4KyPjyeeimbS2urdNSICqFBAsEPUVaCD1hxTPxhrzsSXhDugQFGyf1kPkbdp6uBnUQ2JuHFD3SzNHwez96K9Z1oR2Uer2paNVptXVr+be+rQ/d20CMahaKocvQoc8w67KCwA== 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=UpAt2pRuXv6QK8R3t+mcLIVbPyhiEp8VEhvOflU1Ez4=; b=n1lc1btZRRDulrR6cEY9dG1RVLucc7/1soxfQu1141yS6pw3c9DqMakEEGXcfETjYsUFZ5fUN0DeGTzzdBBw1QhOTNt1pnVO/5y0K8b71vGvl1NAUXAN/a86DX1q2P1vHQC+gst8RO2hvUmAi58L3qqd4xOarV3AFVpj6xqZEn6D9R02XsUH6HW2xsllbD4Avi9eYqYEnS0+9HGl4QFVYM4AlfdAoggAq2Dc2zKHP8QiqwfZcfNChvQO3sPYXybniBX0lV+RX4kfbJvfh/0aC8uUf4eg7odHBkvS6roi35QVL32Wp5Mzr/xsZblg0YpobX6m//AcayIecsfeAT7GIA== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UpAt2pRuXv6QK8R3t+mcLIVbPyhiEp8VEhvOflU1Ez4=; b=qxbnVxfakuuopwQhNGThtcgIQcgPE83gwMmHjfpG43325hGXYkv6iUZvMgVIQD4T+ImURYkncBKq3dJNBv5Fb3Bh9/8mMz1h5DBDepmjiunKojm5ZxYF5ZzyEmEWSlURf6ZYGwQb1KKde9RaSg4t5Gqium1G884TVaoJlhOnrUo= Received: from BYAPR11MB3143.namprd11.prod.outlook.com (2603:10b6:a03:92::32) by BYAPR11MB2709.namprd11.prod.outlook.com (2603:10b6:a02:be::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.25; Wed, 28 Oct 2020 10:24:01 +0000 Received: from BYAPR11MB3143.namprd11.prod.outlook.com ([fe80::59e7:5ab9:4e99:27b9]) by BYAPR11MB3143.namprd11.prod.outlook.com ([fe80::59e7:5ab9:4e99:27b9%5]) with mapi id 15.20.3477.028; Wed, 28 Oct 2020 10:24:01 +0000 From: "Van Haaren, Harry" To: Thomas Monjalon , Nithin Dabilpuram CC: Pavan Nikhilesh , Jerin Jacob , Ruifeng Wang , "Richardson, Bruce" , "Ananyev, Konstantin" , "kirankumark@marvell.com" , "dev@dpdk.org" , "david.marchand@redhat.com" , "olivier.matz@6wind.com" Thread-Topic: [dpdk-dev] [PATCH v4] node: switch IPv4 metadata to dynamic mbuf field Thread-Index: AQHWrRJv5VL1k5Nz20SvUSwmNR5V16mszJZg Date: Wed, 28 Oct 2020 10:24:01 +0000 Message-ID: References: <3705096.qAGAdPRMt2@thomas> <20201028093003.29564-1-ndabilpuram@marvell.com> <2153992.0QQoBXgI6F@thomas> In-Reply-To: <2153992.0QQoBXgI6F@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=intel.com; x-originating-ip: [86.40.59.136] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5767e3b3-e124-4a5b-2ab2-08d87b2b9695 x-ms-traffictypediagnostic: BYAPR11MB2709: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3968; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bvjWuqRBepw8oMhTYlAnu9NIcealmoG5DVASDgvXK+OToK6fKLB2h8EvrV6LRv7wgoLqKMZsaM9o4FNcqBAy4pzUnZY05l/J9qQ60F/efxW9pao0s2njlaQ+o5aEPxGc8COkNwiL8e9gVkDI6IdfDKe9kDNAk0cjNHGABGsQl16Nlkd5wLSQEDLyN27Xso+i8ibovD4JBIo79yEhpUN5YkdWl+941I1QBsGuKh7+NNUAqqJJUB9gzp+883bkV4bfDRbbomwQpUnEkodH0a8jHFUeUDHtQPGHtF/pCoIdhd6/x8eK1qXJhypqoAmxkEyYm2y1VkAEmJxoZ//Sx5SWXQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3143.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(39860400002)(376002)(136003)(346002)(366004)(64756008)(110136005)(5660300002)(53546011)(7696005)(316002)(66556008)(54906003)(55016002)(66446008)(8936002)(52536014)(71200400001)(66476007)(26005)(83380400001)(4326008)(76116006)(6506007)(478600001)(86362001)(66946007)(33656002)(9686003)(2906002)(186003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: coGVsxM2bgcX1DPV/Ek0f1pnzz45e6UOBnnmn/zAGEkmBYPrwHtmJQVPXN4lrvawdx5h2YGCyfyn3q5ZRH68D94ggoCXc7MJtbZXUVApRQMDHNxJI+w1iStfB+QNVlmHspYu+WNld7pWJmhFBdW4PZUgHJfQq0u1W2G08CL9EFRDdNDK/CHA0HjzrkAq90KMcWqe91F59wAUg8OvPKcI7pHBh7MX7OXCwlFWHQpv0eWtHb7YeheKAxzbdu304/3Q6QGFbv4BY+0HKJEeAEbnZ5TJ+AoBaYzo4yMy7HqTwfhiW8cNeap6YLaPi0BYjDrCShHs1pwOMvV76KlYlTioOizEtC8+LwsNgqzZLxGO7P64+bTYmRAstJFO7VMleeTHOgio2zdyf5i+mQbRj8lEww3h+wQbDqSS9qIQZb7SC6/EqD7xjSKlesYoqgpRTM8k7IK4AU7gxEHWHfaWKJcoUnwBwXh2DaE4Y/fFXA6BE2U5fbxr4HfBV8n8uVIIoVRMu1ZB/pjR8kpdrDxaIR0lmLy3z1BgSWipVeq7WdDashDukElcwBnTuCIOvm7H410LTgMUzArHUMXv+efmxqxPFk0jEbkrV9D+IPG3U6DnQp4x5azhJe8h+fAZrzhExCYXF+wsLuu+b3Ag2dLibDeabw== 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: BYAPR11MB3143.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5767e3b3-e124-4a5b-2ab2-08d87b2b9695 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Oct 2020 10:24:01.2493 (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: F8/3TpaG6ctJzuW/6LOHfr4oFIK3+XHM1s1ASllm78kH9QXxtw94ZJdkUNqtV+vNbRK+IuUAAc1IJmFoufqHcd+8R017u+PsARRURncilJg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2709 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v4] node: switch IPv4 metadata to dynamic mbuf field 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" > -----Original Message----- > From: dev On Behalf Of Thomas Monjalon > Sent: Wednesday, October 28, 2020 10:09 AM > To: Nithin Dabilpuram > Cc: Pavan Nikhilesh ; Jerin Jacob > ; Ruifeng Wang ; Richardson, Br= uce > ; Ananyev, Konstantin > ; kirankumark@marvell.com; dev@dpdk.org; > david.marchand@redhat.com; olivier.matz@6wind.com > Subject: Re: [dpdk-dev] [PATCH v4] node: switch IPv4 metadata to dynamic = mbuf > field >=20 > 28/10/2020 10:30, Nithin Dabilpuram: > > From: Thomas Monjalon > > > > The node_mbuf_priv1 was stored in the deprecated mbuf field udata64. > > It is moved to a dynamic field in order to allow removal of udata64. > > > > Signed-off-by: Thomas Monjalon > > Signed-off-by: Nithin Dabilpuram > [...] > > + IP4_LOOKUP_NODE_PRIV1_OFF(node->ctx) =3D > node_mbuf_priv1_dynfield_offset; >=20 > That's interesting. > You copy the offset in the node context for better performance. > How much is it better than with global offset variable? > How much it decreases compared to a static mbuf field? Also interested in this topic, I'll offer the logical/theory point of view; With a static field, the offset into the mbuf can be encoded in the instruc= tion stream, meaning there are no d-cache loads to identify particular dynamic f= ield. With a static/global variable, the cache line where the value resides is pr= esumably not hot in cache per burst (assuming an application that does significant w= ork, so not in cache since last burst). Hence overhead estimate could be 1x cache line = load per burst. With the data copied into the node, the offset is presumably on a hot cache= line as the node is using other data-members of its context. As a result, perhaps a col= d static cache line load is converted to a hot node-context line re-use.=20 Real world overhead likely depends on A) does the application cache-trash e= nough to make the static/global line fall out of cache - causing perf degradation due to = reload, and B) does the node->ctx still fit in the same number of lines as before if the value = is copied there.