Re: [ovs-discuss] OVS - Userspace packet processing

2016-10-19 Thread Chandran, Sugesh


Regards
_Sugesh

From: Advith Nagappa [mailto:advith.naga...@gmail.com]
Sent: Wednesday, October 19, 2016 11:11 AM
To: Chandran, Sugesh <sugesh.chand...@intel.com>
Cc: discuss@openvswitch.org
Subject: Re: [ovs-discuss] OVS - Userspace packet processing

Thank you again.


[Sugesh] I guess this must be something to do with how mininet configure OVS. 
Please have a look at the ovs-vswitchd.log file for more details(this shows how 
OVS is being configured by mininet).
Also check if ovs-vswitchd and ovsdb-servers are running on the machine
Funnily enough, after you mentioned, I stopped the ovs-vswitchd and 
ovsdb-servers and ran mn --user switch. And it still runs! pingall works too.. 
So I tend to think that "mn --switch user" doesn't really use OVS (because the 
daemon and ovsdb servers are down!).


OK, to surmise, the user switch used by mininet has a kernel to user space 
transition of packets. (but this is not the ovs kernel module , rather the 
kernel of the underlying hypervisor/guest OS).
And this is clearly not the same as user space OVS that is often discussed in 
the OVS community.

I think the question remains is what is OVS user space switch? What happens 
when a bridge is set with datapath_type=netdev? (In this case, I think the 
entry point is /lib/dpif_netdev.c -- dp_netdev_process_rxq_port ?) Is there a 
document resource which explains this datapath type?
[Sugesh] Yes(Only for the userspace interfaces) and No(there is no document 
that explains the datapath type)

Also, with DPDK + OVS, I believe the entry point would be /lib/dpif_netdev.c -- 
dp_netdev_process_rxq_port, right?
[Sugesh] Yes

And another question would be if userspace OVS is even supported by mininet? (I 
suppose this question should be discussed in the mininet forum.)
[Sugesh] Yes, you must post this question in mininet forum.

Best Regards
Advith Nagappa

On Wed, Oct 19, 2016 at 11:13 AM, Chandran, Sugesh 
<sugesh.chand...@intel.com<mailto:sugesh.chand...@intel.com>> wrote:


Regards
_Sugesh

From: Advith Nagappa 
[mailto:advith.naga...@gmail.com<mailto:advith.naga...@gmail.com>]
Sent: Wednesday, October 19, 2016 9:15 AM
To: Chandran, Sugesh 
<sugesh.chand...@intel.com<mailto:sugesh.chand...@intel.com>>
Cc: discuss@openvswitch.org<mailto:discuss@openvswitch.org>
Subject: Re: [ovs-discuss] OVS - Userspace packet processing

Thank you  again,

I am using a mininet set up (mn --switch user), which I think uses the 
userspace ovs switch. (Is this assumption right? All available documentation 
uses wording which gives this impression.)
[Sugesh] I haven’t used mininet for traffic generation yet so can’t comment on 
what ‘mn –switch user’ does internally.
However from the mininet wiki, its clear that the packets are still comes from 
the kernel. Read the ‘other switch types’ in http://mininet.org/walkthrough/
And answering your question, the packets from the kernel interfaces are handled 
by the ovs-vswitchd main thread itself and they may not hit 
dp_netdev_process_rxq_port.  Also your finding is right on the entry point for 
the packet from kernel interface.


To confirm this, I also have removed the openvswitch.ko in my VM.

But curiously though, ovs-vsctl show doesn't show any topology:

root@cep-VirtualBox:/home/cep# ovs-vsctl show
204aa7ac-2ac9-4277-afcf-e7a3f17fc7c1

This is weird because, mininet initializes two hosts (h1, h2) and one OVS 
switch s1. And the ping all works fine.
[Sugesh] I guess this must be something to do with how mininet configure OVS. 
Please have a look at the ovs-vswitchd.log file for more details(this shows how 
OVS is being configured by mininet).
Also check if ovs-vswitchd and ovsdb-servers are running on the machine.


