Saurav Das

Two fixes: 1) cpqd emulation of ofdpa pops off internal vlan before sending to controller

2) Arp handler does not need to send flowmod to switch as hostmanager listener is doing that

Change-Id: I5460aa36bcb3cfce3bc1887e304a63b2221495b9
......@@ -76,7 +76,7 @@ public class ArpHandler {
* hosts in the same subnet.
* For an ARP packet with broadcast destination MAC,
* some switches pipelines will send it to the controller due to table miss,
* other swithches will flood the packets directly in the data plane without
* other switches will flood the packets directly in the data plane without
* packet in.
* We can deal with both cases.
*
......@@ -92,10 +92,6 @@ public class ArpHandler {
DeviceId deviceId = connectPoint.deviceId();
byte[] senderMacAddressByte = arp.getSenderHardwareAddress();
Ip4Address hostIpAddress = Ip4Address.valueOf(arp.getSenderProtocolAddress());
srManager.routingRulePopulator.populateIpRuleForHost(deviceId, hostIpAddress, MacAddress.
valueOf(senderMacAddressByte), inPort);
if (arp.getOpCode() == ARP.OP_REQUEST) {
handleArpRequest(deviceId, connectPoint, ethernet);
} else {
......
......@@ -588,6 +588,9 @@ public class CpqdOFDPA2Pipeline extends OFDPA2Pipeline {
if (ins instanceof OutputInstruction) {
OutputInstruction o = (OutputInstruction) ins;
if (o.port() == PortNumber.CONTROLLER) {
// emulating real ofdpa behavior by popping off internal
// vlan before sending to controller
ttBuilder.popVlan();
ttBuilder.add(o);
} else {
log.warn("Only allowed treatments in versatile forwarding "
......