Re: [controller-dev] ovs related queries: ofport_request purpose and range


Venkata Siva Vijayendra Bhamidipati
 

Hi Madhu!

Thanks a lot for the info! Indeed I am able to see the ofport_request info in the ovs-vsctl list interface output. Also, ovs-vsctl errors out with the range in case I attempt to add a value larger than 65279 for ofport_request.

In this context, I have a few queries – I see in the GUI, an HTTP GET controller/web/devices/nodesLearnt request being sent to the controller when I go to the Connection Manager page. In the controller code, this leads to the getNodesLearnt() method for GET /nodesLearnt in Devices.java, and onward in that code path, when it retrieves all the name/port info etc of the devices (switches) it knows of, it looks like the switches’ info is already discovered and filled in, but I can’t find the exact path/point where this info is pushed to the controller. Since I set the controller for the bridge I create, as the ODL controller-ip:6633, evidently ovs is pushing it to the controller, but not sure where that code is in the controller. Any idea where I should look at for that? Thought I’d ask right away before I dug deeper into it, so it would save time in case I get the answer from you.. Also, is there a database that the controller writes this info to? If so, how can I view it? Or is the controller stateless?

Thanks again!
Regards,
Vijay

From: Madhu Venguopal <mavenugo@...>
Date: Wednesday, January 15, 2014 at 3:19 PM
To: "Bhamidipati, Vijay" <vbhamidipati@...>, "controller-dev@..." <controller-dev@...>, "ovsdb-dev@..." <ovsdb-dev@...>
Subject: Re: [controller-dev] ovs related queries: ofport_request purpose and range

Hi Vijay,

The port number that you see in ovs-dpctl is NOT the openflow assigned port number.
Rather it is the datapath port identifier used purely for the forwarding purposes.

Please use the command : "sudo ovs-vsctl list interface" to know the requested openflow port number
and the assigned port number. In most of the cases, it will be the same unless the requested number
is unavailable.

Please let us know if you have any questions.

Thanks,
Madhu

On 1/15/14, 2:59 PM, ebaysf, vbhamidipati wrote:

Hi,

I have a few queries regarding OVS, and it would be great if someone could help me out with them. As I understand it, if I do:

sudo ovs-vsctl add-port <bridge-name> eth<x> -- set interface eth<x> ofport_request=xyz

The ofport_request specifies a value that assigns a number to the port that I am adding to the bridge on ovs. Hence, I would expect `ovs-dpctl show` to show up this port number. However, what I actually see in the output is a different port number that seems to be auto assigned to it.

I’ll walkthrough the commands I executed, as an example:

*************************
First, I have no bridge to begin with:

user@OVSsetupVM3:/var/log/ovs-bugtool/bug-report-20140110070820$ sudo ovs-vsctl list-br

user@OVSsetupVM3:/var/log/ovs-bugtool/bug-report-20140110070820$



Next, I create a bridge B1:


user@OVSsetupVM3:/var/log/ovs-bugtool/bug-report-20140110070820$ sudo ovs-vsctl add-br B1

user@OVSsetupVM3:/var/log/ovs-bugtool/bug-report-20140110070820$ sudo ovs-vsctl list-br

B1

user@OVSsetupVM3:/var/log/ovs-bugtool/bug-report-20140110070820$ ovs-dpctl show

system@ovs-system:

lookups: hit:21717 missed:3637 lost:0

flows: 2

port 0: ovs-system (internal)

port 1: B1 (internal)

user@OVSsetupVM3:/var/log/ovs-bugtool/bug-report-20140110070820$ 



After that, I add a port with ofport_request set to say, 45, and view the ovs-dpctl output:



user@OVSsetupVM3:/var/log/ovs-bugtool/bug-report-20140110070820$ sudo ovs-vsctl add-port B1 eth0 -- set interface eth0 ofport_request=45

user@OVSsetupVM3:/var/log/ovs-bugtool/bug-report-20140110070820$ ovs-dpctl show

system@ovs-system:

lookups: hit:21717 missed:3637 lost:0

flows: 0

port 0: ovs-system (internal)

port 1: B1 (internal)

port 2: eth0

user@OVSsetupVM3:/var/log/ovs-bugtool/bug-report-20140110070820$



What I expected to see was :


user@OVSsetupVM3:/var/log/ovs-bugtool/bug-report-20140110070820$ ovs-dpctl show

system@ovs-system:

lookups: hit:21717 missed:3637 lost:0

flows: 0

port 0: ovs-system (internal)

port 1: B1 (internal)

port 45: eth0

user@OVSsetupVM3:/var/log/ovs-bugtool/bug-report-20140110070820$



*************************
So here are the queries I have:
1) What is this ofport_request actually doing? What is the valid max value that can be provided for this attribute?
2) If I set the controller for this bridge as my ODL controller, and then view the port I just added, in the devices page, I actually am able to see 45 as the port number there. So why isn’t ovs-dpctl showing 45? Is it an ovs bug? Or should I execute another command/option to view this info?


Any help/pointers would be greatly appreciated!

Thanks,
Regards,
Vijay



_______________________________________________
controller-dev mailing list
controller-dev@...https://lists.opendaylight.org/mailman/listinfo/controller-dev

Join z.archive.ovsdb-dev@lists.opendaylight.org to automatically receive all group messages.