[dpdk-dev] [PATCH v2 10/10] net/virtio: fix multiple queue enabling

2016-11-05 Thread Yuanhan Liu
When queue number shrinks to 1 from X, the following code stops us sending the multiple queue ctrl message: if (nb_queues > 1) { if (virtio_set_multiple_queues(dev, nb_queues) != 0) return -EINVAL; } This ends up with still X queues being en

[dpdk-dev] [PATCH v2 09/10] net/virtio: fix less queues being enabled issue

2016-11-05 Thread Yuanhan Liu
>From the virtio spec of view, multiple-queue is always enabled/disabled in queue pairs. DPDK somehow allows the case when Tx and Rx queue number are different. Currently, virtio PMD get the queue pair number from the nb_rx_queues field, which could be an issue when Tx queue number > Rx queue numb

[dpdk-dev] [PATCH v2 08/10] net/virtio: remove started field

2016-11-05 Thread Yuanhan Liu
The "hw->started" field was introduced to stop touching queues on restart. We never touches queues on restart any more, thus it's safe to remove this flag. Signed-off-by: Yuanhan Liu Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_ethdev.c | 15 ++- drivers/net/virtio/vir

[dpdk-dev] [PATCH v2 07/10] net/virtio: complete init stage at the right place

2016-11-05 Thread Yuanhan Liu
Invoking vtpci_reinit_complete() at port start stage doesn't make any sense, instead, it should be done at the end of dev init stage. So move it here. Signed-off-by: Yuanhan Liu Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 delet

[dpdk-dev] [PATCH v2 06/10] net/virtio: move queue configure code to proper place

2016-11-05 Thread Yuanhan Liu
The only piece of code of virtio_dev_rxtx_start() is actually doing queue configure/setup work. So, move it to corresponding queue_setup callback. Once that is done, virtio_dev_rxtx_start() becomes an empty function, thus it's being removed. Signed-off-by: Yuanhan Liu Reviewed-by: Maxime Coqueli

[dpdk-dev] [PATCH v2 05/10] net/virtio: initiate vring at init stage

2016-11-05 Thread Yuanhan Liu
virtio_dev_vring_start() is actually doing the vring initiation job. And the vring initiation job should be done at the dev init stage, as stated with great details in former commit. So move it there, and rename it to virtio_init_vring(). Signed-off-by: Yuanhan Liu Reviewed-by: Maxime Coquelin

[dpdk-dev] [PATCH v2 04/10] net/virtio: allocate queue at init stage

2016-11-05 Thread Yuanhan Liu
Queue allocation should be done once, since the queue related info (such as vring addreess) will only be informed to the vhost-user backend once without virtio device reset. That means, if you allocate queues again after the vhost-user negotiation, the vhost-user backend will not be informed any m

[dpdk-dev] [PATCH v2 03/10] net/virtio: simplify queue allocation

2016-11-05 Thread Yuanhan Liu
Let rxq/txq/cq be the union field of the virtqueue struct. This would simplifies the vq allocation a bit: we don't need calculate the vq_size any more based on the queue type. Signed-off-by: Yuanhan Liu Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_ethdev.c | 18 +++---

[dpdk-dev] [PATCH v2 02/10] net/virtio: simplify queue memzone name

2016-11-05 Thread Yuanhan Liu
Instead of setting up a queue memzone name like "port0_rxq0", "port0_txq0", it could be simplified a bit to something like "port0_vq0", "port0_vq1" ... Meanwhile, the code is also simplified a bit. Signed-off-by: Yuanhan Liu Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_ethdev.c |

[dpdk-dev] [PATCH v2 01/10] net/virtio: revert fix restart

2016-11-05 Thread Yuanhan Liu
This reverts commit 9a0615af7746 ("virtio: fix restart"); conflict is manually addressed. Kyle reported an issue with above commit qemu-kvm: Guest moved used index from 5 to 1 with following steps, 1) Start my virtio interfaces 2) Send some traffic into/out of the interfaces 3)

[dpdk-dev] [PATCH v2 00/10] net/virtio: fix queue reconfigure issue

2016-11-05 Thread Yuanhan Liu
This patchset fixes few issues related to virtio queue reconfigure: increase or shrink the queue number. The major issue and the reason behind is described with length details in patch 4 "net/virtio: allocate queue at init stage". Those bugs can not be fixed by few lines of code, it's because the

[dpdk-dev] [PATCH] scripts: ignore const struct checks

2016-11-05 Thread Thomas Monjalon
checkpatch raise some false positives when run outside of the kernel tree. The script checkpatch.pl from the kernel checks a list of structs known to be const. It is obviously not relevant as DPDK has not such list. Signed-off-by: Thomas Monjalon --- scripts/checkpatches.sh | 3 ++- 1 file chan

[dpdk-dev] [PATCH] scripts: show full headline with checkpatch

2016-11-05 Thread Thomas Monjalon
The Subject in an email can be split on two lines. In such case, the second line (starting with a space) can be joined to the first one. It is handled differently when parsing stdin or a file. Signed-off-by: Thomas Monjalon --- scripts/checkpatches.sh | 7 +-- 1 file changed, 5 insertions(+

[dpdk-dev] [PATCH] scripts: add standard input to checkpatch

2016-11-05 Thread Thomas Monjalon
2016-11-02 17:10, Thomas Monjalon: > It is now possible to check a patch by providing an email > through stdin. > It is especially useful to automate checkpatch run when > receiving an email. > > Signed-off-by: Thomas Monjalon Applied

[dpdk-dev] [PATCH] scripts: fix quiet checkpatch

2016-11-05 Thread Thomas Monjalon
2016-11-02 17:10, Thomas Monjalon: > The commit e13fbc065c7f ("scripts: improve quiet checkpatch") > removed the line "total: 1 errors, 0 warnings, 7 lines checked" > from the quiet report. > Later, commit e7c38f471384 ("scripts: remove useless checkpatch notes") > removed few lines before "total:.

[dpdk-dev] [PATCH v2] scripts: show fixes with release version of bug

2016-11-05 Thread Thomas Monjalon
2016-11-04 14:58, Yuanhan Liu: > On Fri, Sep 30, 2016 at 04:18:42PM +0200, Thomas Monjalon wrote: > > This script can help to find commits to backport in stable branches. > > > > Fixes are found if there is the word "fix" in the headline or > > if there is a tag Fixes: or Reverts: in the message.

[dpdk-dev] [PATCH 4/8] net/virtio: allocate queue at init stage

2016-11-05 Thread Yuanhan Liu
On Fri, Nov 04, 2016 at 08:30:00PM +, Kevin Traynor wrote: > On 11/04/2016 03:21 PM, Kevin Traynor wrote: > > On 11/03/2016 04:09 PM, Yuanhan Liu wrote: > >> Queue allocation should be done once, since the queue related info (such > >> as vring addreess) will only be informed to the vhost-user