From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot0-f179.google.com (mail-ot0-f179.google.com [74.125.82.179]) by dpdk.org (Postfix) with ESMTP id 2C79AF928 for ; Wed, 18 Jan 2017 10:51:08 +0100 (CET) Received: by mail-ot0-f179.google.com with SMTP id 73so5397210otj.0 for ; Wed, 18 Jan 2017 01:51:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=imvisiontech-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Nf6FU4K/uAlElidqsph6MepAWUHCGyFDN4V5vdSpXrk=; b=tcqFnaY1+2Pm2v2iuKbU5PpKt9saHtAJlQxzPLQuKbeA0zEat0GuemMWp/HAMP7SWC ou3JaYME3rAyKXz50EjpO0RbF6Ox83tevFHoqraJ1J8BuoCv1ekIyXBcYEbnIhzfX++D k9cghycQOyV0aB/CqEWgX9xR4UsCrriuZIaQcLiRux+YpXEczeauXVD6uewsHXx2pjv9 yVxuCP/tU5r+94nmGCY9kwPNQFL5TYKJe6ghM5f64eB1DHaB9+UIxsKT7z2B2w0iOtaW ExjPKIoksfQ6phgK9Og5uxlykaaP0+h12dW5XtNgXSZ7LkBTMEye2ZgMx758/rx1dDpi ktWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Nf6FU4K/uAlElidqsph6MepAWUHCGyFDN4V5vdSpXrk=; b=U6JRR0wTxjMhicQFPz9c7ROFRUpltrLsy7soQo8IWo+eVqLCWw2pEbsV8xHj/TLlYF 0skXVTAR4FnLCGWdNaqvFVifXoTdgbavOvM1uD1Q/ZCcCGOuvER9Diu07X1Ua977+hxL QO5hMRxYFDp1R7XW40Ov39usmmK7mOdfJXUcJYlaYHClT1gN0KJgCZyKPFQNX0VAGPPI 1EtWyGF9WVtPRxjap8mXhw5IsJhOll5IYqlTsF4YzK3NdlFKIfj+KWMEuqNCHko4zx0A MGphlWdT1gNpsfMxNwYadkppWmdGMx6WwQcVqwNNXMRqI+fkamF3OCVvFY4iaa/qp+yp 1HZQ== X-Gm-Message-State: AIkVDXI/kjU4S32Ry7SvQnxI6+pnUPVm6mNMqWYVq/aJHMUnJ7x1gKayNkK9WyGeaCBm/AmNZ77fMPJDWxY3Aw== X-Received: by 10.157.5.6 with SMTP id 6mr1152653otw.209.1484733068044; Wed, 18 Jan 2017 01:51:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.50.70 with HTTP; Wed, 18 Jan 2017 01:51:07 -0800 (PST) In-Reply-To: References: <900f05e3-f251-2526-de4a-4c1e3ca5d713@intel.com> From: Shirley Avishour Date: Wed, 18 Jan 2017 11:51:07 +0200 Message-ID: To: Ferruh Yigit Cc: dev@dpdk.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] drops while transmitting to the kni using rte_kni_tx_burst() 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, 18 Jan 2017 09:51:09 -0000 Hi, thanks for the quick answer. I ran the same test with one kni port with the following configuration: sudo insmod rte_kni.ko lo_mode=lo_mode_fifo_skb sudo ./kni -c 0xf -n 4 -- -P p 0x1 --config="(0,1,2,3)" and transmitted towards the single port traffic with rate of 300Mbps. as you can see below I have packet drops: what is the difference between what you tested and what I see below? is there some other configuration or adjustments to be done on the kni that I am missing? ====== ============== ============ ============ ============ ============ **KNI example application statistics** ====== ============== ============ ============ ============ ============ Port Lcore(RX/TX) rx_packets rx_dropped tx_packets tx_dropped ------ -------------- ------------ ------------ ------------ ------------ 0 1/ 2 106059534 21978 106058868 0 ====== ============== ============ ============ ============ ============ **KNI example application statistics** ====== ============== ============ ============ ============ ============ Port Lcore(RX/TX) rx_packets rx_dropped tx_packets tx_dropped ------ -------------- ------------ ------------ ------------ ------------ 0 1/ 2 106137710 21995 106137054 0 ====== ============== ============ ============ ============ ============ **KNI example application statistics** ====== ============== ============ ============ ============ ============ Port Lcore(RX/TX) rx_packets rx_dropped tx_packets tx_dropped ------ -------------- ------------ ------------ ------------ ------------ 0 1/ 2 106217479 21995 106216603 0 ====== ============== ============ ============ ============ ============ **KNI example application statistics** ====== ============== ============ ============ ============ ============ Port Lcore(RX/TX) rx_packets rx_dropped tx_packets tx_dropped ------ -------------- ------------ ------------ ------------ ------------ 0 1/ 2 116349769 24150 116349796 0 ====== ============== ============ ============ ============ ============ **KNI example application statistics** ====== ============== ============ ============ ============ ============ Port Lcore(RX/TX) rx_packets rx_dropped tx_packets tx_dropped ------ -------------- ------------ ------------ ------------ ------------ 0 1/ 2 116349769 24150 116349796 0 ====== ============== ============ ============ ============ ============ ^[[A **KNI example application statistics** ====== ============== ============ ============ ============ ============ Port Lcore(RX/TX) rx_packets rx_dropped tx_packets tx_dropped ------ -------------- ------------ ------------ ------------ ------------ 0 1/ 2 117954991 24530 117954361 0 ====== ============== ============ ============ ============ ============ On Tue, Jan 17, 2017 at 7:57 PM, Ferruh Yigit wrote: > On 1/17/2017 5:46 PM, Ferruh Yigit wrote: > > On 1/16/2017 2:58 PM, Shirley Avishour wrote: > >> I am currently using the kernel interface for recording the received > >> traffic by duplicating the received packets and sending a copy to the > >> kni (and performing pcap_open_live on the kni). > >> my goal rate is around 500Mbps. is it possible to achieve it via the > kni ?? > > > > According quick experiment, > > - with kni module lo_mode_fifo_skb (which send all received packets to > > tx, but allocating and copying data to skb to be more realistic) > > - single kernel thread > > - kernel thread bind to a core > > - using kni sample app > > - With small packets > > > > Best numbers get when rx,tx and kernel cores are in same socket with the > > NIC, it is ~1.7Mpps (million packet per second) > > > > When KNI_RX_LOOP_NUM increased to 10000, it becomes ~1.9Mpps. > > > > And again, very quick test, between two KNI ports, with kni sample app, > using iperf default values, gives ~3 Gbits/sec > > >> > >> > >> On Mon, Jan 16, 2017 at 4:55 PM, Ferruh Yigit >> > wrote: > >> > >> On 1/16/2017 2:47 PM, Shirley Avishour wrote: > >> > Hi, > >> > As I wrote the kernel thread runs on a dedicated lcore. > >> > running top while my application is running I see kni_single and > the cpu > >> > usage is really low... > >> > Is there any rate limitation for transmitting to the kernel > interface > >> > (since packets are being copied in the kernel). > >> > >> Yes, kind of, kernel thread sleeps periodically, with a value > defined by > >> KNI_KTHREAD_RESCHEDULE_INTERVAL. You can try tweaking this value, > if you > >> want thread do more work, less sleep J > >> > >> Also KNI_RX_LOOP_NUM can be updated for same purpose. > >> > >> > > >> > > >> > On Mon, Jan 16, 2017 at 4:42 PM, Ferruh Yigit < > ferruh.yigit@intel.com > >> > >> > >> wrote: > >> > > >> > On 1/16/2017 12:20 PM, Shirley Avishour wrote: > >> > > Hi, > >> > > I have an application over dpdk which is consisted of the > >> following threads > >> > > each running on a separate core: > >> > > 1) rx thread which listens on in a poll mode for traffic > >> > > 2) 2 packet processing threads (for load balancing) > >> > > 3) kni thread (which also runs on a separate core). > >> > > >> > This is kernel thread, right? Is it bind to any specific core? > >> > Is it possible that this thread shares the core with 2nd > >> processing > >> > thread when enabled? > >> > > >> > > > >> > > the rx thread receives packets and clones them and transmit > >> a copy > >> > to the > >> > > kni and the other packet is sent to the packet processing > unit > >> > (hashing > >> > > over 2 threads). > >> > > the receive traffic rate is 100Mbps. > >> > > When working with single packet processing thread I am able > >> to get > >> > all the > >> > > 100Mbps towards the kni with no drops. > >> > > but when I activate my application with 2 packet processing > >> > threads I start > >> > > facing drops towards the kni. > >> > > the way I see it the only difference now is that I have > another > >> > threads > >> > > which handles an mbuf and frees it once processing is > completed. > >> > > Can anyone assist with this case please? > >> > > > >> > > Thanks! > >> > > > >> > > >> > > >> > >> > > > >