From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f66.google.com (mail-vk0-f66.google.com [209.85.213.66]) by dpdk.org (Postfix) with ESMTP id 333BDC2FC for ; Wed, 8 Jun 2016 21:49:19 +0200 (CEST) Received: by mail-vk0-f66.google.com with SMTP id t7so3042520vkf.2 for ; Wed, 08 Jun 2016 12:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CcuQF+bm3pvi9s2hFkMb68TXjxMuBlMdmFioPahuUD4=; b=h96di5eXVJs/QHSCo1AO9keyxGytpRCZDANFuZbC5T2R4B/HBJFq/xODnHQwDDxj3i PhIXLoFTUL0c+PLLvDxJ4nnLegUjmXkNNbUxq4ks1wucRruo9/phwD+QWvRz3SXU4vVz 0qEUC89pvEWEha5/4TSGIm+XXoxj2Q7RZp/LCWZNfUTShW/zOFb0cjGbqgdmnXqiBfsa sa2DC2q0W8fJKEvKCpIlk4n1k2iQCw0KX7m3noqamtd8cvS9pQh519oASnh2tx+IqYOD nWw+McaCXyneLeTqMz3qa+91Y/DUUwzr2PYjL7Rsgv1NGLhbp5E9zdqmK4zR/nsti8v5 k40g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CcuQF+bm3pvi9s2hFkMb68TXjxMuBlMdmFioPahuUD4=; b=cDTsHHbWnKY/8lFmy55+oetne1BR9c0Cpw8kgaHWhV4HxYYv6iSyq2po9AsRJhRmPH AZB+HgVkqblTFeTisQgd1v3AmdgCYziJ+bTNMusMBOIgzrGd97xHLN+V4EODpBgMw3Bz crF0ZGYdYmn1B9AGZRzSDss/1XV4NuijguLA7w9DsKSFHRwcZYtguBWsrPAt99G9nMqx RHI8t6NEFOeSCxAmyNdphXqCw8EVkfu6LHv15oleSvkUkPErvheM9Mvbq/4qrZs66opD sLvHMpE15GVeWgTYOv6XTqjvirj/mkueqj891J3kCcmpZA+AhGYoNNnPxJTtDU5e1F1O 6wJg== X-Gm-Message-State: ALyK8tKOrQcmsIdF3u+O3Kxe4fiENvDip/lUQBylmOexxA5iPQt4dDvjQNj5BaJbEfLJRZKaofFKtB4Jn1w+mg== X-Received: by 10.31.130.71 with SMTP id e68mr3102603vkd.145.1465415358726; Wed, 08 Jun 2016 12:49:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.159.37.183 with HTTP; Wed, 8 Jun 2016 12:49:18 -0700 (PDT) In-Reply-To: References: <57587289.7050805@intel.com> From: Cliff Burdick Date: Wed, 8 Jun 2016 12:49:18 -0700 Message-ID: To: Ferruh Yigit Cc: users Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] KNI Threads/Cores X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 19:49:19 -0000 Ferruh, sorry. On Wed, Jun 8, 2016 at 12:48 PM, Cliff Burdick wrote: > Hi Yigit, when you say "I guess it's possible" is that not common? I would > think that the amount of traffic people would want to forward to Linux for > normal DPDK applications would be quite small. If you had to have a core > dedicated for KNI on each interface that would get very wasteful. > > On Wed, Jun 8, 2016 at 12:31 PM, Ferruh Yigit > wrote: > >> On 6/8/2016 5:30 PM, Cliff Burdick wrote: >> > Hi, I have an application with two sockets where each core I'm planning >> to >> > transmit and receive a fairly large amount of traffic per core. Each >> core >> > right now handles a single queue of either TX or RX of a given port. >> Across >> > all the cores, I may be processing up to 12 ports. I also need to handle >> > things like ARP and ping, so I'm going to add in the KNI driver to >> handle >> > that. Since the amount of traffic I'm expecting that I'll need to >> forward >> > to Linux is very small, it seems like I should be able to dedicate one >> > lcore per socket to handle this functionality and have the dataplane >> cores >> > pass the traffic off to this core using rte_kni_tx_burst(). >> > >> > My question is, first of all, is this possible? It seems like I can >> > configure the KNI driver to start in "single thread" mode. From that >> point, >> > I want to initialize one KNI device for each port, and have each kernel >> > lcore on each processor handle that traffic. I believe if I call >> > rte_kni_alloc with core_id set to the kernel lcore for each device, >> then in >> > the end I'll have something like 6 KNI devices on socket one being >> handled >> > by lcore 0, and 6 KNI devices on socket 2 being handled by lcore 31 as >> an >> > example. Then my threads that are handling the dataplane tx/rx can >> simply >> > be passed a pointer to their respective rte_kni device. Does this sound >> > correct? >> >> If rte_kni module used "single thread" mode, kernel core_id is not used >> at all. For single thread mode, a single thread created, this is used to >> for all kni devices and not able to pin to any specific lcore. >> >> For what you have described, first need to insert module with >> kthread_mode=multiple param. This will create a kernel thread per kni >> interface. But I guess it is possible to provide same >> rte_kni_conf->core_id for some of them, and yes rte_kni_conf->force_pin >> is required, otherwise core_id is not useful. According your sample, >> first 6 kni devices will have core_id value 0, and other 6 kni devices >> will have core_id value 31, with all have force_bind set. This will >> create 12 kernel threads, will bind 6 of them to core 0 and other 6 to >> core 31. >> >> > >> > Also, the sample says the core affinity needs to be set using taskset. >> Is >> > that already taken care of with conf.core_id in rte_kni_alloc or do I >> still >> > need to set it? >> > >> > Thanks >> > >> >> >