From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0074.outbound.protection.outlook.com [104.47.34.74]) by dpdk.org (Postfix) with ESMTP id DC1A323D for ; Wed, 20 Dec 2017 08:28:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=SM5AaBnZ64xV2CAPB63dFgWVxk5RBxzB/Lrgc6boKdU=; b=neFJbWRa7dVHtd8X43+ENYfTCocfk21/fUCIizRqbeK5yMyHaCu019Up0FWq79kL1xMmb5Cmz/n4ZFJN+KuXUqeN2cOW/3vXwdCO1EoJ5VX53oVWAVdC3bvuoZRSKVBclTUAZ91Oj4A4afPSU1aE+ub1y2SVYesnLtVDWPjH78I= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (115.113.156.3) by CO2PR07MB2517.namprd07.prod.outlook.com (10.166.200.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Wed, 20 Dec 2017 07:28:53 +0000 Date: Wed, 20 Dec 2017 12:58:24 +0530 From: Jerin Jacob To: "Ananyev, Konstantin" Cc: "dev@dpdk.org" , "shahafs@mellanox.com" Message-ID: <20171220072823.GA13961@jerin> References: <1512140112-13067-1-git-send-email-konstantin.ananyev@intel.com> <20171214045408.GA843@jerin> <2601191342CEEE43887BDE71AB9772585FAC98BC@irsmsx105.ger.corp.intel.com> <20171218163842.GA19052@jerin> <2601191342CEEE43887BDE71AB9772585FACB5CA@irsmsx105.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2601191342CEEE43887BDE71AB9772585FACB5CA@irsmsx105.ger.corp.intel.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-Originating-IP: [115.113.156.3] X-ClientProxiedBy: BM1PR01CA0075.INDPRD01.PROD.OUTLOOK.COM (10.174.208.143) To CO2PR07MB2517.namprd07.prod.outlook.com (10.166.200.151) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b41c807b-1aea-4e11-1483-08d5477b5334 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(7168020)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060); SRVR:CO2PR07MB2517; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2517; 3:kurZ7LRtwvtp9okjpBJ6J27XAa7Xy3t296QQELks3YPdYAPB3qgN+nDwsat1qMGHm3mR1DfbBh3tZZ9jVD6PnvVSzYjj91HJc6fOYsU7fo84825JuCoND5pMGT0iuvVlftUnNTWQyeodMEJwHzEkeIKMsRrgQF+yoma3jkHXUAXU4xsdY2kRIXD86sgs1B/UBNxmQP8wN3dPADMEyo6im9ANfbLhSNewOErF5FVm16nEapKr9oTG3iRSlwh6Wxsw; 25:nO4p5+0EE0MRYoVjkuJArLCWYcAR3K1yu7zvT/f4G/ja8I5FfPwoHdx3SYrlR+1HUK1cfuLb/lq+VAowsOlzIq+yESifcY/Ciefb9XowJwEeT4pa7GNWI234sD78L9ayzAALY2DDhWMtaDdrlAy6hpUNNuNQHHujwd15COCc7M2nQTLOE6ITASIR670ujSZUINlHmr9ZxRPsJO7zJHf54isAyeEnjPkhIJP9zIVZZpb/7Uyt+pLSm4vwb0sJQTbXntvVqQV8RKE0PKvM9vxl0Bk8gjIexktMHoRyjS/b+FRJh421fKTbH+wDgFyEgLHWzDH4fGESdlNmtfzjWr0pjg==; 31:Tzxj2ll/PkiaX3plSxfb+vjTr9/8xT4kk94Mr9ZyTlXMgseoVlOLU1lbvMyFshvGUjUbqdV6Lo/hOIakzqO/52V+Ze4vYPQuduFjxLT6dZ/EZBwBjKwcsF4VNaRVjDXlcFg+Vgs/eugj4vxZqvnWnt+fqqtKksgrPVuwJ/ufJ799HEpJTYF+LvyCff5nMGzk2MWa2ykTwPafChtxe/47lt05mOfpZzFDdlxzp2fZVDA= X-MS-TrafficTypeDiagnostic: CO2PR07MB2517: X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2517; 20:pOONKP6YBeSneMvUoDEyWbcBqDxX2OVxHqZ9ceuAwPG0jm37CG3KAkuuSEC/ahzNu1F4gXLXPPs1r2BweJkNa6qfNLyU9Gslox1osLshg42cW0AfKKT0c/Z15x3an8HYjIRgA18D1g0QOVdeO2uqzVePonyLD0cwoglMK/oVT+96wq1a5LO2wE660cmHdeOgGh1jimKxFodIVtHdEnUXkqquXIKS0LtGv7MUo3hZJ+W18BnH5dnnBrKC3hXH26ulCpglFJh++IgB/d6ZKTB1BaD+hBhq12qjfvfBG+5t/MYhdZWAl6vPKXrI3rVqWpmWyAiNh6o+qumAbu7sgW/9Vm9edJSx7CwOxzYZwb/+0RJtRyMEfoqZlifo9lyF/QAemgq/3SfmVc2DB9OYML4Xynrf7pd5YR3JgV6HK1N9/a9/DLg0KDs0Tolgv5i4G/h61xPcpfWhMu5T/bk7A1ozrwpIrFIPsTocpl5V27Q3ks8uSjNtXRoD20HmrR7xpD1+DwnkEY0qhBiXALBGZsHq1SiisBJ21W7FYa5bOfEMUH6kzjMjqS1ZovvUXdrxYQs5M4vvTrnvH7XN9C8K94zd8PgUyuQJKxd1rPFRwf+EtUs= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(141481518648762)(158342451672863)(228905959029699)(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(3002001)(10201501046)(3231023)(901003)(6041268)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CO2PR07MB2517; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CO2PR07MB2517; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2517; 4:l/noutzjDO58eQCcL955cYv83kBg9UZJQOGPd8RHeJzmkH1quwst8OEgcjtHApmgcr67kR3+K44NxqWHfLWrqVWpPo4PiYE21if72486PeShWMKcCrjFQjC/I0lxDztKaPpaMJQh6BuZ5Eg1hnrrRjm72SoL5Oah9u+ct5eB9Gh5cZNPAS0PMvRAb+LCTE6ArbiDZTwxQfJkZB6HBTH4nF97Qr5mHEJ7yc8uieuoR/mhEhaWA1RLnNsml8ei7u69X3AuJ6eCSfEyhlJoSTh4on+NaJ2qeNioIV4nH4T94hPRH8B+4mUm6ZS/6lGIS+2ekdBhctSnkJYcyvWhS12XSrworwiRHhpFCL3peq2vJPe856Qfl2vr/usScynpjxbY30OJjNosCac0oSfilzmX0jfFvh6bpwxeW6+O314PLVk= X-Forefront-PRVS: 0527DFA348 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(39380400002)(396003)(366004)(346002)(376002)(13464003)(52314003)(199004)(189003)(53936002)(9686003)(478600001)(33716001)(2906002)(966005)(316002)(105586002)(97736004)(66066001)(6306002)(106356001)(7736002)(16586007)(68736007)(58126008)(386003)(4326008)(33656002)(53376002)(54906003)(55236004)(50466002)(59450400001)(76176011)(72206003)(6916009)(16526018)(42882006)(5660300001)(6666003)(6246003)(55016002)(1076002)(47776003)(81166006)(229853002)(81156014)(3846002)(33896004)(305945005)(93886005)(6116002)(8936002)(52116002)(2950100002)(8676002)(25786009)(83506002)(23726003)(6496006)(18370500001)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB2517; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR07MB2517; 23:Sru7KzmQ026qCBGCY3O45zawHIn8IVvSJXc3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FSEXL8rUWa/9OatTpTbkLU8XKm++KXrjeSqSPvLwJBZ+u5QKyPRxyA4WmtLhYHVDbEp5PXyyIPojEXQL1V2eWn3MV+SoKe67wAS+4+Bqw38OCrNRqOQsic9pOC33/QampOYYOFOvl5Mt/GhLyfCdLmOtAv4=; 24:DMM+nsivATs44ES5gozw3dHoopbGMKFuHOMiWo64UPFUYvA8fdRDtqr4HWnxHiE2bfo6wjmG2YLG2419KT0XxprfEW9Xj94pOKvv3JLL2DM=; 7:nQP4VcpamAgdPBqMAZ8djw1gdDYlG94nfID3WCDiIF3Mpf4zzATBT7vinXio9w4p7nktDEv9d350wZBZlY5KzSL+PXCOhr9fYQ+AQwGn4q9JSmwjS3mBRt7Zq5Ts8vc708nGI9gl2MnUP/E6eZOieExa+quzu1xO+5tmVxMFBhW4PH57C/jUB/g3oVsnaAMpMnJAh9L1xCiVZ3ufB3hKsXiOwMqBji35C8rRqtD6UuelXPuMFglw6fsC0mhd7amG SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2017 07:28:53.0889 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b41c807b-1aea-4e11-1483-08d5477b5334 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2517 Subject: Re: [dpdk-dev] [RFC PATCH 0/3] ethdev: few changes in rte_ethdev layer 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: , X-List-Received-Date: Wed, 20 Dec 2017 07:28:57 -0000 -----Original Message----- > Date: Tue, 19 Dec 2017 15:27:26 +0000 > From: "Ananyev, Konstantin" > To: Jerin Jacob > CC: "dev@dpdk.org" , "shahafs@mellanox.com" > > Subject: RE: [dpdk-dev] [RFC PATCH 0/3] ethdev: few changes in rte_ethdev > layer > > Hi Konstantin, > > > > > > > > > > 2. Make it safe to remove rx/tx callback at runtime. > > > > > Right now it is not possible for the application to figure out > > > > > when it is safe to free removed callback handle and > > > > > associated with it resources(unless the queue is stopped). > > > > > That's probably not a big problem if all callbacks are static > > > > > hange through whole application lifetime) > > > > > and/or application doesn't allocate any resources for the callback handler. > > > > > Though if callbacks have to be added/removed dynamically and > > > > > callback handler would require more resources to operate properly - > > > > > then it might become an issue. > > > > > So patch #2 fixes that problem - now as soon as > > > > > rte_eth_remove_(rx|tx)_callback() completes successfully, application > > > > > can safely free all associated with the removed callback resources. > > > > > > > > > > Performance impact: > > > > > If application doesn't use RX/TX callbacks, then the tests I run didn't > > > > > reveal any performance degradation. > > > > > Though if application do use RX/TX callbacks - patch #2 does introduce > > > > > some slowdown. > > > > > > > > > > To be more specific here, on BDW (E5-2699 v4) 2.2GHz, 4x10Gb (X520-4) > > > > > with http://dpdk.org/dev/patchwork/patch/31864/ patch installed I got: > > > > > 1) testpmd ... --latencystats=1 - slowdown < 1% > > > > > 2) examples//l3fwd ... --parse-ptype - - slowdown < 1% > > > > > 3) examples/rxtx_callbacks - slowdown ~8% > > > > > All that in terms of packet throughput (Mpps). > > > > > > > > We tried on an arm64 machine; We got following result on host and guest > > > > using l3fwd. > > > > > > Thanks for testing it. > > > So these numbers below - are for l3fwd running with or without rx callback installed? > > > i.e. with or without '--parse-ptype' option (and on a NIC with/without ptype HW support)? > > > > without '--parse-ptype' option(i.e without rx callback installed). > > That makes it sad, Even though application is not using the rx callback, > > We need to pay on a average 3% drop in performance(based on the > > use case/arch/SoC/topology etc) > > Yes it is sad... > Do you have any idea why that happens? > Is that the same situation you described before: for arm compiler > often replaces small branches with conditional execution instructions > and miss-prediction for such instructions is not free? Yes. Another thing I noticed on these inline functions(rx/tx burst)even if we add a lot of code which may note be executed, based on the parent function layout, the compete register access layout gets change(like push/pop from stack etc, as more code gets added). I.e This change does not have much impact with testpmd(iofwd) where the parent function is not doing much thing.It is showing up only on l3fwd. > Or is it something else? > > Another thing - the series contains 2 main patches: > 1) http://dpdk.org/dev/patchwork/patch/31866/ > Introduces eth_queue_local and moves callback data into it. > That adds one extra memory reference for rx/tx function to read cb func and data. > 2) http://dpdk.org/dev/patchwork/patch/31867/ > Introduces some synchronization for cb data. > > Is it possible to rerun your tests with just patch #1 installed? > Hopefully it would help us to figure out which of the patches (#1 or #2) > is the main source of slowdown on arm machines. I re ran the test as requested: With first patch - 1.17% regression With first patch + Second patch - 2.84% regression I am fine with slowdown, but it should be effected only with those application which request the callback feature. > > > > > > > > > > > > > > > > > > Note: > > > > +ve number means "Performance regression with patches" > > > > -ve number means "Performance improvement with patches" > > > > > > > > Relative performance difference in percentage: > > > > > > > > % difference on host (2 x 40G) > > > > pkt_sz 1c 2c 4c 8c > > > > 64 1.41 0.18 0.51 0.29 > > > > 72 0.50 0.53 0.09 0.19 > > > > 128 0.31 0.31 0.42 0.00 > > > > 256 -0.44 -0.44 0.00 0.00 > > > > 512 1.94 1.94 0.01 0.01 > > > > 1024 0.00 0.01 0.00 0.01 > > > > 1518 0.02 0.01 0.02 0.02 > > > > > > > > % difference on guest (2 x 40G) > > > > pkt_sz 1c 2c 4c 8c > > > > 64 5.78 2.30 -2.45 -0.01 > > > > 72 1.13 1.13 1.31 -4.29 > > > > 128 1.36 1.36 1.54 -0.82 > > > > 256 2.02 2.03 -0.01 -0.35 > > > > 512 4.05 4.04 0.00 -0.46 > > > > 1024 0.39 0.38 0.00 -0.74 > > > > 1518 0.00 0.00 -0.05 -4.20 > > > > > > > > I think, it is because we added more code under > > > > the RTE_ETHDEV_RXTX_CALLBACKS and it is enabled by > > > > default. > > > > > > > > I think, the impact will vary based on > > > > architecture and underneath i-cache, d-cache and IPC. > > > > > > > > I am just thinking, How we can avoid such impact? > > > > How about, > > > > # Remove RTE_ETHDEV_RXTX_CALLBACKS option > > > > # Hook Rx/TX callbacks under TX/RX offload flags > > > > # ethdev layer gives helper function to invoke > > > > callbacks to driver. > > > > > > I suppose you suggest that user would have to decide at queue_setup() > > > stage does he wants a callback(s) for RX/TX or no? > > > > Yes. queue_setup or configure() time. > > > > > As I can see, the main drawback with that approach - it would introduce new limitation. > > > Right now it is possible to add/remove RX/TX callback at runtime > > > (without stopping and reconfiguring the queue), and I suppose we do want to keep that ability. > > > > For those _application_ where it can not decide or it need to add without > > stopping and re configuring the queue still can configure/enable the ethdev > > device with RX/TX callback option(and pay price for it) > > > > > Again in some cases user can't decide does he wants a callback installed or not, > > > before he actually calls dev_start(). > > > l3fwd ptype-parse callback is an example of such situation: > > > right now user has to start device first to figure out which ptypes are supported by this PMD > > > with desired configuration, then based on this information he will (or will not) setup the callback. > > > > Good point. Can we remove that limitation from PMD perspective? IMO, ptype-parse is more of HW feature, > > All we need to do a lookup(single load) to convert to DPDK packet type. > > http://dpdk.org/browse/dpdk/tree/drivers/net/thunderx/nicvf_rxtx.c#n258 > > > > I see almost all the drivers has dummy check like this, I think, That makes it > > dependency with start(). > > > > if (dev->rx_pkt_burst == i40e_recv_pkts || > > dev->rx_pkt_burst == i40e_recv_pkts_bulk_alloc || > > dev->rx_pkt_burst == i40e_recv_scattered_pkts || > > dev->rx_pkt_burst == i40e_recv_scattered_pkts_vec || > > dev->rx_pkt_burst == i40e_recv_pkts_vec) > > return ptypes; > > > > We probably can, but it would require extra work and changes inside the PMDs. Yes, If we want do it in clean way. Another intermediate solution could be return some valid error code on those PMD. On such error code, application can start the device and get the supported ptype and then stop/reconfigure it again > i40e is a good one - all rx functions support the same ptypes. > But let say for ixgbe ARM version of vRX doesn't support all ptypes that x86 vRX > and generic scalar RX do. > For fm10k - vector RX and scalar RX also support different ptype sets. > > > > > > What I thought in same direction - introduce a notion of 'static' and 'dynamic' callbacks. > > > Static ones can't be removed while queue is not stopped while dynamic can. > > > But that also requires user to select at queue_setup() stage does he wants dynamic > > > callbacks for that queue or not (new offload flag or extra field in rxconf/txconf structure). > > > So again - same limitation for the user. > > > Another possibility here - have a flag 'dynamic' or 'static' not per queue, but per individual callback. > > > Yes, that would mean API change for add/remove callback functions. > > > > At least on my test, the regression was caused because adding the code in > > tx_burst and rx_burst under the RTE_ETHDEV_RXTX_CALLBACKS(which enabled > > by default). By disabling the RTE_ETHDEV_RXTX_CALLBACKS option, I don't > > see any regression. If so, Will such regression fixed by introducing > > 'static' or 'dynamic' callbacks? I am happy to test and provide feedback. > > Probably no then, but let's try the experiment I mentioned above first. > > > > > For me, I think, The better option is request from application for the > > need for Rx/TX callbacks and set the handler appropriate in the driver to > > have zero impact for the application which does not need callback at all. > > It is possible, but: > - that would be quite significant change and would affect each RX and TX function in each PMD. May be not, assume if we have helper function which invoke the callbacks. PMD can just call that before returning it. > - from other side - even now there are several libs inside DPDK that rely on ability to add/remove > callbacks on the fly - pdump, latencystats. I think, it is application who decides to use this API,then I think, application can request callback feature support. I think, we have followed the same method in latest RX/TX offload flag scheme as well. > ethdev rx profiling also relies on ability to install RX callback. > > With all these things I presume most apps will configure their devices with rx/tx callback support enabled anyway. > Which makes me think - is it worth to introduce such changes at all. > Anyway, my first suggestion would be let's try to figure out what exactly causes such big slowdown on ARM. It may not be ARM in general, Under our roof, We have different class of SoCs based on the use case like 4 cores, 16 core, 96 cores part etc with different micro architecture etc based on the use case(embedded/server etc) like Intel. So it may not very generic with all ARM machines, it is really based on micro architecture. ie. The same patch may behave differently(less than < 1%) on IA-Atom vs IA-XEON. So IMO, Common code change should use helper functions, it up to the driver to use it.