From: Jianfeng Tan <jianfeng.tan@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] examples/vhost: fix out of sequence packets
Date: Wed, 20 Jan 2016 03:18:11 +0800 [thread overview]
Message-ID: <1453231091-117603-1-git-send-email-jianfeng.tan@intel.com> (raw)
Issue description: when packets go through vhost example to virtio
device and come back to another virtio device or physical NIC, the
sequence of packets will be changed.
Reported-by: Thomas Long <thomas.long@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
examples/vhost/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 2dcdacb..aa9aa5a 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1336,8 +1336,8 @@ switch_worker(__attribute__((unused)) void *arg)
rte_pktmbuf_free(pkts_burst[--tx_count]);
}
}
- while (tx_count)
- virtio_tx_route(vdev, pkts_burst[--tx_count], (uint16_t)dev->device_fh);
+ for (i = 0; i < tx_count; ++i)
+ virtio_tx_route(vdev, pkts_burst[i], (uint16_t)dev->device_fh);
}
/*move to the next device in the list*/
--
2.1.4
next reply other threads:[~2016-01-20 2:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-19 19:18 Jianfeng Tan [this message]
2016-01-20 2:47 ` Yuanhan Liu
2016-02-28 21:31 ` Thomas Monjalon
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=1453231091-117603-1-git-send-email-jianfeng.tan@intel.com \
--to=jianfeng.tan@intel.com \
--cc=dev@dpdk.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).