Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How does the openflow plugin create a link

(1). When connect the openflow controller with mininet. (For example, Create 2 switches and four hosts) For MD-SAL openflow plugin, there is a new node created in SalRegistrationManager, and then relevant NodeConnectors will be created.

When I look into the code, I found that the overrided onPop() method in LLDPSpeakerPopListener will be called when there is a NodeConnected created, but I am not sure which statement publishes the notification and invokes this function?

(2). In onPop() function, it will call addNodeConnector at last. And transmitPacket() is called in the end of addNodeConnector function.

    ModelDrivenSwitch md = nodeMap.get(nodeInstanceId);
    md.transmitPacket(nodeConnectorMap.get(nodeConnectorInstanceId));

How does transmitPacket() work here? What does it mean?

(3). Moreover, I found that onPacketReceived() method in LLDPDiscoveryListener is called when a link is created. But I am not sure which statement publishes the notification and invokes this function?

In onPacketReceived() function, it will call publish() at last, which invokes onLinkDiscovered() in FlowCapableTopologyExporter.

@Override
public synchronized void onLinkDiscovered(final LinkDiscovered notification) {
    Link link = toTopologyLink(notification);
    InstanceIdentifier<Link> path = linkPath(link);
    DataModificationTransaction tx = dataService.beginTransaction();
    tx.putOperationalData(path, link);
    listenOnTransactionState(tx.getIdentifier(),tx.commit());

}

(4). In the end of function, it will call listenOnTransactionState(). How does this function work here?

(5). In above questions, one is for creating a NodeConnector and another one is for creating a Link. However, how does this two things relate in logic?

By the way, are there any details for how does openflow plugin work with those network service functions? Any detailed specifications for topology-manager, hosttracker, swtich-mananger, FRM and stats-manager ....?

How does the openflow plugin create a link

(1). When connect the openflow controller with mininet. (For example, Create 2 switches and four hosts) For MD-SAL openflow plugin, there is a new node created in SalRegistrationManager, and then relevant NodeConnectors will be created.

When I look into the code, I found that the overrided onPop() method in LLDPSpeakerPopListener will be called when there is a NodeConnected created, but I am not sure which statement publishes the notification and invokes this function?

(2). In onPop() function, it will call addNodeConnector at last. And transmitPacket() is called in the end of addNodeConnector function.

    ModelDrivenSwitch md = nodeMap.get(nodeInstanceId);
    md.transmitPacket(nodeConnectorMap.get(nodeConnectorInstanceId));

How does transmitPacket() work here? What does it mean?

(3). Moreover, I found that onPacketReceived() method in LLDPDiscoveryListener is called when a link is created. But I am not sure which statement publishes the notification and invokes this function?

In onPacketReceived() function, it will call publish() at last, which invokes onLinkDiscovered() in FlowCapableTopologyExporter.

@Override
public synchronized void onLinkDiscovered(final LinkDiscovered notification) {
    Link link = toTopologyLink(notification);
    InstanceIdentifier<Link> path = linkPath(link);
    DataModificationTransaction tx = dataService.beginTransaction();
    tx.putOperationalData(path, link);
    listenOnTransactionState(tx.getIdentifier(),tx.commit());

}

(4). In the end of function, it will call listenOnTransactionState(). How does this function work here?

(5). In above questions, one is for creating a NodeConnector and another one is for creating a Link. However, once the NodeConnectors have been created, how does this is the link between two things relate in logic?

NodeConnectors formed?

(6). By the way, are there any details for how does openflow plugin work with those network service functions? Any detailed specifications for topology-manager, hosttracker, swtich-mananger, FRM and stats-manager ....?