Re: [ovs-dev] [PATCH v12 2/6] netdev-dpdk: Convert initialization from cmdline to db

2016-06-13 Thread gowrishankar

Hi Daniele,
Is there a possibility that this patch would also go in branch-2.5 
(2.5.1) ?.


Regards,
Gowrishankar


On Friday 29 April 2016 07:06 PM, Aaron Conole wrote:

Daniele Di Proietto  writes:


Hi Aaron,

thanks (again!) for this patch. Few comments:

* As I mentioned on my previous round of review, I don't think it's necessary 
to pass the whole Open_vSwitch table to dpdk_init(). I.e., instead of doing

   dpdk_init(&cfg);

   I'd prefer

   if (cfg) {
   dpdk_init(&cfg->other_config);
   }

  This way we don't have to include "vswitch-idl.h".


* I suggested 'dpdk-mem-channels', because I think people who want to use that 
will be comfortable passing '-n' in dpdk-extra.  What do you think? Is there 
any reason why you think it's worth keeping?

D'oh! I had done both of these changes, but they were dropped during the
rebase. I'll cook a fix asap.


* Sorry for not noticing this before: it seems that netdev_dpdk_register() now 
always registers the netdev classes, even though they cannot be created.  The 
registered classes end up in the database in the iface_type column of the 
Open_vSwitch table, so controllers might think that they're available.  I think 
we should register the classes only when DPDK is initialized.

I had an issue doing this, back when the I had the lazy
initialization. I don't remember the details, though. I'll try it again,
and see what happens.


Two minor nits inline,

Thanks

Thanks so much for the review, Daniele!

-Aaron


On 26/04/2016 12:42, "Aaron Conole"  wrote:


Existing DPDK integration is provided by use of command line options which
must be split out and passed to librte in a special manner. However, this
forces any configuration to be passed by way of a special DPDK flag, and
interferes with ovs+dpdk packaging solutions.

This commit delays dpdk initialization until after the OVS database
connection is established, at which point ovs initializes librte. It
pulls all of the config data from the OVS database, and assembles a
new argv/argc pair to be passed along.

Signed-off-by: Aaron Conole 
Acked-by: Kevin Traynor 
---


___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [dpdk-ovs] Memory allocation error while trying to add a dpdk mode port to ovs bridge

2016-06-20 Thread gowrishankar

On Monday 20 June 2016 08:21 AM, Wang, Alex wrote:

Hi There,

I downloaded the master branch from github and tried to setup OVS with DPDK 
mode under Ubuntu16.04 kernel_4.4.0-21-generic. However I encountered below 
error while I was trying to add a dpdk port to the OVS bridge.


Is this an issue if you run ovs-vswitchd without --detach option ? (ie 
not as detached process) ?.


Thanks,
Gowrishankar



Error messages:
root@unassigned-hostname:/opt/APP/utility/dpdk-16.04/tools# ovs-vsctl add-br 
br0 -- set bridge br0 datapath_type=netdev
root@unassigned-hostname:/opt/APP/utility/dpdk-16.04/tools# ovs-vsctl add-port 
br0 dpdk0 -- set Interface dpdk0 type=dpdk
ovs-vsctl: Error detected while setting up 'dpdk0'.  See ovs-vswitchd log for 
detail
root@unassigned-hostname:/home/pid# ovs-vsctl show
f8269232-4bf8-455b-9b34-e9c646905782
 Bridge "br0"
 Port "dpdk0"
 Interface "dpdk0"
 type: dpdk
 error: "could not open network device dpdk0 (Cannot allocate 
memory)"
 Port "br0"
 Interface "br0"
 type: internal


I followed the 
INSTALL.DPDK.md<https://github.com/openvswitch/ovs/blob/master/INSTALL.DPDK.md> 
but this error was consistently hit on Ubuntu16.04. Previously we tried OVS on 
Ubuntu14.04 but it looked fine without this failure. Did you see any similar error on 
your side or any comments about the failure?

Thanks a lot in advance!

Best Regards,
Alex

___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev



___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH] dpdk: add support for v2.1.0

2015-08-27 Thread gowrishankar

On Wednesday 26 August 2015 06:14 PM, Timo Puha wrote:

Update relevant artifacts to add support for DPDK v2.1.0
  - INSTALL.DPDK.md
  - acinclude.m4: Change DPDK library name
  - netdev-dpdk: Add 16 bytes extra padding to mbuf size to adapt to DPDK bug
fix that changes the treatment of the requested mbuf size
  - build.sh: Change DPDK version number

Note that this breaks compatibility with DPDK v2.0.0 although only
for the library name change.

Note that throughput for vhost ports with mergeable buffers is reduced
about 10% due to a necessary bug fix in DPDK vhost code.

