[ovs-dev] [ovs-dev 1/7] dpif-netdev: Remove dp_meter_* struct to header file

xiangxia.m.yue at gmail.com xiangxia.m.yue at gmail.com
Sat Dec 28 07:11:10 UTC 2019


From: Tonghao Zhang <xiangxia.m.yue at gmail.com>

This patch will be used in later patch.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
---
 lib/dpif-netdev.c | 17 -----------------
 lib/dpif-netdev.h | 17 +++++++++++++++++
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 8485b54..7fcd8cb 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -261,23 +261,6 @@ static bool dpcls_lookup(struct dpcls *cls,
 #define DP_SUPPORTED_METER_BAND_TYPES           \
     ( 1 << OFPMBT13_DROP )
 
-struct dp_meter_band {
-    struct ofputil_meter_band up; /* type, prec_level, pad, rate, burst_size */
-    uint32_t bucket; /* In 1/1000 packets (for PKTPS), or in bits (for KBPS) */
-    uint64_t packet_count;
-    uint64_t byte_count;
-};
-
-struct dp_meter {
-    uint16_t flags;
-    uint16_t n_bands;
-    uint32_t max_delta_t;
-    uint64_t used;
-    uint64_t packet_count;
-    uint64_t byte_count;
-    struct dp_meter_band bands[];
-};
-
 struct pmd_auto_lb {
     bool auto_lb_requested;     /* Auto load balancing requested by user. */
     bool is_enabled;            /* Current status of Auto load balancing. */
diff --git a/lib/dpif-netdev.h b/lib/dpif-netdev.h
index 6db6ed2..b5f5c12 100644
--- a/lib/dpif-netdev.h
+++ b/lib/dpif-netdev.h
@@ -33,6 +33,23 @@ extern "C" {
  * headers to be aligned on a 4-byte boundary.  */
 enum { DP_NETDEV_HEADROOM = 2 + VLAN_HEADER_LEN };
 
+struct dp_meter_band {
+    struct ofputil_meter_band up; /* type, prec_level, pad, rate, burst_size */
+    uint32_t bucket; /* In 1/1000 packets (for PKTPS), or in bits (for KBPS) */
+    uint64_t packet_count;
+    uint64_t byte_count;
+};
+
+struct dp_meter {
+    uint16_t flags;
+    uint16_t n_bands;
+    uint32_t max_delta_t;
+    uint64_t used;
+    uint64_t packet_count;
+    uint64_t byte_count;
+    struct dp_meter_band bands[];
+};
+
 bool dpif_is_netdev(const struct dpif *);
 
 #define NR_QUEUE   1
-- 
1.8.3.1



More information about the dev mailing list