This new api is used in a subsequent patch and may otherwise be useful. Signed-off-by: Darrell Ball <dlu...@gmail.com> --- lib/dp-packet.h | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/lib/dp-packet.h b/lib/dp-packet.h index a6e2a4f..034b81b 100644 --- a/lib/dp-packet.h +++ b/lib/dp-packet.h @@ -804,6 +804,12 @@ dp_packet_batch_is_empty(const struct dp_packet_batch *batch) return !dp_packet_batch_size(batch); } +static inline bool +dp_packet_batch_is_full(const struct dp_packet_batch *batch) +{ + return dp_packet_batch_size(batch) == NETDEV_MAX_BURST; +} + #define DP_PACKET_BATCH_FOR_EACH(IDX, PACKET, BATCH) \ for (size_t IDX = 0; IDX < dp_packet_batch_size(BATCH); IDX++) \ if (PACKET = BATCH->packets[IDX], true) -- 1.9.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev