From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.ndsl.kaist.edu (www.ndsl.kaist.ac.kr [143.248.57.3]) by dpdk.org (Postfix) with ESMTP id 05657592B for ; Thu, 15 Oct 2015 10:32:47 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.ndsl.kaist.edu (Postfix) with ESMTP id 41737C0587 for ; Thu, 15 Oct 2015 17:32:47 +0900 (KST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ndsl.kaist.edu; h=content-type:content-type:mime-version:user-agent:date:date :message-id:subject:subject:from:from:to; s=dkim; t=1444897966; x=1445761966; bh=42RDl1PnNvt6cZciIMuse9eRHa0BHj84YnsmSA/L2aI=; b= BJNEWkbwo2geLSxYff7JE671zl2xAT6ar3JzK6BsHUdxJk6OFxHiaSdLwYWKqTu3 gzJK/C7YkA5aSRl32O9pU9hAZhi/gs5dV0hn1jJ8yNCFwwBtUtZn1qWAbFdtPF83 ZjjCqeis9F0F4W0cbjihR1bgb50dkyMepsrP8WoIk84= X-Virus-Scanned: Debian amavisd-new at ndsl.kaist.ac.kr Received: from mail.ndsl.kaist.edu ([127.0.0.1]) by localhost (ndsl.kaist.ac.kr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id htYlTwsvW9EW for ; Thu, 15 Oct 2015 17:32:46 +0900 (KST) Received: from [10.0.2.15] (ndsl-pc2.kaist.ac.kr [143.248.129.22]) by mail.ndsl.kaist.edu (Postfix) with ESMTPSA id 9BFD4C01C8 for ; Thu, 15 Oct 2015 17:32:45 +0900 (KST) To: dev@dpdk.org From: Younghwan Go Message-ID: <561F64BA.2000502@ndsl.kaist.edu> Date: Thu, 15 Oct 2015 17:32:58 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] Calling rte_eth_rx_burst() multiple times 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: Thu, 15 Oct 2015 08:32:47 -0000 Hi, I'm pretty new to playing with DPDK. I was trying to see if I can always receive MAX_BURST packets by calling rte_eth_rx_burst() multiple times on same pair (code shown below). I'm using DPDK-2.1.0 on 2 dual-port Intel 82599ES 10Gbps NICs with Ubuntu 14.04.3 (kernel 3.13.0-63-generic). Since packet processing is slower (~10 Gbps) than pure RX speed (~40 Gbps), I assumed rte_eth_rx_burst() would always receive some number of packets, eventually filling up MAX_BURST. But for multi-core case (4 CPUs, 4 ports), rte_eth_rx_burst() starts to always return 0 after some time, causing all cores to be blocked forever. Analyzing the DPDK code (drivers/net/ixgbe/ixgbe_rxtx.c), I'm seeing that inside ixgbe_rx_scan_hw_ring() function, "rxdp->wb.upper.status.error" always returns 0 (where is this value set by the way?). I didn't see this problem for single-core case, in which it returned MAX_BURST packets at every rte_eth_rx_burst() call. Also, if I break out of while loop when I receive 0, I keep receiving packets in next pairs. Does anyone know why this block might happen? Or am I not allowed to call rte_eth_rx_burst() multiple times on same pair if I get 0? Any help will be great! Thank you! ------------------------------------------------------------------------ int cnt = MAX_BURST; // MAX_BURST = 32 int off = 0; do { ret = rte_eth_rx_burst(port_id, queue_id, &m_table[off], cnt); if (ret == 0) { // don't break out but continue } else if (ret > 0) { off += ret; cnt -= ret; } } while (cnt > 0); ------------------------------------------------------------------------ Best, Younghwan