I think we better leave the flags field at the original position. For cache it's best to have often accessed fields early in the struct. For the layout it won't matter much, as we waste 6 bytes either way:
<pre>
struct HtpState_ {
        htp_connp_t *              connp;                /*     0     8 */
        Flow *                     f;                    /*     8     8 */
        uint64_t                   transaction_cnt;      /*    16     8 */
        uint64_t                   transaction_done;     /*    24     8 */
        uint64_t                   store_tx_id;          /*    32     8 */
        FileContainer *            files_ts;             /*    40     8 */
        FileContainer *            files_tc;             /*    48     8 */
        struct HTPCfgRec_ *        cfg;                  /*    56     8 */
        /* --- cacheline 1 boundary (64 bytes) --- */
        uint16_t                   flags;                /*    64     2 */

        /* size: 72, cachelines: 2, members: 9 */
        /* padding: 6 */
        /* last cacheline: 8 bytes */
};
</pre>
<pre>
struct HtpState_ {
        htp_connp_t *              connp;                /*     0     8 */
        Flow *                     f;                    /*     8     8 */
        uint16_t                   flags;                /*    16     2 */

        /* XXX 6 bytes hole, try to pack */

        uint64_t                   transaction_cnt;      /*    24     8 */
        uint64_t                   transaction_done;     /*    32     8 */
        uint64_t                   store_tx_id;          /*    40     8 */
        FileContainer *            files_ts;             /*    48     8 */
        FileContainer *            files_tc;             /*    56     8 */
        /* --- cacheline 1 boundary (64 bytes) --- */
        struct HTPCfgRec_ *        cfg;                  /*    64     8 */

        /* size: 72, cachelines: 2, members: 9 */
        /* sum members: 66, holes: 1, sum holes: 6 */
        /* last cacheline: 8 bytes */
};
</pre>
Both 72 bytes.