import org.opendaylight.yangtools.yang.common.RpcError;
import org.opendaylight.yangtools.yang.common.RpcResult;
import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
+import org.opendaylight.yangtools.yang.common.Uint8;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private final SingleLayerFlowService<UpdateFlowOutput> flowUpdateMessage;
private final SingleLayerFlowService<RemoveFlowOutput> flowRemoveMessage;
private final DeviceContext deviceContext;
+ private static final Uint8 OFPTT_ALL = Uint8.MAX_VALUE;
public SalFlowServiceImpl(final RequestContextStack requestContextStack,
final DeviceContext deviceContext,
if (LOG.isDebugEnabled()) {
LOG.debug("Flow remove finished without error for flow={}", input);
}
- FlowRegistryKey flowRegistryKey =
- FlowRegistryKeyFactory.create(deviceContext.getDeviceInfo().getVersion(), input);
- deviceContext.getDeviceFlowRegistry().addMark(flowRegistryKey);
+ if (input.getTableId() != null && !input.getTableId().equals(OFPTT_ALL)) {
+ FlowRegistryKey flowRegistryKey =
+ FlowRegistryKeyFactory.create(deviceContext.getDeviceInfo().getVersion(), input);
+ deviceContext.getDeviceFlowRegistry().addMark(flowRegistryKey);
+ } else {
+ deviceContext.getDeviceFlowRegistry().clearFlowRegistry();
+ }
} else {
if (LOG.isDebugEnabled()) {
LOG.debug("Flow remove failed for flow={}, errors={}", input,