[ONOS-7808] Support P4Runtime default table entries

We achieve this by creating a special mirror to store the original
default entries as specified in the P4 program. Applications can modify
the default entry by inserting flow rules with empty selectors. When
removing such flow rule, the default table entry is restored to the
original one as stored in the mirror.

Change-Id: Ib11a7172ab56be7cbbd23022e4b62ed6b70b6eca
(cherry picked from commit e9ba39c13a5c79dc71b2c4d34c225a5c3c2e129e)
diff --git a/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/mirror/DistributedP4RuntimeDefaultEntryMirror.java b/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/mirror/DistributedP4RuntimeDefaultEntryMirror.java
new file mode 100644
index 0000000..95eb601
--- /dev/null
+++ b/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/mirror/DistributedP4RuntimeDefaultEntryMirror.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2019-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.drivers.p4runtime.mirror;
+
+import org.onosproject.net.pi.runtime.PiEntityType;
+import org.onosproject.net.pi.runtime.PiTableEntry;
+import org.onosproject.net.pi.runtime.PiTableEntryHandle;
+import org.osgi.service.component.annotations.Component;
+
+/**
+ * Distributed implementation of a P4Runtime default entry mirror.
+ */
+@Component(immediate = true, service = P4RuntimeDefaultEntryMirror.class)
+public final class DistributedP4RuntimeDefaultEntryMirror
+        extends AbstractDistributedP4RuntimeMirror
+                        <PiTableEntryHandle, PiTableEntry>
+        implements P4RuntimeDefaultEntryMirror {
+
+    public DistributedP4RuntimeDefaultEntryMirror() {
+        super(PiEntityType.TABLE_ENTRY);
+    }
+}