return networkUUID;
}
- public void updateDpnPortInfo(Uint64 dpnId, Long ofPort, int addOrRemove) {
+ public void updateDpnPortInfo(Uint64 dpnId, Long ofPort,Uuid portId, int addOrRemove) {
if (dpnId == null) {
return;
}
synchronized (networkUUID.getValue()) {
DpnInterfaceInfo dpnInterface = dpnIfaceList.computeIfAbsent(dpnId, key -> new DpnInterfaceInfo(dpnId));
if (addOrRemove == Ipv6ServiceConstants.ADD_ENTRY) {
- dpnInterface.updateofPortList(ofPort);
+ dpnInterface.updateofPortMap(ofPort, portId);
} else {
- dpnInterface.removeOfPortFromList(ofPort);
+ dpnInterface.removeOfPortFromMap(ofPort);
}
}
}
public void removeSelf() {
synchronized (networkUUID.getValue()) {
dpnIfaceList.values().forEach(dpnInterfaceInfo -> {
- dpnInterfaceInfo.clearOfPortList();
+ dpnInterfaceInfo.clearPortList();
dpnInterfaceInfo.clearNdTargetFlowInfo();
dpnInterfaceInfo.clearsubnetCidrPuntFlowInfo();
+ dpnInterfaceInfo.clearOvsNaResponderFlowConfigured();
});
clearDpnInterfaceList();
Uint64 dpId;
int rsPuntFlowConfigured;
final Set<Uuid> subnetCidrPuntFlowList = ConcurrentHashMap.newKeySet();
- final Set<Long> ofPortList = ConcurrentHashMap.newKeySet();
final Set<Ipv6Address> ndTargetFlowsPunted = ConcurrentHashMap.newKeySet();
+ ConcurrentMap<Long, Uuid> ofPortMap;
+ ConcurrentMap<Uuid, Integer> ovsNaResponderFlowConfigured;
DpnInterfaceInfo(Uint64 dpnId) {
dpId = dpnId;
+ ofPortMap = new ConcurrentHashMap();
rsPuntFlowConfigured = Ipv6ServiceConstants.FLOWS_NOT_CONFIGURED;
+ ovsNaResponderFlowConfigured = new ConcurrentHashMap();
}
public void setDpId(Uint64 dpId) {
this.ndTargetFlowsPunted.clear();
}
- public void updateofPortList(Long ofPort) {
- this.ofPortList.add(ofPort);
+ public void setOvsNaResponderFlowConfiguredStatus(Uuid interfaceName, int lportTag, int addOrRemove) {
+ if (addOrRemove == Ipv6ServiceConstants.ADD_ENTRY) {
+ this.ovsNaResponderFlowConfigured.put(interfaceName, lportTag);
+ } else {
+ this.ovsNaResponderFlowConfigured.remove(interfaceName);
+ }
+ }
+
+ public void clearOvsNaResponderFlowConfigured() {
+ this.ovsNaResponderFlowConfigured.clear();
+ }
+
+ public void updateofPortMap(Long ofPort, Uuid portId) {
+ this.ofPortMap.put(ofPort, portId);
}
- public void removeOfPortFromList(Long ofPort) {
- this.ofPortList.remove(ofPort);
+ public void removeOfPortFromMap(Long ofPort) {
+ this.ofPortMap.remove(ofPort);
}
- public void clearOfPortList() {
- this.ofPortList.clear();
+ public void clearPortList() {
+ this.ofPortMap.clear();
}
public void clearsubnetCidrPuntFlowInfo() {
@Override
public String toString() {
return "DpnInterfaceInfo [dpId=" + dpId + " rsPuntFlowConfigured=" + rsPuntFlowConfigured
- + "subnetCidrPuntFlowList=" + subnetCidrPuntFlowList + " ofPortList="
- + ofPortList + "]";
+ + "subnetCidrPuntFlowList=" + subnetCidrPuntFlowList + " ofPortMap ="
+ + ofPortMap + "]";
}
}
}