This new api is used in a subsequent patch and may otherwise be useful.
Signed-off-by: Darrell Ball <[email protected]>
---
lib/dp-packet.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/dp-packet.h b/lib/dp-packet.h
index 26cfcb9..31c26e5 100644
--- a/lib/dp-packet.h
+++ b/lib/dp-packet.h
@@ -817,6 +817,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
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev