Various fixes to get a P4Runtime demo that works
Change-Id: Icab512fceeb6ec0faf1b402c1e325e055cdb2caf
diff --git a/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/Bmv2PacketProgrammable.java b/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/Bmv2PacketProgrammable.java
index c48eef3..3e0c887 100644
--- a/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/Bmv2PacketProgrammable.java
+++ b/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/Bmv2PacketProgrammable.java
@@ -65,7 +65,7 @@
Device device = deviceService.getDevice(deviceId);
final PiPipelineInterpreter interpreter = device.is(PiPipelineInterpreter.class)
? device.as(PiPipelineInterpreter.class) : null;
- if (device.is(PiPipelineInterpreter.class)) {
+ if (!device.is(PiPipelineInterpreter.class)) {
log.warn("Device {} unable to instantiate interpreter of pipeconf {}", deviceId, pipeconf.id());
return;
}
@@ -73,6 +73,7 @@
try {
Collection<PiPacketOperation> operations = interpreter.mapOutboundPacket(packet);
operations.forEach(piPacketOperation -> {
+ log.debug("Doing PiPacketOperation {}", piPacketOperation);
client.packetOut(piPacketOperation, pipeconf);
});
} catch (PiPipelineInterpreter.PiInterpreterException e) {