* [dpdk-dev] usvhost interface dropping packets
@ 2015-03-26 15:01 Srinivasreddy R
0 siblings, 0 replies; only message in thread
From: Srinivasreddy R @ 2015-03-26 15:01 UTC (permalink / raw)
To: dpdk-ovs, dev
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-03-26 15:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-26 15:01 [dpdk-dev] usvhost interface dropping packets Srinivasreddy R
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).