diff --git a/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/DefaultP4PortStatisticsDiscovery.java b/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/DefaultP4PortStatisticsDiscovery.java
index 081e0f1..b2b3760 100644
--- a/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/DefaultP4PortStatisticsDiscovery.java
+++ b/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/DefaultP4PortStatisticsDiscovery.java
@@ -46,16 +46,29 @@
     // With P4_14, counter names in the generated P4Info won't have any scope.
     // A solution could be that of dynamically building counter IDs based on the P4Info (as in DefaultP4Interpreter).
     private static final String DEFAULT_SCOPE = "port_counters_control";
-    private static final String INGRESS_COUNTER = "ingress_port_counter";
-    private static final String EGRESS_COUNTER = "egress_port_counter";
+    private static final PiCounterId DEFAULT_INGRESS_COUNTER_ID = PiCounterId.of(DEFAULT_SCOPE,
+                                                                                 "ingress_port_counter",
+                                                                                 INDIRECT);
+    private static final PiCounterId DEFAULT_EGRESS_COUNTER_ID = PiCounterId.of(DEFAULT_SCOPE,
+                                                                                "egress_port_counter",
+                                                                                INDIRECT);
 
     /**
-     * Returns the scope string to be used for the counter IDs.
+     * Returns the ID of the ingress port counter.
      *
-     * @return scope string
+     * @return counter ID
      */
-    public String scope() {
-        return DEFAULT_SCOPE;
+    public PiCounterId ingressCounterId() {
+        return DEFAULT_INGRESS_COUNTER_ID;
+    }
+
+    /**
+     * Returns the ID of the egress port counter.
+     *
+     * @return counter ID
+     */
+    public PiCounterId egressCounterId() {
+        return DEFAULT_EGRESS_COUNTER_ID;
     }
 
     @Override
@@ -65,9 +78,6 @@
             return Collections.emptyList();
         }
 
-        final PiCounterId ingressCounterId = PiCounterId.of(scope(), INGRESS_COUNTER, INDIRECT);
-        final PiCounterId egressCounterId = PiCounterId.of(scope(), EGRESS_COUNTER, INDIRECT);
-
         Map<Long, DefaultPortStatistics.Builder> portStatBuilders = Maps.newHashMap();
 
         deviceService.getPorts(deviceId)
@@ -79,8 +89,8 @@
         Set<PiCounterCellId> counterCellIds = Sets.newHashSet();
         portStatBuilders.keySet().forEach(p -> {
             // Counter cell/index = port number.
-            counterCellIds.add(PiIndirectCounterCellId.of(ingressCounterId, p));
-            counterCellIds.add(PiIndirectCounterCellId.of(egressCounterId, p));
+            counterCellIds.add(PiIndirectCounterCellId.of(ingressCounterId(), p));
+            counterCellIds.add(PiIndirectCounterCellId.of(egressCounterId(), p));
         });
 
         Collection<PiCounterCellData> counterEntryResponse;
@@ -103,10 +113,10 @@
                 return;
             }
             DefaultPortStatistics.Builder statsBuilder = portStatBuilders.get(indCellId.index());
-            if (counterData.cellId().counterId().equals(ingressCounterId)) {
+            if (counterData.cellId().counterId().equals(ingressCounterId())) {
                 statsBuilder.setPacketsReceived(counterData.packets());
                 statsBuilder.setBytesReceived(counterData.bytes());
-            } else if (counterData.cellId().counterId().equals(egressCounterId)) {
+            } else if (counterData.cellId().counterId().equals(egressCounterId())) {
                 statsBuilder.setPacketsSent(counterData.packets());
                 statsBuilder.setBytesSent(counterData.bytes());
             } else {
