From 33587b30a18a42c736c82800a129c0652d1cd72f Mon Sep 17 00:00:00 2001 From: aland Date: Mon, 23 Apr 2007 08:46:52 +0000 Subject: [PATCH] Moved 'hash' to before 'vector', as it was right next to vps. hash is read in the main thread, and vps is written to in child threads. Having them next to each other results in cache line bouncing. Moving it means that there won't be cache line bouncing, for a small performance increase --- src/include/libradius.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/libradius.h b/src/include/libradius.h index 6f6a8a0..317a490 100644 --- a/src/include/libradius.h +++ b/src/include/libradius.h @@ -203,12 +203,12 @@ typedef struct radius_packet { uint16_t dst_port; int id; unsigned int code; + uint32_t hash; uint8_t vector[AUTH_VECTOR_LEN]; time_t timestamp; uint8_t *data; int data_len; VALUE_PAIR *vps; - uint32_t hash; ssize_t offset; } RADIUS_PACKET; -- 2.1.4