and to contrast things, I loaded the openvswith.ko (./configure 
--with-Linux/ , make install, make modules_install, /sbin/modprobe 
openvswitch) and ran mininet with the loaded kernel module (sudo mn)


root@cep-VirtualBox:/home/cep# ovs-vsctl show
6d14e9f4-de26-4332-93fe-b87e33c532f9
Bridge "s1"
Controller "ptcp:6634"
Controller "tcp:127.0.0.1:6633<http://127.0.0.1:6633>"
is_connected: true
fail_mode: secure
Port "s1-eth2"
Interface "s1-eth2"
Port "s1"
Interface "s1"
type: internal
Port "s1-eth1"
Interface "s1-eth1"

Regards
Advith

On Wed, Oct 19, 2016 at 9:30 AM, Chandran, Sugesh 
<sugesh.chand...@intel.com<mailto:sugesh.chand...@intel.com>> wrote:


Regards
_Sugesh

From: Advith Nagappa 
[mailto:advith.naga...@gmail.com<mailto:advith.naga...@gmail.com>]
Sent: Wednesday, October 19, 2016 1:02 AM
To: Chandran, Sugesh 
<sugesh.chand...@intel.com<mailto:sugesh.chand...@intel.com>>
Cc: discuss@openvswitch.org<mailto:discuss@openvswitch.org>
Subject: Re: [ovs-discuss] OVS - Userspa

Re: [ovs-discuss] OVS - Userspace packet processing

2016-10-19 Thread Advith Nagappa
Thank you again.


*[Sugesh] I guess this must be something to do with how mininet configure
OVS. Please have a look at the ovs-vswitchd.log file for more details(this
shows how OVS is being configured by mininet).*

*Also check if ovs-vswitchd and ovsdb-servers are running on the machine*

Funnily enough, after you mentioned, I stopped the ovs-vswitchd and
ovsdb-servers and ran mn --user switch. And it still runs! pingall works
too.. So I tend to think that "mn --switch user" doesn't really use OVS
(because the daemon and ovsdb servers are down!).



OK, to surmise, the user switch used by mininet has a kernel to user space
transition of packets. (but this is not the ovs kernel module , rather the
kernel of the underlying hypervisor/guest OS).
And this is clearly not the same as user space OVS that is often discussed
in the OVS community.


I think the question remains is what is OVS user space switch? What happens
when a bridge is set with datapath_type=netdev? (In this case, I think the
entry point is /lib/dpif_netdev.c -- dp_netdev_process_rxq_port ?) Is there
a document resource which explains this datapath type?


Also, with DPDK + OVS, I believe the entry point would be
/lib/dpif_netdev.c -- dp_netdev_process_rxq_port, right?


And another question would be if userspace OVS is even supported by
mininet? (I suppose this question should be discussed in the mininet forum.)


Best Regards

Advith Nagappa

On Wed, Oct 19, 2016 at 11:13 AM, Chandran, Sugesh <
sugesh.chand...@intel.com> wrote:

>
>
>
>
> *Regards*
>
> *_Sugesh*
>
>
>
> *From:* Advith Nagappa [mailto:advith.naga...@gmail.com]
> *Sent:* Wednesday, October 19, 2016 9:15 AM
> *To:* Chandran, Sugesh <sugesh.chand...@intel.com>
> *Cc:* discuss@openvswitch.org
> *Subject:* Re: [ovs-discuss] OVS - Userspace packet processing
>
>
>
> Thank you  again,
>
>
>
> I am using a mininet set up (mn --switch user), which I think uses the
> userspace ovs switch. (Is this assumption right? All available
> documentation uses wording which gives this impression.)
>
> *[Sugesh] I haven’t used mininet for traffic generation yet so can’t
> comment on what ‘mn –switch user’ does internally.*
>
> *However from the mininet wiki, its clear that the packets are still comes
> from the kernel. Read the ‘other switch types’ in *
> *http://mininet.org/walkthrough/* <http://mininet.org/walkthrough/>
>
> *And answering your question, the packets from the kernel interfaces are
> handled by the ovs-vswitchd main thread itself and they may not hit 
> **dp_netdev_process_rxq_port.
> Also your finding is right on the entry point for the packet from kernel
> interface.*
>
>
>
>
>
> To confirm this, I also have removed the openvswitch.ko in my VM.
>
>
>
> But curiously though, ovs-vsctl show doesn't show any topology:
>
>
>
> *root@cep-VirtualBox:/home/cep# ovs-vsctl show*
> * 204aa7ac-2ac9-4277-afcf-e7a3f17fc7c1*
>
>
>
> This is weird because, mininet initializes two hosts (h1, h2) and one OVS
> switch s1. And the ping all works fine.
>
> *[Sugesh] I guess this must be something to do with how mininet configure
> OVS. Please have a look at the ovs-vswitchd.log file for more details(this
> shows how OVS is being configured by mininet).*
>
> *Also check if ovs-vswitchd and ovsdb-servers are running on the machine.*
>
>
>
>
>
> and to contrast things, I loaded the openvswith.ko (./configure
> --with-Linux/ , make install, make modules_install, /sbin/modprobe
> openvswitch) and ran mininet with the loaded kernel module (sudo mn)
>
>
>
>
>
> *root@cep-VirtualBox:/home/cep# ovs-vsctl show*
>
>
>
> * 6d14e9f4-de26-4332-93fe-b87e33c532f9 Bridge "s1" Controller
> "ptcp:6634" Controller "tcp:**127.0.0.1:6633*
> <http://127.0.0.1:6633>*"*
>
>
>
>
>
>
>
>
> * is_connected: true fail_mode: secure Port
> "s1-eth2" Interface "s1-eth2" Port "s1"
> Interface "s1" type: internal Port "s1-eth1"
>     Interface "s1-eth1"*
>
>
>
> Regards
>
> Advith
>
>
>
> On Wed, Oct 19, 2016 at 9:30 AM, Chandran, Sugesh <
> sugesh.chand...@intel.com> wrote:
>
>
>
>
>
> *Regards*
>
> *_Sugesh*
>
>
>
> *From:* Advith Nagappa [mailto:advith.naga...@gmail.com]
> *Sent:* Wednesday, October 19, 2016 1:02 AM
> *To:* Chandran, Sugesh <sugesh.chand...@intel.com>
> *Cc:* discuss@openvswitch.org
> *Subject:* Re: [ovs-discuss] OVS - Userspace packet processing
>
>
>
> Hello Sugesh,
>
>
>
> Thank you for 

Re: [ovs-discuss] OVS - Userspace packet processing

2016-10-19 Thread Advith Nagappa
Thank you  again,

I am using a mininet set up (mn --switch user), which I think uses the
userspace ovs switch. (Is this assumption right? All available
documentation uses wording which gives this impression.)

To confirm this, I also have removed the openvswitch.ko in my VM.

But curiously though, ovs-vsctl show doesn't show any topology:


*root@cep-VirtualBox:/home/cep# ovs-vsctl
show204aa7ac-2ac9-4277-afcf-e7a3f17fc7c1*

This is weird because, mininet initializes two hosts (h1, h2) and one OVS
switch s1. And the ping all works fine.


and to contrast things, I loaded the openvswith.ko (./configure
--with-Linux/ , make install, make modules_install, /sbin/modprobe
openvswitch) and ran mininet with the loaded kernel module (sudo mn)
















*root@cep-VirtualBox:/home/cep# ovs-vsctl
show6d14e9f4-de26-4332-93fe-b87e33c532f9Bridge "s1"Controller
"ptcp:6634"Controller "tcp:127.0.0.1:6633
<http://127.0.0.1:6633>"is_connected: truefail_mode:
securePort "s1-eth2"Interface "s1-eth2"Port
"s1"Interface "s1"type: internalPort
"s1-eth1"Interface "s1-eth1"*

Regards
Advith

On Wed, Oct 19, 2016 at 9:30 AM, Chandran, Sugesh <sugesh.chand...@intel.com
> wrote:

>
>
>
>
> *Regards*
>
> *_Sugesh*
>
>
>
> *From:* Advith Nagappa [mailto:advith.naga...@gmail.com]
> *Sent:* Wednesday, October 19, 2016 1:02 AM
> *To:* Chandran, Sugesh <sugesh.chand...@intel.com>
> *Cc:* discuss@openvswitch.org
> *Subject:* Re: [ovs-discuss] OVS - Userspace packet processing
>
>
>
> Hello Sugesh,
>
>
>
> Thank you for the response.
>
>
>
> I am using userspace OVS without DPDK. I do plan to use DPDK at a future
> point, but currently am trying to understand the behavior of a pure
> userspace ovs switch.
>
>
>
> I have put in custom DBG messages in /lib/dpif_netdev. (specifically
> dp_netdev_process_rxq_port) but this dbg message doesn't get triggered when
> I ping between two hosts connected by a OVS capable switch.
>
>
>
> I do see that in this case, the netdev_linux.c module is called, but I
> don't know who is calling this module (i.e the entry point to the ovs code
> base)
>
> *[Sugesh]It looks to me you are using kernel interfaces  in your setup,
> which is not ‘pure’ userspace openvswitch. Can you share the setup details?
> What type of interface you used to connect hosts to OVS?*
>
>
>
> Any input is appreciated.
>
>
>
> Best Regards
>
> Advith
>
>
>
>
>
> On Tue, Oct 18, 2016 at 10:37 AM, Chandran, Sugesh <
> sugesh.chand...@intel.com> wrote:
>
>
>
>
>
> *Regards*
>
> *_Sugesh*
>
>
>
> *From:* discuss [mailto:discuss-boun...@openvswitch.org] *On Behalf Of *Advith
> Nagappa
> *Sent:* Sunday, October 16, 2016 1:33 AM
> *To:* discuss@openvswitch.org
> *Subject:* [ovs-discuss] OVS - Userspace packet processing
>
>
>
> Hello,
>
> I am running OVS in  userspace (rmmod openvswitch.ko).
>
> I wanted to the entry point for a packet within the OVS code base. I.e
> which module first 'sees' the packet in pure userspace OVS.
>
> *[Sugesh] [Sugesh] Look at the INSTALL.DPDK.md <http://INSTALL.DPDK.md>
> and INSTALL.DPDK-advanced.md <http://INSTALL.DPDK-advanced.md> for the set
> up guide.*
>
> *You can start looking at the lib/dpif-netdev.c. mainly the functions such
> as dp_netdev_process_rxq_port, dp_netdev_input etc.*
>
>
>
> Best Regards
> Advith
>
>
>
___
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss


Re: [ovs-discuss] OVS - Userspace packet processing

2016-10-19 Thread Chandran, Sugesh


Regards
_Sugesh

From: Advith Nagappa [mailto:advith.naga...@gmail.com]
Sent: Wednesday, October 19, 2016 9:15 AM
To: Chandran, Sugesh <sugesh.chand...@intel.com>
Cc: discuss@openvswitch.org
Subject: Re: [ovs-discuss] OVS - Userspace packet processing

Thank you  again,

