From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by dpdk.org (Postfix) with ESMTP id 51A15A69 for ; Thu, 26 Mar 2015 16:01:05 +0100 (CET) Received: by wiaa2 with SMTP id a2so26493928wia.0 for ; Thu, 26 Mar 2015 08:01:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=XlT92KDNcL60aI2RrmXQmC+2PkU2rLS9DdRB4ggGUdc=; b=C5ZGNULfG7A9iuvIwcgK4Gzx2uz2muBAf3XKAxbDlZ11d7HsfIc3Eekg+WZVnNJkof diHg7DHHmrTYTs3V5qJIYH/nN8yjWkea2o4xMBa26ThfXL5qqxmIVKQiY/8H/Nbi/WC9 MerkPt+mptlitzsra8GUxtlh42yZokMOOv9lFakiy/2XwjuxDCqem6foYy5MjS16pwqb P7GNp4UQ6dpgDp03C/O4oFSRjUvZ60SjXbnO60KRZPNawTnzItrGZLqIwedPXlm2qHbU ZRkTVjQNpT2c1o9gSfH+ujXnQJZix0K7VNrACTQtLuvmM0IxWR7GGqGIDtlDimkv1rvw GAYQ== MIME-Version: 1.0 X-Received: by 10.180.88.42 with SMTP id bd10mr9522141wib.25.1427382065124; Thu, 26 Mar 2015 08:01:05 -0700 (PDT) Received: by 10.27.125.87 with HTTP; Thu, 26 Mar 2015 08:01:05 -0700 (PDT) Date: Thu, 26 Mar 2015 20:31:05 +0530 Message-ID: From: Srinivasreddy R To: "dpdk-ovs@lists.01.org" , "dev@dpdk.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] usvhost interface dropping packets 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, 26 Mar 2015 15:01:05 -0000 hi, I am using usvhost interfaces for VM to VM communication with ovdk Version 1.2 . when i am sending packets form one VM to another using PacketGen , i observed packet drop . the reason for this is , when packets are send in burst on vhost interface it checks for the free entries in vhost_virtqueue .if the free enteries are not available it retries and waits for some time . then the ovdk drops the packets . my question is : How can i avoid packet drop . i tried increasing retries and delay . it helped in reducing the loss but not completely . is there any solution for avoiding the drop . i have observed drop even at a very less traffic . am i missing any thing . how can i proceed further . the code part is : FILE : *rte_port_vhost.c* static inline uint32_t __attribute__((always_inline)) pf_vhost_enqueue_burst(struct virtio_net *dev, struct rte_mbuf **pkts, unsigned count) { struct vhost_virtqueue *vq; struct vring_desc *desc; MODULE_DBG_LOG( "(%"PRIu64") virtio_dev_rx()\n", dev->device_fh); vq = dev->virtqueue[VIRTIO_RXQ]; count = (count > PKT_BURST_SIZE) ? PKT_BURST_SIZE : count; /* As many data cores may want access to available buffers, they need to be reserved. */ do { res_base_idx = vq->last_used_idx_res; avail_idx = *((volatile uint16_t *)&vq->avail->idx); free_entries = (avail_idx - res_base_idx); /* If retry is enabled and the queue is full then we wait and retry to avoid packet loss. */ if (unlikely(count > free_entries)) { for (retry = 0; retry < g_burst_tx_retry_num; retry++) { rte_delay_us(g_burst_tx_delay_time); avail_idx = *((volatile uint16_t *)&vq->avail->idx); free_entries = (avail_idx - res_base_idx); if (count <= free_entries) break; } } ---------- thanks srinivas.