Signed-off-by: Mark Kavanagh 
Signed-off-by: Michal Weglicki 
Signed-off-by: Timo Puha 
---



diff --git a/acinclude.m4 b/acinclude.m4
index 45cfaf6..90bb708 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -172,7 +172,7 @@ AC_DEFUN([OVS_CHECK_DPDK], [

  DPDK_INCLUDE=$RTE_SDK/include
  DPDK_LIB_DIR=$RTE_SDK/lib
-DPDK_LIB="-lintel_dpdk"
+DPDK_LIB="-ldpdk"
  DPDK_EXTRA_LIB=""


To have dpdk built with CONFIG_RTE_LIBRTE_VHOST_NUMA, we would need 
-lnuma in above extralib. It would be helpful if we document this

as well (INSTALL.DPDK).

Regards,
Gowrishankar

___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


[ovs-dev] [PATCH] netdev-dpdk: update installation document for correct ovs commands

2015-06-15 Thread Gowrishankar
From: Gowrishankar M 

For the first time while creating OVS db, ovsdb-tool has to be given
schema file existing in source (and not the one installed in distro
or not even existing if not installed earlier).

Another correction is on right command to use to add vhost-user port.

Signed-off-by: Gowri Shankar 
---
 INSTALL.DPDK.md |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/INSTALL.DPDK.md b/INSTALL.DPDK.md
index cdef6cf..68f8a3b 100644
--- a/INSTALL.DPDK.md
+++ b/INSTALL.DPDK.md
@@ -127,7 +127,7 @@ Using the DPDK with ovs-vswitchd:
   mkdir -p /usr/local/var/run/openvswitch
   rm /usr/local/etc/openvswitch/conf.db
   ovsdb-tool create /usr/local/etc/openvswitch/conf.db  \
- /usr/local/share/openvswitch/vswitch.ovsschema
+ ./vswitchd/vswitch.ovsschema
   ```
 
2. Start ovsdb-server
@@ -355,7 +355,7 @@ have arbitrary names.
   -  For vhost-user, the name of the port type is `dpdkvhostuser`
 
  ```
- ovs-ofctl add-port br0 vhost-user-1 -- set Interface vhost-user-1
+ ovs-vsctl add-port br0 vhost-user-1 -- set Interface vhost-user-1
  type=dpdkvhostuser
  ```
 
-- 
1.7.10.4

___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH] fix wrong cmd for create dpdkvhostuser in INSTALL.DPDK.md

2015-06-15 Thread gowrishankar

Also updated an additional correction as in :
http://openvswitch.org/pipermail/dev/2015-June/056379.html

Could you include that as well.

Thanks,
Gowrishankar

On Tuesday 16 June 2015 11:19 AM, Wei li wrote:

Signed-off-by: Wei li 
---
  INSTALL.DPDK.md | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/INSTALL.DPDK.md b/INSTALL.DPDK.md
index cdef6cf..1287fea 100644
--- a/INSTALL.DPDK.md
+++ b/INSTALL.DPDK.md
@@ -355,7 +355,7 @@ have arbitrary names.
-  For vhost-user, the name of the port type is `dpdkvhostuser`
  
   ```

- ovs-ofctl add-port br0 vhost-user-1 -- set Interface vhost-user-1
+ ovs-vsctl add-port br0 vhost-user-1 -- set Interface vhost-user-1
   type=dpdkvhostuser
   ```
  
@@ -461,7 +461,7 @@ arbitrary names.

-  For vhost-cuse, the name of the port type is `dpdkvhostcuse`
  
   ```

- ovs-ofctl add-port br0 vhost-cuse-1 -- set Interface vhost-cuse-1
+ ovs-vsctl add-port br0 vhost-cuse-1 -- set Interface vhost-cuse-1
   type=dpdkvhostcuse
   ```
  



___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH] netdev-dpdk: update installation document for correct ovs commands

2015-06-15 Thread gowrishankar

On Tuesday 16 June 2015 11:39 AM, Wei Li wrote:

On 2015/6/15 22:33, Gowrishankar wrote:

From: Gowrishankar M 

For the first time while creating OVS db, ovsdb-tool has to be given
schema file existing in source (and not the one installed in distro
or not even existing if not installed earlier).

Another correction is on right command to use to add vhost-user port.

Signed-off-by: Gowri Shankar 
---
  INSTALL.DPDK.md |4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/INSTALL.DPDK.md b/INSTALL.DPDK.md
index cdef6cf..68f8a3b 100644
--- a/INSTALL.DPDK.md
+++ b/INSTALL.DPDK.md
@@ -127,7 +127,7 @@ Using the DPDK with ovs-vswitchd:
mkdir -p /usr/local/var/run/openvswitch
rm /usr/local/etc/openvswitch/conf.db
ovsdb-tool create /usr/local/etc/openvswitch/conf.db  \
- /usr/local/share/openvswitch/vswitch.ovsschema
+ ./vswitchd/vswitch.ovsschema
```
why change the location of vswitch.ovsschema? 
"/usr/local/share/openvswitch/vswitch.ovsschema" is ok in my 
environment, and where is "./"?


Ok. I had skipped make install which I realised now. Thanks.

Regards,
Gowrishankar


 2. Start ovsdb-server
@@ -355,7 +355,7 @@ have arbitrary names.
-  For vhost-user, the name of the port type is `dpdkvhostuser`
 ```
- ovs-ofctl add-port br0 vhost-user-1 -- set Interface vhost-user-1
+ ovs-vsctl add-port br0 vhost-user-1 -- set Interface vhost-user-1
   type=dpdkvhostuser
   ```







___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH] fix wrong cmd for create dpdkvhostuser in INSTALL.DPDK.md

2015-06-16 Thread gowrishankar

On Tuesday 16 June 2015 11:07 PM, Flavio Leitner wrote:

On Tue, Jun 16, 2015 at 11:23:07AM +0530, gowrishankar wrote:

Also updated an additional correction as in :
http://openvswitch.org/pipermail/dev/2015-June/056379.html

Could you include that as well.

Yeap.  One patch with all the s/ovs-vsctl/ovs-vsctl/
and another for the scheme initialization?
Thanks,
fbl



Latter change can be dropped as I did not 'make install' to refer schema in
installed path. Thanks Flavio.

Regards,
Gowri Shankar

___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] dpdkvhostuser fail to alloc memory when receive packet from other host

