From: Srinivasreddy R <srinivasreddy4390@gmail.com>
To: "dpdk-ovs@lists.01.org" <dpdk-ovs@lists.01.org>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] usvhost interface dropping packets
Date: Thu, 26 Mar 2015 20:31:05 +0530 [thread overview]
Message-ID: <CAJP4VWgN+0OC06RnYh=XDojgxzcPW8jF_zYjL117kzZ4Q5TWaA@mail.gmail.com> (raw)
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.
reply other threads:[~2015-03-26 15:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJP4VWgN+0OC06RnYh=XDojgxzcPW8jF_zYjL117kzZ4Q5TWaA@mail.gmail.com' \
--to=srinivasreddy4390@gmail.com \
--cc=dev@dpdk.org \
--cc=dpdk-ovs@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).