From 81ca1cd1c362ae536a6bee260827c395a78dc637 Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Sat, 13 Aug 2016 02:11:16 +0300 Subject: trafgen: proto: Improve to find lower header by index Extended struct proto_hdr with 'index' field which is used for faster lookup of lower header without doing a loop. Signed-off-by: Vadim Kochan Signed-off-by: Tobias Klauser --- trafgen_proto.h | 1 + 1 file changed, 1 insertion(+) (limited to 'trafgen_proto.h') diff --git a/trafgen_proto.h b/trafgen_proto.h index 000938c..35a55d5 100644 --- a/trafgen_proto.h +++ b/trafgen_proto.h @@ -46,6 +46,7 @@ struct proto_hdr { const struct proto_ops *ops; uint16_t pkt_offset; uint32_t pkt_id; + uint32_t index; struct proto_field *fields; size_t fields_count; bool is_csum_valid; -- cgit v1.2.3-54-g00ecf