I am using a mininet set up (mn --switch user), which I think uses the 
userspace ovs switch. (Is this assumption right? All available documentation 
uses wording which gives this impression.)
[Sugesh] I haven’t used mininet for traffic generation yet so can’t comment on 
what ‘mn –switch user’ does internally.
However from the mininet wiki, its clear that the packets are still comes from 
the kernel. Read the ‘other switch types’ in http://mininet.org/walkthrough/
And answering your question, the packets from the kernel interfaces are handled 
by the ovs-vswitchd main thread itself and they may not hit 
dp_netdev_process_rxq_port.  Also your finding is right on the entry point for 
the packet from kernel interface.


To confirm this, I also have removed the openvswitch.ko in my VM.

But curiously though, ovs-vsctl show doesn't show any topology:

root@cep-VirtualBox:/home/cep# ovs-vsctl show
204aa7ac-2ac9-4277-afcf-e7a3f17fc7c1

This is weird because, mininet initializes two hosts (h1, h2) and one OVS 
switch s1. And the ping all works fine.
[Sugesh] I guess this must be something to do with how mininet configure OVS. 
Please have a look at the ovs-vswitchd.log file for more details(this shows how 
OVS is being configured by mininet).
Also check if ovs-vswitchd and ovsdb-servers are running on the machine.


and to contrast things, I loaded the openvswith.ko (./configure 
--with-Linux/ , make install, make modules_install, /sbin/modprobe 
openvswitch) and ran mininet with the loaded kernel module (sudo mn)


root@cep-VirtualBox:/home/cep# ovs-vsctl show
6d14e9f4-de26-4332-93fe-b87e33c532f9
Bridge "s1"
Controller "ptcp:6634"
Controller "tcp:127.0.0.1:6633<http://127.0.0.1:6633>"
is_connected: true
fail_mode: secure
Port "s1-eth2"
Interface "s1-eth2"
Port "s1"
Interface "s1"
type: internal
Port "s1-eth1"
Interface "s1-eth1"

Regards
Advith

On Wed, Oct 19, 2016 at 9:30 AM, Chandran, Sugesh 
<sugesh.chand...@intel.com<mailto:sugesh.chand...@intel.com>> wrote:


Regards
_Sugesh

From: Advith Nagappa 
[mailto:advith.naga...@gmail.com<mailto:advith.naga...@gmail.com>]
Sent: Wednesday, October 19, 2016 1:02 AM
To: Chandran, Sugesh 
<sugesh.chand...@intel.com<mailto:sugesh.chand...@intel.com>>
Cc: discuss@openvswitch.org<mailto:discuss@openvswitch.org>
Subject: Re: [ovs-discuss] OVS - Userspace packet processing

Hello Sugesh,

Thank you for the response.

I am using userspace OVS without DPDK. I do plan to use DPDK at a future point, 
but currently am trying to understand the behavior of a pure userspace ovs 
switch.

I have put in custom DBG messages in /lib/dpif_netdev. (specifically 
dp_netdev_process_rxq_port) but this dbg message doesn't get triggered when I 
ping between two hosts connected by a OVS capable switch.

I do see that in this case, the netdev_linux.c module is called, but I don't 
know who is calling this module (i.e the entry point to the ovs code base)
[Sugesh]It looks to me you are using kernel interfaces  in your setup, which is 
not ‘pure’ userspace openvswitch. Can you share the setup details? What type of 
interface you used to connect hosts to OVS?

Any input is appreciated.

Best Regards
Advith


On Tue, Oct 18, 2016 at 10:37 AM, Chandran, Sugesh 
<sugesh.chand...@intel.com<mailto:sugesh.chand...@intel.com>> wrote:


Regards
_Sugesh

From: discuss 
[mailto:discuss-boun...@openvswitch.org<mailto:discuss-boun...@openvswitch.org>]
 On Behalf Of Advith Nagappa
Sent: Sunday, October 16, 2016 1:33 AM
To: discuss@openvswitch.org<mailto:discuss@openvswitch.org>
Subject: [ovs-discuss] OVS - Userspace packet processing


Hello,

I am running OVS in  userspace (rmmod openvswitch.ko).

