[ovs-dev] [PATCH] dp-packet: use dp_packet_reset_offsets during initialisation
Simon Horman
simon.horman at netronome.com
Tue Dec 1 06:03:09 UTC 2015
Use dp_packet_reset_offsets() in dp_packet_init__() to make it
clearer that initialisation includes a reset of packets
packets the same way as callers to dp_packet_reset_offsets() reset packets.
Signed-off-by: Simon Horman <simon.horman at netronome.com>
---
lib/dp-packet.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/dp-packet.c b/lib/dp-packet.c
index 098f816563bd..1d166e15cf6c 100644
--- a/lib/dp-packet.c
+++ b/lib/dp-packet.c
@@ -27,8 +27,7 @@ dp_packet_init__(struct dp_packet *b, size_t allocated, enum dp_packet_source so
{
dp_packet_set_allocated(b, allocated);
b->source = source;
- b->l2_pad_size = 0;
- b->l2_5_ofs = b->l3_ofs = b->l4_ofs = UINT16_MAX;
+ dp_packet_reset_offsets(b);
pkt_metadata_init(&b->md, 0);
}
--
2.1.4
More information about the dev
mailing list