diff options
author | alfred <alfred@FreeBSD.org> | 2013-11-08 22:29:07 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2013-11-08 22:29:07 +0000 |
commit | 204a78e2fcfb13aed43b7cd2006d6ddace4de688 (patch) | |
tree | 4f535886b316d4d78cd5a8c6a356b78b0375f6dc /sys/ofed/include | |
parent | 8964c3a79b724ffa28a2ade2c6c712bd3572ef8e (diff) | |
download | FreeBSD-src-204a78e2fcfb13aed43b7cd2006d6ddace4de688.zip FreeBSD-src-204a78e2fcfb13aed43b7cd2006d6ddace4de688.tar.gz |
MFC: r257862, r257863, r257864
r257862:
Use explicit long cast to avoid overflow in bitopts.
This was causing problems with the buddy allocator inside of
ofed.
r257863:
Fix for bad performance when mtu is increased.
Update the auto moderation behavior in the mlxen driver to match
the new LINUX OFED code.
r257864:
Do not use a sleep lock when protecting the driver flags.
This was causing a locking issue with lagg.
Approved by: re
Diffstat (limited to 'sys/ofed/include')
-rw-r--r-- | sys/ofed/include/linux/bitops.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/ofed/include/linux/bitops.h b/sys/ofed/include/linux/bitops.h index 4ada708..bac688a 100644 --- a/sys/ofed/include/linux/bitops.h +++ b/sys/ofed/include/linux/bitops.h @@ -286,14 +286,14 @@ bitmap_empty(unsigned long *addr, int size) #define NBLONG (NBBY * sizeof(long)) #define set_bit(i, a) \ - atomic_set_long(&((volatile long *)(a))[(i)/NBLONG], 1 << (i) % NBLONG) + atomic_set_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << (i) % NBLONG) #define clear_bit(i, a) \ - atomic_clear_long(&((volatile long *)(a))[(i)/NBLONG], 1 << (i) % NBLONG) + atomic_clear_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << (i) % NBLONG) #define test_bit(i, a) \ !!(atomic_load_acq_long(&((volatile long *)(a))[(i)/NBLONG]) & \ - 1 << ((i) % NBLONG)) + 1UL << ((i) % NBLONG)) static inline long test_and_clear_bit(long bit, long *var) |