I wanted to the entry point for a packet within the OVS code base. I.e which 
module first 'sees' the packet in pure userspace OVS.

[Sugesh] [Sugesh] Look at the INSTALL.DPDK.md<http://INSTALL.DPDK.md> and 
INSTALL.DPDK-advanced.md<http://INSTALL.DPDK-advanced.md> for the set up guide.

You can start looking at the lib/dpif-netdev.c. mainly the functions such as 
dp_netdev_process_rxq_port, dp_netdev_input etc.



Best Regards
Advith


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


Re: [ovs-discuss] OVS - Userspace packet processing

2016-10-19 Thread Chandran, Sugesh


Regards
_Sugesh

From: Advith Nagappa [mailto:advith.naga...@gmail.com]
Sent: Wednesday, October 19, 2016 1:02 AM
To: Chandran, Sugesh <sugesh.chand...@intel.com>
Cc: discuss@openvswitch.org
Subject: Re: [ovs-discuss] OVS - Userspace packet processing

Hello Sugesh,

Thank you for the response.

I am using userspace OVS without DPDK. I do plan to use DPDK at a future point, 
but currently am trying to understand the behavior of a pure userspace ovs 
switch.

I have put in custom DBG messages in /lib/dpif_netdev. (specifically 
dp_netdev_process_rxq_port) but this dbg message doesn't get triggered when I 
ping between two hosts connected by a OVS capable switch.

I do see that in this case, the netdev_linux.c module is called, but I don't 
know who is calling this module (i.e the entry point to the ovs code base)
[Sugesh]It looks to me you are using kernel interfaces  in your setup, which is 
not ‘pure’ userspace openvswitch. Can you share the setup details? What type of 
interface you used to connect hosts to OVS?

Any input is appreciated.

Best Regards
Advith


On Tue, Oct 18, 2016 at 10:37 AM, Chandran, Sugesh 
<sugesh.chand...@intel.com<mailto:sugesh.chand...@intel.com>> wrote:


Regards
_Sugesh

From: discuss 
[mailto:discuss-boun...@openvswitch.org<mailto:discuss-boun...@openvswitch.org>]
 On Behalf Of Advith Nagappa
Sent: Sunday, October 16, 2016 1:33 AM
To: discuss@openvswitch.org<mailto:discuss@openvswitch.org>
Subject: [ovs-discuss] OVS - Userspace packet processing


Hello,

I am running OVS in  userspace (rmmod openvswitch.ko).

I wanted to the entry point for a packet within the OVS code base. I.e which 
module first 'sees' the packet in pure userspace OVS.

[Sugesh] [Sugesh] Look at the INSTALL.DPDK.md<http://INSTALL.DPDK.md> and 
INSTALL.DPDK-advanced.md<http://INSTALL.DPDK-advanced.md> for the set up guide.

You can start looking at the lib/dpif-netdev.c. mainly the functions such as 
dp_netdev_process_rxq_port, dp_netdev_input etc.



Best Regards
Advith

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


Re: [ovs-discuss] OVS - Userspace packet processing

2016-10-18 Thread Chandran, Sugesh


Regards
_Sugesh

From: discuss [mailto:discuss-boun...@openvswitch.org] On Behalf Of Advith 
Nagappa
Sent: Sunday, October 16, 2016 1:33 AM
To: discuss@openvswitch.org
Subject: [ovs-discuss] OVS - Userspace packet processing


Hello,

I am running OVS in  userspace (rmmod openvswitch.ko).

I wanted to the entry point for a packet within the OVS code base. I.e which 
module first 'sees' the packet in pure userspace OVS.

[Sugesh] [Sugesh] Look at the INSTALL.DPDK.md and INSTALL.DPDK-advanced.md for 
the set up guide.

You can start looking at the lib/dpif-netdev.c. mainly the functions such as 
dp_netdev_process_rxq_port, dp_netdev_input etc.



Best Regards
Advith
___
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss