From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0041.outbound.protection.outlook.com [104.47.38.41]) by dpdk.org (Postfix) with ESMTP id 0E78F47D2 for ; Wed, 23 Nov 2016 01:30:44 +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=mJrzUMcgNJblSoqJOkxpNzK27qrtCWWaZxnn+t4dqtc=; b=aiKnZ7w055a2gET1ytm/jQa2xjTY3a8puxwYOhHyhA0HaSqUDdAV4vV/t2wVasn3A3e799loC9NYmJNFVC/OVnShpqEhs4EXqXWbJKgCGyfOLPq0SoTqMZ/gLdTCq5gaOrhdW2bb07TmkOL0tJF5iOW9u95GmQioVd5l82NO1LA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from svelivela-lt.caveonetworks.com (50.233.148.156) by BLUPR0701MB1716.namprd07.prod.outlook.com (10.163.85.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6; Wed, 23 Nov 2016 00:30:39 +0000 Date: Wed, 23 Nov 2016 06:00:35 +0530 From: Jerin Jacob To: "Richardson, Bruce" CC: "Van Haaren, Harry" , "dev@dpdk.org" , "Eads, Gage" Message-ID: <20161123003034.GA23065@svelivela-lt.caveonetworks.com> References: <1479319207-130646-1-git-send-email-harry.van.haaren@intel.com> <1479319207-130646-8-git-send-email-harry.van.haaren@intel.com> <20161122060208.GA27648@svelivela-lt.caveonetworks.com> <59AF69C657FD0841A61C55336867B5B035B4D827@IRSMSX103.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <59AF69C657FD0841A61C55336867B5B035B4D827@IRSMSX103.ger.corp.intel.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: SN1PR0701CA0073.namprd07.prod.outlook.com (10.163.126.41) To BLUPR0701MB1716.namprd07.prod.outlook.com (10.163.85.142) X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 2:5ARZ8Ha2aM08jBR/FkLDZUkMaYDWpq3OIbkv80l5tlKezQ4xrTwK/Jt/XW8vSpMweW3dLqb315FEPhrVRaOXgQVAXna1F0X0jVoN1QGUKPV2y+VMxkMf0NRkvvh/KiVg9TTh5GzTReKpyzBBsI4jjpXEAqqOKkax7wkvxBsAPzw=; 3:mwVTRBDM0eVSFa03z9IxQNDfShd9ME0qqIXCAahsQ5+E4Ih+vs1IZ9TgZNwPVBi/m7k3KXP93SouaQIcmLqzsjyvDxVXGIE5d6tRKRMGk6Rq8/1jNz8s97DEAL6bc8TBIfpdJYDDcHiZ8ev7HRiPKmwLy1eIXOHOZKT5YUi2ZlQ=; 25:UVr5I3OUrSWrM1Iy68+rooubcG6VjhBOOWEw0zmJcmyrzFTmFtb9fnWGLv8SA90lI1FcljU/4XHi5vD8iXYydGHeBlzhnzNuSc2vwyEh8uOk4oXq3ZgTUKQY0llk0oqVniUpNhzpbF0mzPUalttjyCHAq0VKOSMU1j+XpqgF/HoPAeGMaXm4u6N7FRuZJ31xHs1fKy5DzW4d/UrcLne+65RQ6/4kV7QIOXpTEirGQLWdxrrSU9mSkBQ6nbXP15KVZnOPB5xh/+fIhmpdyscIjVzfJLB4R7+RPwVzomNkdG0/kbmHZ9zE4omZ6wf5j7phMPx84ZCezFzmI2AidZRzDy3Om9B0izeUkpEG9GASMqpXr9RSlODHrP9DIeBFuICRCwbjmwVreXlEQjj95QeSIqNqbT6h50ok0C2H1fh/dxPLhTSwKFHZe5QMAsxHndMc7blVS2sXiSMG4rNIEjPKXg== X-MS-Office365-Filtering-Correlation-Id: 5ab7d44f-e20c-4834-a21b-08d41337f391 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BLUPR0701MB1716; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 31:CtrhTpJzB171jFEpkoCY2mtooSTc1ONvRe8B537UpLPd3mB4YsMtzxNUyxlFIQDBD2HKQC607s94tbdDZSyCv+qDovLTcx4HqDohLNYytsPQA7x6uNDrLAJYum4AvK1Jz/chxWCqsvOpFKLKP6vpYrQtzujHoVB4jUzHYtShZJ4kV6aISy4iKHNvWOwgMQXrOoRUiz2uMr4pMuP/fSZit29Gg1EtPGLibeQmd6OhDTNjPivCw7WeuVSnHPpwQqoAQafNIv5mMK4oYLEh9JB5TA==; 20:BDhlD5EeLnqqiAFglI2YapSwT/Boq0nmKvCGO2ObqR9o7rZUhNViMq33y5YWTO2wk6XFg7KZlXozEjRwHkGsnsXUI2IuqfxvCb0pDb9vxCSdE+jsWp5Mije02vYelWp7gbHxnG/3Yuh1+23L0jTbE2HgBMcPpwYFU32dV4CgE+kAYHa3AgWrY0vmm23Oov8vpioc15tQQ/8RmC0W2OeKh3RWpKQOP7irAkSOjdKxnZKYbK0nyEKruYTiCKGCjBKCP7T64hoOi8nPY126g/y1LX/+5i+5UV1DwCazw4EIHGzoMWgQz3rjES4rhnbXeDx6GN2YOheeim8w4uehcojzWtYasxiDhlQHkxxgYV2joI2Fif0WJSNUGmcCO5fHnpymiOMtVVrp2ZjT3cyoYpqT23uHLwnJ1ORs+ZEKAf+0xG2s8vLwUp8PuNBpHW3t5+FbM9eAWNTc5PmsXrVdzteVfQPYlrhYKvjQJwR4Ef/lGnabRIsu8QVLtW77dAWguVq70S4PPSwiwe1cFUCqa0XkIO+tSVUl6zGk30vWJw3jcM6PjW8r939dTsd9fvQFsPpXIpcv68bc9SX1eQh2udtKatWLSy5j812Usq60HNm/v0Y= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(158342451672863)(278428928389397)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040307)(6060326)(6045199)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041248)(6061324); SRVR:BLUPR0701MB1716; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1716; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 4:mhpKfT+7Yw3YlGmIx0gavNiJ5OFOf3e8PPpqwP3PK3uK3PZJtGUnaFhcQyrleNnW64ewVh03tKqs7wCEChTg297PwjMKCeZluzg1G+IGx4n8XYcCNEY2fW+AhpCoqZQ3cx/Jyas/ZNlIEeS1TXwI5o5Xl5+fe41Rr6/iB955d/o39m4SLKuFdKbh3fjA6AQRYtRlL3wR5meebgBzKdiYZ902OCjSBel6SXPk84SX+usqyy+kkWg21yI1a3Be2RGiLOIzZSPPkQekPmyulZpJdYZtProZZG3m+4unkcVUB0e+upPU8vppObjjUeIsTaGZezPGW3kYfuwFJG9lFJXsTV0EDFqHPzSR99YFX8bwcrzWHVUu2HHkYkMDqS5su5DJBmqLXNSaSzRRr4tKHGyjFVlxXYF1KRSitnHpHDo7OjbzSscaDumOEX+AmEk7fmivan+Py8bGufq3ItelpfVa9bClgmCVBrEnJh1q9T3kVEfk1zXhsSKzJJjsZ5RxGnXSMe3RnHEr6wYah3vckRjgSswX2FaucE/bzlx5p3s0xHqH0wNrovW8U0I4kuUYF28ISIBneCuD+gJrtv7DvlYhfQ== X-Forefront-PRVS: 013568035E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(13464003)(43544003)(377454003)(199003)(189002)(24454002)(51914003)(6116002)(7846002)(3846002)(53416004)(42186005)(189998001)(2906002)(110136003)(8676002)(4001350100001)(106356001)(93886004)(229853002)(1076002)(305945005)(7736002)(83506001)(38730400001)(9686002)(68736007)(69596002)(47776003)(81156014)(97736004)(33656002)(77096005)(81166006)(23726003)(5660300001)(4326007)(6916009)(97756001)(46406003)(6666003)(50466002)(101416001)(105586002)(92566002)(54356999)(66066001)(42882006)(50986999)(2950100002)(76176999)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1716; H:svelivela-lt.caveonetworks.com; 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; BLUPR0701MB1716; 23:qyDp/HTQjbZJ+4ZzLeYqdM2dcZ9xEb2HbpWSMvC?= =?us-ascii?Q?zUc2eeD3Z0/9pmhrWydzFMoY7skRNpsVL2mlOvPCvae5oMbZemu5ymVgusae?= =?us-ascii?Q?EkV6QLFwcesr08F2nDlvwnx59mhU/uC7HQqmQTM81Unmx7aVUUghBU6E81uU?= =?us-ascii?Q?y6QFlk9rio9t9JwKdrJZXdAY3bGs+7PPFolbSMp5q/In3GEJjC7vTLU7u6vn?= =?us-ascii?Q?Lip0aVVcKYVK3MAWIhtWDQ5wRwD75c4G5rcTo8FD6A0heTwcVc4QIYh3e21S?= =?us-ascii?Q?ApVhzn1uUNf4n4+okPwja0UCQWcfjnj+q/ulio6T06z1qSxmROoT4gqE0mU7?= =?us-ascii?Q?joxjKjcD+oraFsukAGmBZKrk5txnCX++JxYiVtPOXI+D6/BCoTE9E12Jl7Xh?= =?us-ascii?Q?EYFTUxFmpeOFSm+x9O1oSlIjhnGwNpcc8TzC/CG+v5FCKG2p/WP+6MZr+zJe?= =?us-ascii?Q?sme4Kpbetz0SXbBf864d6AZwfjHyhkbjc7Qt2HVWMpj9ksjaz6JhIk7dHgL+?= =?us-ascii?Q?+J+kKNe4i1GzZeJMvQyEVFfVo+e0nZGZXynw/khY95w20zEVVw1cdTDIqw08?= =?us-ascii?Q?uwEKZ5+qAiA6v2VkXehC+pWEZFBjJOD3g1HqxqF40ss/VSHqEmziqXT7sTmF?= =?us-ascii?Q?PnyHdg6dT1PM/KvLFpMojgzgaBNtSFRmhukkEX0VCtJIqF8eiQ0lwqlyv0tq?= =?us-ascii?Q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/eCKJYQwr2e5DIsKYF9Pe/wMgdHH0pwnff02g39u1kLTEvkF7ZaDY1LkOynZl8QEtJd2otKGKxQHLtTaPsDzR+4R1O2UuGiIPPsJi5dh4MLq7q7X8pacg22DW2wxkWPDHOZKD9bX39SSd7Ch94YCdd4UNB2qkj+d8=; 5:N+6jtCQHgjurQD8oBeycEiCwijK7Zpdt6zE5Q0TC2lH2V5Olsa2BYTOr86vXHkA7jiIkjJHOKsFCtToFYCceYtnXEJ/7h7YFiJ6rIj+tUL5QIBT7dL5SCDXuKbtYJPTXwTVzS7Ytexx8LCSBmzoFvA==; 24:u6Klk9fNMAMW/8Ujzokx5d+tdUk/7IYQJjKiUCymS8iLSELpaNoyREaSQXvxCT/FMccifMu0hcoCSDGCJ52/OEnQngelSSzZ7inDsdLNSDc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 7:eQ6D8ruYO0SctmCp/eKZ3lZ8MydZSXITR/+I5PMjSB7dSrBqyhLiJnUD2Ou/1wHj1/6VlxXQkGODey5tbxJdfBG1HOZuS+hljJohX25l0c5SM2HBhNWCDSSFB9uZms8nhPqdrE/zwyui8JrMW0z/X6EARgjqKN9ehYy0x+CZvyul8QpsZGi3tVCFZc1JfAyKTzo9PpHokAjy40wZ7TpitbNB/x7Y5ruNpd//t0nXeuUmvoEnfvJMoavnxANKyLfIAOqBM1g3Mqd9W4HhBVHZ0o7VfnAfgwKuqV/ylCbY8WqWlFhlj+ivTqrPHc2+jjyujZ5Ya0Al/PyuUhVZ3J80QaAApRHe5J9PUSH2OgoLn7Q= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2016 00:30:39.1775 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1716 Subject: Re: [dpdk-dev] [PATCH 7/7] examples/eventdev_pipeline: adding example X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 00:30:44 -0000 On Tue, Nov 22, 2016 at 02:04:27PM +0000, Richardson, Bruce wrote: > > > > -----Original Message----- > > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > > Sent: Tuesday, November 22, 2016 6:02 AM > > To: Van Haaren, Harry > > Cc: dev@dpdk.org; Eads, Gage ; Richardson, Bruce > > > > Subject: Re: [dpdk-dev] [PATCH 7/7] examples/eventdev_pipeline: adding > > example > > > > On Wed, Nov 16, 2016 at 06:00:07PM +0000, Harry van Haaren wrote: > > > This patch adds a sample app to the examples/ directory, which can be > > > used as a reference application and for general testing. The > > > application requires two ethdev ports and expects traffic to be > > > flowing. The application must be run with the --vdev flags as follows > > > to indicate to EAL that a virtual eventdev device called "evdev_sw0" is > > available to be used: > > > > > > ./build/eventdev_pipeline --vdev evdev_sw0 > > > > > > The general flow of the traffic is as follows: > > > > > > Rx core -> Atomic Queue => 4 worker cores => TX core > > > > > > A scheduler core is required to do the packet scheduling, making this > > > configuration require 7 cores (Rx, Tx, Scheduler, and 4 workers). > > > Finally a master core brings the core count to 8 for this > > > configuration. The > > > > Thanks for the example application.I will try to share my views on ethdev > > integration and usability perspective. Hope we can converge. > > Hi Jerin, > > thanks for the feedback. We'll take it on board for a subsequent version > we produce. Additional comments and queries on your feedback inline below. Thanks Bruce. > > /Bruce > > > > > Some of the high level details first before getting into exact details. > > > > 1) From the HW and ethdev integration perspective, The integrated NIC > > controllers does not need producer core(s) to push the event/packets to > > event queue. So, I was thinking to use 6WIND rte_flow spec to create the > > "ethdev port to event queue wiring" connection by extending the output > > ACTION definition, which specifies event queue its need to enqueued to for > > the given ethdev port (something your are doing in application). > > > > I guess, the producer part of this example can be created as common code, > > somewhere in rte_flow/ethdev to reuse. We would need this scheme also > > where when we deal with external nics + HW event manager use case > > > Yes. This is something to consider. > > For the pure-software model, we also might want to look at the opposite > approach, where we register an ethdev with the scheduler for it to "pull" > new packets from. This would allow it to bypass the port logic for the new > packets. Not sure,I understand this completely. How different its integrating with rte_flow specification ? > > An alternative for this is to extend the schedule API to allow a burst of > packets to be passed in to be scheduled immediately as "NEW" packets. The end > results should be the same, saving cycles by bypassing unneeded processing > for the new packets. > > > The complete event driven model can be verified and exercised without > > integrating with eventdev subsystem. So I think, may be we need to focus > > on functional applications without ethdev to verify the eventdev features > > like(automatic multicore scaling, dynamic load balancing, pipelining, > > packet ingress order maintenance and synchronization services) and then > > integrate with ethdev > > Yes, comprehensive unit tests will be needed too. But an example app that > pulls packets from an external NIC I also think is needed to get a feel > for the performance of the scheduler with real traffic. I agree, we need to have example to show case with real traffic. Please check on ethdev integration aspects. Cavium has both server (that's going to use SW event pmd) and NPU based platform(that's going to use HW event pmd). So we would like to have common approach that makes integration of both models with out changing the application. I was thinking more with "service core" and "rte_flow" based integration methodology to make that happen. > > > > > > + const unsigned cores_needed = num_workers + > > > + /*main*/1 + > > > + /*sched*/1 + > > > + /*TX*/1 + > > > + /*RX*/1; > > > + > > > > 2) One of the prime aims of the event driven model is to remove the fixed > > function core mappings and enable automatic multicore scaling, dynamic > > load balancing etc.I will try to use an example in review section to show > > the method for removing "consumer core" in this case. > > Yes, I agree, but unfortunately, for some tasks, distributing those tasks > across multiple cores can hurt performance overall do to resource contention. May only in SW implementation. > > > > > > application can be configured for various numbers of flows and worker > > > cores. Run the application with -h for details. > > > > > > > Another way to deal wit out additional consumer core(it creates issue in > > scaling and load balancing) is > > > > in worker: > > while(1) { > > > > ev = dequeue(port); > > > > // stage 1 app processing > > if (ev.event_type == RTE_EVENT_TYPE_ETHDEV) { > > // identify the Ethernet port and tx queue the packet needs to > > go > > // create the flow based on that > > ev.flow_id = flow(port_id, tx_queue_id); > > ev.sched_type = RTE_SCHED_TYPE_ATOMIC; > > ev.operation = RTE_EVENT_OP_FORWARD; > > ev.event_type = RTE_EVENT_TYPE_CORE; > > } // stage 2 app processing > > else if (ev.event_type == RTE_EVENT_TYPE_CORE) { > > port_id = function_of(ev.flow_id) ;// look stage 1 processing > > tx_queue_id = function_of(ev.flow_id) //look stage 1 > > processing > > remaining ethdev based tx is same as yours > > } > > enqueue(ev); > > } > > > Yes, but you still need some core to do the work of pushing the packets into > the scheduler from the NIC, if you don't have a hardware path from NIC to > HW scheduler. [Features like RSS can obviously help here with distributing that > work if needed] Yes. make sense to have producer portion of code as common code. > > In the case you do have a HW path - which I assume is the Cavium case - I assume > that the EVENT_TYPE_ETHDEV branch above needs also to take care of desc to mbuf > processing, as is normally done by the PMD? > > > > > > > > + ev->priority = 0; > > > + ev->sched_type = RTE_SCHED_TYPE_ATOMIC; > > > + ev->operation = RTE_EVENT_OP_FORWARD; > > > + > > > + uint64_t now = rte_rdtsc(); > > > + while(now + 750 > rte_rdtsc()) {} > > > > Why delay ? > > Simulate some work being done by the worker, which makes the app slightly more > realistic and also helps the scheduler as there is not so much contention on the > shared cache lines. May not for performance test-cases. >