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 68BE1A04B5; Thu, 29 Oct 2020 11:17:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4F0B8C916; Thu, 29 Oct 2020 11:17:27 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 5366BC912 for ; Thu, 29 Oct 2020 11:17:26 +0100 (CET) IronPort-SDR: e8uTBIsCSxxe0oZ+xCm1s6QqlBCcdi8eoVqdZYmp/yY8cb4M4Aydhfby+JcuDlsG60LUVA9JvG SU+PpwYeLVEw== X-IronPort-AV: E=McAfee;i="6000,8403,9788"; a="167627765" X-IronPort-AV: E=Sophos;i="5.77,429,1596524400"; d="scan'208";a="167627765" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2020 03:17:24 -0700 IronPort-SDR: OCOoQA9Z2pmbNNN1LnftWt7cq0y7I5RoeUDc3xZ7zkW8XVVTK2F6gkuiDciJ5ilBH0SPbrt9hz gjxBIlXSMprQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,429,1596524400"; d="scan'208";a="318914753" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga003.jf.intel.com with ESMTP; 29 Oct 2020 03:17:23 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 29 Oct 2020 03:17:23 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 29 Oct 2020 03:17:23 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.1713.5 via Frontend Transport; Thu, 29 Oct 2020 03:17:23 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.102) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Thu, 29 Oct 2020 03:17:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OTewS50ytvywJIRGueNfCVWELcUTD9/7CUVZZdEKsRWPB0X+yHItHaPCyaCmmfSl2rRztM5vXB48Wm20NedP2rTpNVoUmm0/eGDBWBkCj/GH9NpzV7+LHfU6fNd2NnF8eAdOPdJRBgawdGw1Re6lJMLpgYPVDGcDwf4KCDfI8KsLWda894ItlNl0A4OZc/TOC0SfjKt31Va5bHML5dr3RgpnUnVPRdaQ4cxJ2c3nNhCI0drQPo2x3ZTlmhfPvt1f8xhyuvVIJ1XfA6+r2VFKX6395EWRwt6qGzxIsMtoPIvq1D088fVSFzizu8OwOzWyE34SAcN3cAO+FpIs4rJj/g== 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=F1v121sw8o7s8drN3XNLWr1sH5uawwWEnX/XDD7uMNs=; b=iyuGlFBmN0eNgbm8og6rVwQ4d2oVDVmt4qiXojtX8DaJh7vde1G6Y/ChI9VaGWm8O/YiZnnLDz/2yKWr0rkw/dIsJjLTSLAKf/ViuEG6fY1a5843l/b6o5Rqr1OL6hE26XGUjqoz0DBLzkv9BKW0Oe0WBnlyx/sIosPQHzJ9rGQ8O6KxxfRHtwrdrVaShwfoUNwIgwd1JfbkE2Be7I0f7YrJueUs6QD2fO7saVQB3+EdyaanYbUNVe60psZ7NLwtulxkISUZaEZMUiiFigX/jhlzbEOlvde7TX3RQI00FHoN5os7cbMcEY2x3TV47XocDtRTUIYe0XPfKTC2gXyWxA== 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=F1v121sw8o7s8drN3XNLWr1sH5uawwWEnX/XDD7uMNs=; b=SKQrOjHEUrnE3e2oKY+hhO0aRweJHnX865TnEeO5ZJe/4UOigKArfdLcDaNgmCviFxB3VG1w5ogj/dsdntBH5CSX3VuW3tC2DVnM5K9UVDDJ6sdwYpmbDWBPHMBOo71GJKQD5kbkO8Gwn/j1s3npSNX+d5tcrVofTVvLExs2WAI= Received: from BYAPR11MB3143.namprd11.prod.outlook.com (2603:10b6:a03:92::32) by BYAPR11MB3141.namprd11.prod.outlook.com (2603:10b6:a03:8d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20; Thu, 29 Oct 2020 10:17:18 +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.033; Thu, 29 Oct 2020 10:17:18 +0000 From: "Van Haaren, Harry" To: Thomas Monjalon , Nithin Dabilpuram CC: "dev@dpdk.org" , 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: AQHWrRJv5VL1k5Nz20SvUSwmNR5V16mszJZggACDtQCAAQ0f4A== Date: Thu, 29 Oct 2020 10:17:18 +0000 Message-ID: References: <3705096.qAGAdPRMt2@thomas> <2153992.0QQoBXgI6F@thomas> <32079303.me3necsKF1@thomas> In-Reply-To: <32079303.me3necsKF1@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: 14453257-80e4-4682-0ea6-08d87bf3d0f6 x-ms-traffictypediagnostic: BYAPR11MB3141: 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:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: tmbCnNojvCLZp3bp9q9PDcHH9JQLxjk0gJz6HO1vhUA5tpWSy1X1MYhlXEv7tEvwbYJYpyxEEpsFFj/W2OEy5PMm3Mi/R55nARjFknRKQyXSHzUjXu/Bmv6d+1XHW82ZHOCtcUm91g9h8gEZsTAoZKJ5UQkBG9pYuFqhb4pUlTj80KbGBxYqj5dC2l+NTSEJ58faNG/+w33LWRnhbmxuepU4Xhc929IrsiCDcOQEpzG/84vmVTRHgvFavfXYCbZvjnaivU5OWm+qhODBMbOkvnYWxTUvNgdx7AVrtIw6a3ss4ybJTp2HlnXoNvEhdXM5++OVq8oYuPzld+ghq4kyvg== 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)(346002)(376002)(136003)(396003)(366004)(39860400002)(76116006)(5660300002)(54906003)(26005)(86362001)(2906002)(186003)(66556008)(33656002)(66446008)(64756008)(55016002)(66476007)(66946007)(110136005)(8936002)(53546011)(316002)(6506007)(71200400001)(9686003)(83380400001)(7696005)(478600001)(4326008)(52536014); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: 3mHjLdo0Lb6PqTMlYf2YinyhS/XnzyJg5zFZxwADGEY3XQeXeJ/c6M1x3da8zYMXJTRhYpNSqydciTwDwTNRfMIv4D//s3lbaDTfmxdoKgYqOJpabTy2jWIu2/KihWL2bJCGXTA5hdDln2bfKdm6XxNlGTeNocoljnURoSMJtSH/R3DCmIFkmnI5xAeYnA8YKV6X4S8ooIHDiu39TVkUM85KubNONuIExlA2f4svTgkx4ydjpXL8JgZgYiJ9dMcpycC1KQZgW0eapRwtvRBwc33KtX/6kjZ7X/d+zqSbrpTsuV3Ht8W+uXpAx+kkjT9gT+R+VXfbuZ/efSlNgBxN82M+jRD6Yy41Jd+rVebMJxsEza3OgU5VFD4+srtjpmY7O0ddRDuy/wQQcEikijrJfvlqnQJy8qI2StSumgELw/YcoX5cMuyVFubRXOSXymtgpCWQKP0dUOuOhWuiPWINWWCJgughy9JQNDP7ea40vtQqHibMlZLeB0nHpH2NSkNWYfpTv9J3CBovFZ9qpD4+u0y6BrPoMKZXhXURNhnHN7u2vOLRADQx/YOIZ1RFxzQpJqBCc5q+ETjdS9H928d4M+Jkb1n5fihxkcwS/SsSEbh+b/mtEvGnY+rSAy7/cIgeTraz8pXQIObzoah2rRHF7w== 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: 14453257-80e4-4682-0ea6-08d87bf3d0f6 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Oct 2020 10:17:18.5231 (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: JjsZZG/TPVl0BL+DeeSNnjqyKkmJZ35t58IuLIsZcvPvx/fw7y5CFHdcrhUUIdXXn1atpe58FKpj7sAzJnDL6YYs0QEdO6J+drOe/+uwiXA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3141 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: Thomas Monjalon > Sent: Wednesday, October 28, 2020 6:08 PM > To: Nithin Dabilpuram ; Van Haaren, Harry > > Cc: dev@dpdk.org; 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 11:24, Van Haaren, Harry: > > From: Thomas Monjalon > > > > + IP4_LOOKUP_NODE_PRIV1_OFF(node->ctx) =3D > node_mbuf_priv1_dynfield_offset; > > > > > > 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 v= iew; > > > > With a static field, the offset into the mbuf can be encoded in the ins= truction > > stream, meaning there are no d-cache loads to identify particular dynam= ic field. > > > > With a static/global variable, the cache line where the value resides i= s presumably > > not hot in cache per burst (assuming an application that does significa= nt work, so > not > > in cache since last burst). Hence overhead estimate could be 1x cache l= ine load per > burst. >=20 > Would it help to group all dynfields and dynflags offsets > in the same cache line? It could - but if/how-much it would benefit depends on the workload I think= . Using each cache line fully is always good, so if grouping the offsets toge= ther is reasonable to do, it seems a good idea. My assumptions is that registration of dynamic fields/flags is expected at = init time, and that the values remain constant at runtime. That would make this a cach= e-line in "shared" state in each core that uses the dynfields of mbuf. Overall, it is unlikely to have much impact on a real-world application.. b= ut DPDK puts performance first! And packing a single cache-line full of hot data is= best practice :)