ecklm / adaptive-network-slicing

Project holding the implementation and results of my thesis project at University of Trento, Italy
20 stars 5 forks source link

Eliminate device-related hardwired values #1

Closed ecklm closed 4 years ago

ecklm commented 4 years ago

Things like the following restrict topology expansion for multiple switches.

139:        "port_name": "s1-eth1", "type": "linux-htb", "max_rate": "50000000",
ecklm commented 4 years ago
ecklm commented 4 years ago

Virtual interfaces are only generated for links defined in the mininet topology file with the self.addLink() function. It's enough to simply iterate through the list of all interfaces and set queues there.

ecklm commented 4 years ago

The solution is not perfect, certainly the extraction of port names is insufficient as lines like these suggest in the log:

http://localhost:8080 "POST /qos/queue/0000000000000005 HTTP/1.1" 400 21
400 - s5 port is not exists
ecklm commented 4 years ago

The problem is that the internal interface -- named equivalently as the switch -- is not always on the same position in the list. I have come up with two heuristical solutions to work this around.

  1. Order the extracted ports and leave the first one. As the ports are seemingly always formatted like sx-ethy, simply dropping the shortest one will drop the default internal interface.
  2. Based on the object containing data of all ports, there are two parameters -- curr and curr_speed -- that are 0 on the internal interface and not 0 on others. The advantage of determining based on these is that possible further internal interfaces would also be filtered out. The downside is, that this being a legit differentiation is only a theory at the moment.
    {
    3: OFPPort(port_no=3,hw_addr='46:d3:e6:1b:e0:71',name=b's2-eth3',config=0,state=0,curr=2112,advertised=0,supported=0,peer=0,curr_speed=10000000,max_speed=0),
    1: OFPPort(port_no=1,hw_addr='1a:5e:2d:ee:db:94',name=b's2-eth1',config=0,state=0,curr=2112,advertised=0,supported=0,peer=0,curr_speed=10000000,max_speed=0),
    2: OFPPort(port_no=2,hw_addr='8e:eb:e5:1c:f0:4e',name=b's2-eth2',config=0,state=0,curr=2112,advertised=0,supported=0,peer=0,curr_speed=10000000,max_speed=0),
    4294967294: OFPPort(port_no=4294967294,hw_addr='92:31:ef:44:fd:4b',name=b's2',config=0,state=0,curr=0,advertised=0,supported=0,peer=0,curr_speed=0,max_speed=0)
    }

In the output of ovs-vsctl show there is a type field on the internal ones, but it doesn't seem to appear in the OpenFlow message. Example:

Bridge "s10"
        Controller "tcp:192.0.2.1:6653"
        Controller "ptcp:6663"
        fail_mode: secure
        Port "s10-eth2"
            Interface "s10-eth2"
        Port "s10"
            Interface "s10"
                type: internal
        Port "s10-eth3"
            Interface "s10-eth3"
        Port "s10-eth1"
            Interface "s10-eth1"
ecklm commented 4 years ago

I haven't found a specific definition of the curr and curr_speed fields so let's just go for solution 1 now.