2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-05 08:45:23 +00:00

ofp-actions: Remove unused OFPACT_FOR_EACH_TYPE.

Signed-off-by: Binbin Xu <xu.binbin1@zte.com.cn>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Binbin Xu
2016-09-21 03:54:06 +08:00
committed by Ben Pfaff
parent 8483173bff
commit 814aac29b5

View File

@@ -202,22 +202,6 @@ ofpact_end(const struct ofpact *ofpacts, size_t ofpacts_len)
return (void *) ((uint8_t *) ofpacts + 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.
*