DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] lib_vhost:reset secure_len when rte_atomic16_cmpset failed
@ 2015-06-01  6:11 Wei li
  2015-06-01  6:14 ` Ouyang, Changchun
  0 siblings, 1 reply; 4+ messages in thread
From: Wei li @ 2015-06-01  6:11 UTC (permalink / raw)
  To: dev

when rte_atomic16_cmpset return 0 in first loop, secure_len
 should be reset to 0 in second loop, otherwise (pkt_len > secure_len) always
 be false, the num of desc maybe not enough

Signed-off-by: Wei li <liw@dtdream.com>
---
 lib/librte_vhost/vhost_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
 
v1->v2
add more descriotion
delete unnecessary variable assignment

diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c
index 4809d32..b7e356c 100644
--- a/lib/librte_vhost/vhost_rxtx.c
+++ b/lib/librte_vhost/vhost_rxtx.c
@@ -418,7 +418,7 @@ virtio_dev_merge_rx(struct virtio_net *dev, uint16_t queue_id,
 		return 0;
 
 	for (pkt_idx = 0; pkt_idx < count; pkt_idx++) {
-		uint32_t secure_len = 0;
+		uint32_t secure_len;
 		uint16_t need_cnt;
 		uint32_t vec_idx = 0;
 		uint32_t pkt_len = pkts[pkt_idx]->pkt_len + vq->vhost_hlen;
@@ -431,6 +431,7 @@ virtio_dev_merge_rx(struct virtio_net *dev, uint16_t queue_id,
 			 */
 			res_base_idx = vq->last_used_idx_res;
 			res_cur_idx = res_base_idx;
+			secure_len = 0;
 
 			do {
 				avail_idx = *((volatile uint16_t *)&vq->avail->idx);
-- 
1.9.5.msysgit.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v2] lib_vhost:reset secure_len when rte_atomic16_cmpset failed
  2015-06-01  6:11 [dpdk-dev] [PATCH v2] lib_vhost:reset secure_len when rte_atomic16_cmpset failed Wei li
@ 2015-06-01  6:14 ` Ouyang, Changchun
  2015-06-22 16:33   ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Ouyang, Changchun @ 2015-06-01  6:14 UTC (permalink / raw)
  To: Wei li, dev



> -----Original Message-----
> From: Wei li [mailto:liw@dtdream.com]
> Sent: Monday, June 1, 2015 2:12 PM
> To: dev@dpdk.org
> Cc: Ouyang, Changchun; liw@dtdream.com
> Subject: [PATCH v2] lib_vhost:reset secure_len when rte_atomic16_cmpset
> failed
> 
> when rte_atomic16_cmpset return 0 in first loop, secure_len  should be
> reset to 0 in second loop, otherwise (pkt_len > secure_len) always  be false,
> the num of desc maybe not enough
> 
> Signed-off-by: Wei li <liw@dtdream.com>

Acked-by: Changchun Ouyang<changchun.ouyang@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v2] lib_vhost:reset secure_len when rte_atomic16_cmpset failed
  2015-06-01  6:14 ` Ouyang, Changchun
@ 2015-06-22 16:33   ` Thomas Monjalon
  2015-06-23  2:24     ` Ouyang, Changchun
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2015-06-22 16:33 UTC (permalink / raw)
  To: Ouyang, Changchun, Wei li; +Cc: dev

2015-06-01 06:14, Ouyang, Changchun:
> From: Wei li, June 1, 2015 2:12 PM:
> > when rte_atomic16_cmpset return 0 in first loop, secure_len  should be
> > reset to 0 in second loop, otherwise (pkt_len > secure_len) always  be false,
> > the num of desc maybe not enough
> > 
> > Signed-off-by: Wei li <liw@dtdream.com>
> 
> Acked-by: Changchun Ouyang<changchun.ouyang@intel.com>

Is it already fixed by this commit?
	http://dpdk.org/browse/dpdk/commit/?id=2927c37ca4e04067

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v2] lib_vhost:reset secure_len when rte_atomic16_cmpset failed
  2015-06-22 16:33   ` Thomas Monjalon
@ 2015-06-23  2:24     ` Ouyang, Changchun
  0 siblings, 0 replies; 4+ messages in thread
From: Ouyang, Changchun @ 2015-06-23  2:24 UTC (permalink / raw)
  To: Thomas Monjalon, Wei li; +Cc: dev

Hi Thomas,

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Tuesday, June 23, 2015 12:34 AM
> To: Ouyang, Changchun; Wei li
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] lib_vhost:reset secure_len when
> rte_atomic16_cmpset failed
> 
> 2015-06-01 06:14, Ouyang, Changchun:
> > From: Wei li, June 1, 2015 2:12 PM:
> > > when rte_atomic16_cmpset return 0 in first loop, secure_len  should
> > > be reset to 0 in second loop, otherwise (pkt_len > secure_len)
> > > always  be false, the num of desc maybe not enough
> > >
> > > Signed-off-by: Wei li <liw@dtdream.com>
> >
> > Acked-by: Changchun Ouyang<changchun.ouyang@intel.com>
> 
> Is it already fixed by this commit?
> 	http://dpdk.org/browse/dpdk/commit/?id=2927c37ca4e04067

You are right, so no need apply this patch. 
Thanks
Changchun

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-23  2:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-01  6:11 [dpdk-dev] [PATCH v2] lib_vhost:reset secure_len when rte_atomic16_cmpset failed Wei li
2015-06-01  6:14 ` Ouyang, Changchun
2015-06-22 16:33   ` Thomas Monjalon
2015-06-23  2:24     ` Ouyang, Changchun

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).