Added table miss flow for ovs-ofdpa punt table

Make sure packet in still happens even when filtering obj is absent.
VLAN assignment won't happen in this case,
meaning that whatever VLAN a packet carries is the original VLAN and therefore should be persisted.

Change-Id: Ia005abe6354ad4008f88e7378ba4c06bc6b80c81
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/OvsOfdpaPipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/OvsOfdpaPipeline.java
index b65a70a..47f8612 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/OvsOfdpaPipeline.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/OvsOfdpaPipeline.java
@@ -1148,7 +1148,7 @@
         initTableMiss(MPLS_TABLE_1, ACL_TABLE, null);
         initTableMiss(BRIDGING_TABLE, ACL_TABLE, null);
         initTableMiss(ACL_TABLE, -1, null);
-        linkDiscoveryPuntTableRules();
+        initPuntTable();
 
         initPopVlanPuntGroup();
     }
@@ -1203,10 +1203,11 @@
      * that forward traffic to controller.
      *
      */
-    private void linkDiscoveryPuntTableRules() {
+    private void initPuntTable() {
         FlowRuleOperations.Builder ops = FlowRuleOperations.builder();
         TrafficTreatment treatment =  DefaultTrafficTreatment.builder().punt().build();
 
+        // Add punt rule for LLDP and BDDP
         TrafficSelector.Builder lldpSelector = DefaultTrafficSelector.builder();
         lldpSelector.matchEthType(EthType.EtherType.LLDP.ethType().toShort());
         FlowRule lldpRule = DefaultFlowRule.builder()
@@ -1231,14 +1232,26 @@
                 .forTable(PUNT_TABLE).build();
         ops.add(bbdpRule);
 
+        // Add table miss flow rule
+        TrafficSelector.Builder defaultSelector = DefaultTrafficSelector.builder();
+        FlowRule defaultRule = DefaultFlowRule.builder()
+                .forDevice(deviceId)
+                .withSelector(defaultSelector.build())
+                .withTreatment(treatment)
+                .withPriority(LOWEST_PRIORITY)
+                .fromApp(driverId)
+                .makePermanent()
+                .forTable(PUNT_TABLE).build();
+        ops.add(defaultRule);
+
         flowRuleService.apply(ops.build(new FlowRuleOperationsContext() {
             @Override
             public void onSuccess(FlowRuleOperations ops) {
-                log.info("Added lldp/bbdp rules for table {} on {}", PUNT_TABLE, deviceId);
+                log.info("Initialized table {} on {}", PUNT_TABLE, deviceId);
             }
             @Override
             public void onError(FlowRuleOperations ops) {
-                log.warn("Failed to initialize lldp/bbdp rules for table {} on {}", PUNT_TABLE, deviceId);
+                log.warn("Failed to initialize table {} on {}", PUNT_TABLE, deviceId);
             }
         }));
     }