Whamcloud - gitweb
LU-10185 gnilnd: Change gnc_tx_bits to unsigned long 97/29897/4
authorChuck Fossen <chuckf@cray.com>
Wed, 6 Sep 2017 13:18:36 +0000 (08:18 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 22 Dec 2017 07:04:19 +0000 (07:04 +0000)
gnc_tx_bits declared as __u8. Change to unsigned long.

The goal is to align gnc_tx_bits[] to a 32 bit boundary.
The initial declaration I believe was not a good choice.
The use of the gnc_tx_bits makes more sense as a long than as a 8 bit
value.
It is used by:
static inline int test_and_clear_bit(int nr, unsigned long *addr);
unsigned long find_next_zero_bit(unsigned long *addr, unsigned long
size, unsigned long offset);
static inline int test_and_set_bit(int nr, unsigned long *addr);
all of which takes a unsigned long pointer.

Test-parameters: trivial

Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: I559e2a356182f253716d30f69bf675c485fe1b72
Reviewed-on: https://review.whamcloud.com/29897
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/klnds/gnilnd/gnilnd.h

index 6cf451c..2ec071d 100644 (file)
@@ -763,7 +763,7 @@ typedef struct kgn_conn {
        kgn_fma_memblock_t *gnc_fma_blk;        /* pointer to fma block for our mailbox */
        gni_smsg_attr_t     gnpr_smsg_attr;     /* my short msg. attributes */
        spinlock_t          gnc_tx_lock;        /* protect tx alloc/free */
-       __u8                gnc_tx_bits[GNILND_MAX_MSG_ID/8]; /* bit table for tx id */
+       unsigned long       gnc_tx_bits[(GNILND_MAX_MSG_ID/8)/sizeof(unsigned long)]; /* bit table for tx id */
        int                 gnc_next_tx;        /* next tx to use in tx_ref_table */
        kgn_tx_t          **gnc_tx_ref_table;   /* table of TX descriptors for this conn */
        int                 gnc_mbox_id;        /* id of mbox in fma_blk                 */