2015-06-17 Thread gowrishankar

On Wednesday 17 June 2015 03:19 PM, Du, Fan wrote:

Hi,

I'm playing dpdkvhostuser ports with latest DPDK and ovs master tree with iperf 
benchmarking.
When kvm guest1(backed up dpdkvhostuser port)siting on HOST1 is receiving 
packets from either other physical HOST2,
or similar kvm guest2 with dpdkvhostuser port siting on HOST2. The connectivity 
will break, iperf show no bandwidth and stall finally.


In my setup where kvm guest1 receives packets from phy host through ovs 
switch (vhost-user),

I do not find this problem. I am on top of below commit fyi.

commit 7d1ced01772de541d6692c7d5604210e274bcd37 (ovs)

Btw, I checked tx case for guest as well. qemu I am using is of version 
2.3.0. Is your qemu of version above 2.2

if allotting more than 1GB guest memory.

Could you also share hugepages params passed to kernel.

Regards,
Gowri Shankar



Other test scenario like, two kvm guest sitting on one host, or a single kvm 
guest send packets to a physical host works like a charm.

Swiitch debug option on, dpdk lib spit as below:
VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:0 file:62
VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:0 file:58

VHOST_DATA: F0 Failed to allocate memory for mbuf. mbuf_pool:0x7fc7411ab5c0
VHOST_DATA: F0 Failed to allocate memory for mbuf. mbuf_pool:0x7fc7411ab5c0
VHOST_DATA: F0 Failed to allocate memory for mbuf. mbuf_pool:0x7fc7411ab5c0
VHOST_DATA: F0 Failed to allocate memory for mbuf. mbuf_pool:0x7fc7411ab5c0
VHOST_DATA: F0 Failed to allocate memory for mbuf. mbuf_pool:0x7fc7411ab5c0
VHOST_DATA: F0 Failed to allocate memory for mbuf. mbuf_pool:0x7fc7411ab5c0
VHOST_DATA: F0 Failed to allocate memory for mbuf. mbuf_pool:0x7fc7411ab5c0
VHOST_DATA: F0 Failed to allocate memory for mbuf. mbuf_pool:0x7fc7411ab5c0

After some tweaks of logging code, and looks like bad things happens within 
below code snippet:
In lib/librte_vhost/vhost_rxtx.c function: rte_vhost_dequeue_burst

612 vb_offset = 0;
613 vb_avail = desc->len;
614 /* Allocate an mbuf and populate the structure. */
615 m = rte_pktmbuf_alloc(mbuf_pool);
616 if (unlikely(m == NULL)) {
617 RTE_LOG(ERR, VHOST_DATA,
618 "F0 Failed to allocate memory for mbuf. 
mbuf_pool:%p\n", mbuf_pool);
619 break;
620 }
621 seg_offset = 0;
622 seg_avail = m->buf_len - RTE_PKTMBUF_HEADROOM;
623 cpy_len = RTE_MIN(vb_avail, seg_avail);



___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev



___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev