The macro "OFPACT_FOR_EACH_TYPE" should be instead of
macro "OFPACT_FOR_EACH_TYPE_FLATTENED". The macro and
function with reference to "OFPACT_FOR_EACH_TYPE" can
be removed now.

Signed-off-by: Binbin Xu <xu.binb...@zte.com.cn>
---
 include/openvswitch/ofp-actions.h | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/include/openvswitch/ofp-actions.h 
b/include/openvswitch/ofp-actions.h
index e92b413..e881258 100644
--- a/include/openvswitch/ofp-actions.h
+++ b/include/openvswitch/ofp-actions.h
@@ -203,22 +203,6 @@ ofpact_end(const struct ofpact *ofpacts, size_t 
ofpacts_len)
 }
 
 static inline const struct ofpact *
-ofpact_find_type(const struct ofpact *a, enum ofpact_type type,
-                 const struct ofpact * const end)
-{
-    while (a < end) {
-        if (a->type == type) {
-            return a;
-        }
-        a = ofpact_next(a);
-    }
-    return NULL;
-}
-
-#define OFPACT_FIND_TYPE(A, TYPE, END) \
-    ofpact_get_##TYPE##_nullable(ofpact_find_type(A, OFPACT_##TYPE, END))
-
-static inline const struct ofpact *
 ofpact_find_type_flattened(const struct ofpact *a, enum ofpact_type type,
                            const struct ofpact * const end)
 {
@@ -241,13 +225,6 @@ ofpact_find_type_flattened(const struct ofpact *a, enum 
ofpact_type type,
     for ((POS) = (OFPACTS); (POS) < ofpact_end(OFPACTS, OFPACTS_LEN);  \
          (POS) = ofpact_next(POS))
 
-#define OFPACT_FOR_EACH_TYPE(POS, TYPE, OFPACTS, OFPACTS_LEN)           \
-    for ((POS) = OFPACT_FIND_TYPE(OFPACTS, TYPE,                        \
-                                  ofpact_end(OFPACTS, OFPACTS_LEN));    \
-         (POS);                                                         \
-         (POS) = OFPACT_FIND_TYPE(ofpact_next(&(POS)->ofpact), TYPE,    \
-                                  ofpact_end(OFPACTS, OFPACTS_LEN)))
-
 /* Assigns POS to each ofpact, in turn, in the OFPACTS_LEN bytes of ofpacts
  * starting at OFPACTS.
  *
-- 
2.9.3

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to