aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/buffer.h
diff options
context:
space:
mode:
authorKlement Sekera <klement.sekera@gmail.com>2024-04-19 09:15:01 +0200
committerKlement Sekera <klement.sekera@gmail.com>2024-10-07 16:39:42 +0200
commit860916617dde9fcc857f3542fbc55c67653638ca (patch)
treeab5c9ac442e8a1b6dbc06688a1d2932be72eae3d /src/vnet/buffer.h
parentdb7be85352a58ee3ef028a56cf66c0ac13975115 (diff)
ip: add extended shallow reassembly
This patch adds some fixes and improvements: Fixes bug where save_rewrite_length gets overwritten on reassembly handoff. Fixes bug where duplicate fragments could cause a reassembly context to be lost, because the race losing thread would remove bihash entry created by winning thread. Improves tracing by adding more events. Adds extended shallow reassembly. This is a toggleable option, which if turned on will cause reassembly to wait for both first and last fragments to calculate total IP payload length. Furthermore it'll store a local copy of first fragment and necessary data to retrieve it in vnet_buffer2. This allows downstream features to access full L3/L4 headers when dealing with fragments. Type: fix Change-Id: I81695070533410c5815291dbc65ea71c87e3ae05 Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Diffstat (limited to 'src/vnet/buffer.h')
-rw-r--r--src/vnet/buffer.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/vnet/buffer.h b/src/vnet/buffer.h
index e60b8ffb810..247af56f403 100644
--- a/src/vnet/buffer.h
+++ b/src/vnet/buffer.h
@@ -241,7 +241,8 @@ typedef struct
u8 ip_proto; /* protocol in ip header */
u8 icmp_type_or_tcp_flags;
u8 is_non_first_fragment : 1;
- u8 l4_layer_truncated : 7;
+ u8 l4_hdr_truncated : 1;
+ u8 unused : 6;
u32 tcp_seq_number;
};
/* full reassembly output variables */
@@ -492,7 +493,22 @@ typedef struct
};
} nat;
- u32 unused[8];
+ struct
+ {
+ /*
+ * Shallow virtual reassembly output values.
+ * Only populated if extended reassembly enabled via
+ * ipX_sv_reass_enable_disable_extended().
+ */
+ struct
+ {
+ u32 thread_index;
+ u32 pool_index;
+ u32 id;
+ } reass;
+ } ip;
+
+ u32 unused[5];
} vnet_buffer_opaque2_t;
#define vnet_buffer2(b) ((vnet_buffer_opaque2_t *) (b)->opaque2)