[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-11-17 Thread Jason Wang
On 11/17/2015 04:23 PM, Michael S. Tsirkin wrote: > On Mon, Nov 16, 2015 at 02:20:57PM -0800, Flavio Leitner wrote: >> > On Wed, Oct 28, 2015 at 11:12:25PM +0200, Michael S. Tsirkin wrote: >>> > > On Wed, Oct 28, 2015 at 06:30:41PM -0200, Flavio Leitner wrote: > > > On Sat, Oct 24, 2015 at

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-11-17 Thread Flavio Leitner
On Tue, Nov 17, 2015 at 10:23:38AM +0200, Michael S. Tsirkin wrote: > On Mon, Nov 16, 2015 at 02:20:57PM -0800, Flavio Leitner wrote: > > On Wed, Oct 28, 2015 at 11:12:25PM +0200, Michael S. Tsirkin wrote: > > > On Wed, Oct 28, 2015 at 06:30:41PM -0200, Flavio Leitner wrote: > > > > On Sat, Oct

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-11-17 Thread Michael S. Tsirkin
On Mon, Nov 16, 2015 at 02:20:57PM -0800, Flavio Leitner wrote: > On Wed, Oct 28, 2015 at 11:12:25PM +0200, Michael S. Tsirkin wrote: > > On Wed, Oct 28, 2015 at 06:30:41PM -0200, Flavio Leitner wrote: > > > On Sat, Oct 24, 2015 at 08:47:10PM +0300, Michael S. Tsirkin wrote: > > > > On Sat, Oct

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-11-16 Thread Flavio Leitner
On Wed, Oct 28, 2015 at 11:12:25PM +0200, Michael S. Tsirkin wrote: > On Wed, Oct 28, 2015 at 06:30:41PM -0200, Flavio Leitner wrote: > > On Sat, Oct 24, 2015 at 08:47:10PM +0300, Michael S. Tsirkin wrote: > > > On Sat, Oct 24, 2015 at 12:34:08AM -0200, Flavio Leitner wrote: > > > > On Thu, Oct

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-29 Thread Michael S. Tsirkin
On Wed, Oct 28, 2015 at 06:30:41PM -0200, Flavio Leitner wrote: > On Sat, Oct 24, 2015 at 08:47:10PM +0300, Michael S. Tsirkin wrote: > > On Sat, Oct 24, 2015 at 12:34:08AM -0200, Flavio Leitner wrote: > > > On Thu, Oct 22, 2015 at 02:32:31PM +0300, Michael S. Tsirkin wrote: > > > > On Thu, Oct

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-28 Thread Flavio Leitner
On Sat, Oct 24, 2015 at 08:47:10PM +0300, Michael S. Tsirkin wrote: > On Sat, Oct 24, 2015 at 12:34:08AM -0200, Flavio Leitner wrote: > > On Thu, Oct 22, 2015 at 02:32:31PM +0300, Michael S. Tsirkin wrote: > > > On Thu, Oct 22, 2015 at 05:49:55PM +0800, Yuanhan Liu wrote: > > > > On Wed, Oct 21,

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-24 Thread Michael S. Tsirkin
On Sat, Oct 24, 2015 at 12:34:08AM -0200, Flavio Leitner wrote: > On Thu, Oct 22, 2015 at 02:32:31PM +0300, Michael S. Tsirkin wrote: > > On Thu, Oct 22, 2015 at 05:49:55PM +0800, Yuanhan Liu wrote: > > > On Wed, Oct 21, 2015 at 05:26:18PM +0300, Michael S. Tsirkin wrote: > > > > On Wed, Oct 21,

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-24 Thread Flavio Leitner
On Thu, Oct 22, 2015 at 02:32:31PM +0300, Michael S. Tsirkin wrote: > On Thu, Oct 22, 2015 at 05:49:55PM +0800, Yuanhan Liu wrote: > > On Wed, Oct 21, 2015 at 05:26:18PM +0300, Michael S. Tsirkin wrote: > > > On Wed, Oct 21, 2015 at 08:48:15PM +0800, Yuanhan Liu wrote: > > > > > Please note that

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-23 Thread Yuanhan Liu
On Thu, Oct 22, 2015 at 05:19:01PM +0300, Michael S. Tsirkin wrote: > On Thu, Oct 22, 2015 at 10:07:10PM +0800, Yuanhan Liu wrote: > > On Thu, Oct 22, 2015 at 02:32:31PM +0300, Michael S. Tsirkin wrote: > > > On Thu, Oct 22, 2015 at 05:49:55PM +0800, Yuanhan Liu wrote: > > > > On Wed, Oct 21, 2015

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-22 Thread Yuanhan Liu
On Thu, Oct 22, 2015 at 02:32:31PM +0300, Michael S. Tsirkin wrote: > On Thu, Oct 22, 2015 at 05:49:55PM +0800, Yuanhan Liu wrote: > > On Wed, Oct 21, 2015 at 05:26:18PM +0300, Michael S. Tsirkin wrote: > > > On Wed, Oct 21, 2015 at 08:48:15PM +0800, Yuanhan Liu wrote: > > > > > Please note that

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-22 Thread Yuanhan Liu
On Wed, Oct 21, 2015 at 05:26:18PM +0300, Michael S. Tsirkin wrote: > On Wed, Oct 21, 2015 at 08:48:15PM +0800, Yuanhan Liu wrote: > > > Please note that for virtio devices, guest is supposed to > > > control the placement of incoming packets in RX queues. > > > > I may not follow you. > > > >

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2015 at 10:07:10PM +0800, Yuanhan Liu wrote: > On Thu, Oct 22, 2015 at 02:32:31PM +0300, Michael S. Tsirkin wrote: > > On Thu, Oct 22, 2015 at 05:49:55PM +0800, Yuanhan Liu wrote: > > > On Wed, Oct 21, 2015 at 05:26:18PM +0300, Michael S. Tsirkin wrote: > > > > On Wed, Oct 21, 2015

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2015 at 05:49:55PM +0800, Yuanhan Liu wrote: > On Wed, Oct 21, 2015 at 05:26:18PM +0300, Michael S. Tsirkin wrote: > > On Wed, Oct 21, 2015 at 08:48:15PM +0800, Yuanhan Liu wrote: > > > > Please note that for virtio devices, guest is supposed to > > > > control the placement of

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-22 Thread Xie, Huawei
On 10/21/2015 11:48 AM, Yuanhan Liu wrote: [...] > > #define MAX_PKT_BURST 32 > > +static inline int __attribute__((always_inline)) > +is_valid_virt_queue_idx(uint32_t virtq_idx, int is_tx, uint32_t max_qp_idx) > +{ > + if ((is_tx ^ (virtq_idx & 0x1)) || > + (virtq_idx >=

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-21 Thread Yuanhan Liu
On Wed, Oct 21, 2015 at 05:26:18PM +0300, Michael S. Tsirkin wrote: > On Wed, Oct 21, 2015 at 08:48:15PM +0800, Yuanhan Liu wrote: > > > Please note that for virtio devices, guest is supposed to > > > control the placement of incoming packets in RX queues. > > > > I may not follow you. > > > >

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-21 Thread Yuanhan Liu
On Wed, Oct 21, 2015 at 01:31:55PM +0300, Michael S. Tsirkin wrote: > On Wed, Oct 21, 2015 at 11:48:10AM +0800, Yuanhan Liu wrote: > > From: Changchun Ouyang > > > > Do not use VIRTIO_RXQ or VIRTIO_TXQ anymore; use the queue_id > > instead, which will be set to a proper value for a specific

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-21 Thread Thomas Monjalon
2015-10-21 08:47, Stephen Hemminger: > On Wed, 21 Oct 2015 09:38:37 + > "Ananyev, Konstantin" wrote: > > I also don't understand what's wrong with using 'always_inline' here. > > As I understand the author wants compiler to *always inline* that function. > > So seems perfectly ok to use it

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-21 Thread Bruce Richardson
On 21/10/2015 16:47, Stephen Hemminger wrote: > On Wed, 21 Oct 2015 09:38:37 + > "Ananyev, Konstantin" wrote: > minor nits: * this doesn't need to be marked as always inline, that is as they say in English "shooting a fly with a bazooka" >>> Stephen: >>> always_inline

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-21 Thread Ananyev, Konstantin
> -Original Message- > From: Richardson, Bruce > Sent: Wednesday, October 21, 2015 4:56 PM > To: Stephen Hemminger; Ananyev, Konstantin > Cc: Michael S. Tsirkin; dev at dpdk.org; marcel at redhat.com; Changchun > Ouyang > Subject: Re: [dpdk-dev] [PATCH v7 4/8] vhos

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-21 Thread Yuanhan Liu
On Tue, Oct 20, 2015 at 09:43:54PM -0700, Stephen Hemminger wrote: > On Wed, 21 Oct 2015 11:48:10 +0800 > Yuanhan Liu wrote: > > > > > +static inline int __attribute__((always_inline)) > > +is_valid_virt_queue_idx(uint32_t virtq_idx, int is_tx, uint32_t max_qp_idx) > > +{ > > + if ((is_tx ^

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-21 Thread Michael S. Tsirkin
On Wed, Oct 21, 2015 at 11:48:10AM +0800, Yuanhan Liu wrote: > From: Changchun Ouyang > > Do not use VIRTIO_RXQ or VIRTIO_TXQ anymore; use the queue_id > instead, which will be set to a proper value for a specific queue > when we have multiple queue support enabled. > > For now, queue_id is

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-21 Thread Yuanhan Liu
From: Changchun Ouyang Do not use VIRTIO_RXQ or VIRTIO_TXQ anymore; use the queue_id instead, which will be set to a proper value for a specific queue when we have multiple queue support enabled. For now, queue_id is still set with VIRTIO_RXQ or VIRTIO_TXQ, so it

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-21 Thread Ananyev, Konstantin
ubject: Re: [dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of > constant ring index > > On 10/21/2015 12:44 PM, Stephen Hemminger wrote: > > On Wed, 21 Oct 2015 11:48:10 +0800 > > Yuanhan Liu wrote: > > > >> > >> +static inline int __attribute__

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-21 Thread Stephen Hemminger
On Wed, 21 Oct 2015 09:38:37 + "Ananyev, Konstantin" wrote: > > > minor nits: > > > * this doesn't need to be marked as always inline, > > > that is as they say in English "shooting a fly with a bazooka" > > Stephen: > > always_inline "forces" the compiler to inline this function,

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-21 Thread Xie, Huawei
On 10/21/2015 12:44 PM, Stephen Hemminger wrote: > On Wed, 21 Oct 2015 11:48:10 +0800 > Yuanhan Liu wrote: > >> >> +static inline int __attribute__((always_inline)) >> +is_valid_virt_queue_idx(uint32_t virtq_idx, int is_tx, uint32_t max_qp_idx) >> +{ >> +if ((is_tx ^ (virtq_idx & 0x1)) ||

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-20 Thread Stephen Hemminger
On Wed, 21 Oct 2015 11:48:10 +0800 Yuanhan Liu wrote: > > +static inline int __attribute__((always_inline)) > +is_valid_virt_queue_idx(uint32_t virtq_idx, int is_tx, uint32_t max_qp_idx) > +{ > + if ((is_tx ^ (virtq_idx & 0x1)) || > + (virtq_idx >= max_qp_idx * VIRTIO_QNUM)) > +