From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bear.techie.net (bear.techie.net [205.134.185.202]) by dpdk.org (Postfix) with ESMTP id E449D58EE for ; Fri, 26 Jul 2013 22:04:28 +0200 (CEST) Received: from bear.techie.net (localhost.localdomain [127.0.0.1]) by bear.techie.net (8.13.8/8.13.8) with ESMTP id r6QK4pvp029148 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 26 Jul 2013 16:04:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=techie.net; s=default; t=1374869092; bh=34OIvV2ptUrjNJw1II5I5O7an9VtOFsT/Cvb/jypL8I=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=2p13QV1D9LH1g99Z0WRJerNZ43scofnrCxy3otcGvIJhNPR9mAR3brTJUt8osX50V hj3qFstz6x9mh1PI2BuMQZSxpNnhqXxu0BTN6pPqepbBcVcHSQ2mtrJFohjIRrfQaq bQoQirMwaxJuz9owmZHZy2z61BQpHX/eArwNhL+E= Received: from localhost (talbert@localhost) by bear.techie.net (8.13.8/8.13.8/Submit) with ESMTP id r6QK4pQh029145; Fri, 26 Jul 2013 16:04:51 -0400 X-Authentication-Warning: bear.techie.net: talbert owned process doing -bs Date: Fri, 26 Jul 2013 16:04:51 -0400 (EDT) From: Scott Talbert X-X-Sender: talbert@bear.techie.net To: Stephen Hemminger In-Reply-To: <20130726125322.0ecbca48@nehalam.linuxnetplumber.net> Message-ID: References: <20130726125322.0ecbca48@nehalam.linuxnetplumber.net> User-Agent: Alpine 2.03 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: dev@dpdk.org Subject: Re: [dpdk-dev] NIC Stops Transmitting 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: Fri, 26 Jul 2013 20:04:29 -0000 On Fri, 26 Jul 2013, Stephen Hemminger wrote: >> I'm writing an application using DPDK that transmits a large number of >> packets (it doesn't receive any). When I transmit at 2 Gb/sec, everything >> will run fine for several seconds (receiver is receiving at correct rate), >> but then the NIC appears to get 'stuck' and doesn't transmit any more >> packets. In this state, rte_eth_tx_burst() is returning zero (suggesting >> that there are no available transmit descriptors), but even if I sleep() >> for a second and try again, rte_eth_tx_burst() still returns 0. It almost >> appears as if a packet gets stuck in the transmit ring and keeps >> everything from flowing. I'm using an Intel 82599EB NIC. >> > Make sure there is enough memory for mbufs. > Also what is your ring size and transmit free threshold? > It is easy to instrument the driver to see where it is saying "no space left" > Also be careful with threshold values, many values of pthresh/hthresh/wthresh > don't work. I would check the Intel reference manual for your hardware. Thanks for the tips. I don't think I'm running out of mbufs, but I'll check that again. I am using these values from one of the examples - which claim to be correct for the 82599EB. /* * These default values are optimized for use with the Intel(R) 82599 10 GbE * Controller and the DPDK ixgbe PMD. Consider using other values for other * network controllers and/or network drivers. */ #define TX_PTHRESH 36 /**< Default values of TX prefetch threshold reg. */ #define TX_HTHRESH 0 /**< Default values of TX host threshold reg. */ #define TX_WTHRESH 0 /**< Default values of TX write-back threshold reg. */ static const struct rte_eth_txconf tx_conf = { .tx_thresh = { .pthresh = TX_PTHRESH, .hthresh = TX_HTHRESH, .wthresh = TX_WTHRESH, }, .tx_free_thresh = 0, /* Use PMD default values */ .tx_rs_thresh = 0, /* Use PMD default values */ }; /* * Configurable number of RX/TX ring descriptors */ #define RTE_TEST_TX_DESC_DEFAULT 512 static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;