Moved 'hash' to before 'vector', as it was right next to vps.
authoraland <aland>
Mon, 23 Apr 2007 08:46:52 +0000 (08:46 +0000)
committeraland <aland>
Mon, 23 Apr 2007 08:46:52 +0000 (08:46 +0000)
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

index 6f6a8a0..317a490 100644 (file)
@@ -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;