diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mlx4/qp.h | 2 | ||||
| -rw-r--r-- | include/linux/netdevice.h | 1 | ||||
| -rw-r--r-- | include/linux/rhashtable.h | 22 |
3 files changed, 7 insertions, 18 deletions
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 2bbc62aa818a..551f85456c11 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
| @@ -427,7 +427,7 @@ struct mlx4_wqe_inline_seg { | |||
| 427 | 427 | ||
| 428 | enum mlx4_update_qp_attr { | 428 | enum mlx4_update_qp_attr { |
| 429 | MLX4_UPDATE_QP_SMAC = 1 << 0, | 429 | MLX4_UPDATE_QP_SMAC = 1 << 0, |
| 430 | MLX4_UPDATE_QP_VSD = 1 << 2, | 430 | MLX4_UPDATE_QP_VSD = 1 << 1, |
| 431 | MLX4_UPDATE_QP_SUPPORTED_ATTRS = (1 << 2) - 1 | 431 | MLX4_UPDATE_QP_SUPPORTED_ATTRS = (1 << 2) - 1 |
| 432 | }; | 432 | }; |
| 433 | 433 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 5897b4ea5a3f..429d1790a27e 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -2342,6 +2342,7 @@ struct gro_remcsum { | |||
| 2342 | 2342 | ||
| 2343 | static inline void skb_gro_remcsum_init(struct gro_remcsum *grc) | 2343 | static inline void skb_gro_remcsum_init(struct gro_remcsum *grc) |
| 2344 | { | 2344 | { |
| 2345 | grc->offset = 0; | ||
| 2345 | grc->delta = 0; | 2346 | grc->delta = 0; |
| 2346 | } | 2347 | } |
| 2347 | 2348 | ||
diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h index 58851275fed9..d438eeb08bff 100644 --- a/include/linux/rhashtable.h +++ b/include/linux/rhashtable.h | |||
| @@ -54,10 +54,11 @@ struct rhash_head { | |||
| 54 | * @buckets: size * hash buckets | 54 | * @buckets: size * hash buckets |
| 55 | */ | 55 | */ |
| 56 | struct bucket_table { | 56 | struct bucket_table { |
| 57 | size_t size; | 57 | size_t size; |
| 58 | unsigned int locks_mask; | 58 | unsigned int locks_mask; |
| 59 | spinlock_t *locks; | 59 | spinlock_t *locks; |
| 60 | struct rhash_head __rcu *buckets[]; | 60 | |
| 61 | struct rhash_head __rcu *buckets[] ____cacheline_aligned_in_smp; | ||
| 61 | }; | 62 | }; |
| 62 | 63 | ||
| 63 | typedef u32 (*rht_hashfn_t)(const void *data, u32 len, u32 seed); | 64 | typedef u32 (*rht_hashfn_t)(const void *data, u32 len, u32 seed); |
| @@ -78,12 +79,6 @@ struct rhashtable; | |||
| 78 | * @locks_mul: Number of bucket locks to allocate per cpu (default: 128) | 79 | * @locks_mul: Number of bucket locks to allocate per cpu (default: 128) |
| 79 | * @hashfn: Function to hash key | 80 | * @hashfn: Function to hash key |
| 80 | * @obj_hashfn: Function to hash object | 81 | * @obj_hashfn: Function to hash object |
| 81 | * @grow_decision: If defined, may return true if table should expand | ||
| 82 | * @shrink_decision: If defined, may return true if table should shrink | ||
| 83 | * | ||
| 84 | * Note: when implementing the grow and shrink decision function, min/max | ||
| 85 | * shift must be enforced, otherwise, resizing watermarks they set may be | ||
| 86 | * useless. | ||
| 87 | */ | 82 | */ |
| 88 | struct rhashtable_params { | 83 | struct rhashtable_params { |
| 89 | size_t nelem_hint; | 84 | size_t nelem_hint; |
| @@ -97,10 +92,6 @@ struct rhashtable_params { | |||
| 97 | size_t locks_mul; | 92 | size_t locks_mul; |
| 98 | rht_hashfn_t hashfn; | 93 | rht_hashfn_t hashfn; |
| 99 | rht_obj_hashfn_t obj_hashfn; | 94 | rht_obj_hashfn_t obj_hashfn; |
| 100 | bool (*grow_decision)(const struct rhashtable *ht, | ||
| 101 | size_t new_size); | ||
| 102 | bool (*shrink_decision)(const struct rhashtable *ht, | ||
| 103 | size_t new_size); | ||
| 104 | }; | 95 | }; |
| 105 | 96 | ||
| 106 | /** | 97 | /** |
| @@ -192,9 +183,6 @@ int rhashtable_init(struct rhashtable *ht, struct rhashtable_params *params); | |||
| 192 | void rhashtable_insert(struct rhashtable *ht, struct rhash_head *node); | 183 | void rhashtable_insert(struct rhashtable *ht, struct rhash_head *node); |
| 193 | bool rhashtable_remove(struct rhashtable *ht, struct rhash_head *node); | 184 | bool rhashtable_remove(struct rhashtable *ht, struct rhash_head *node); |
| 194 | 185 | ||
| 195 | bool rht_grow_above_75(const struct rhashtable *ht, size_t new_size); | ||
| 196 | bool rht_shrink_below_30(const struct rhashtable *ht, size_t new_size); | ||
| 197 | |||
| 198 | int rhashtable_expand(struct rhashtable *ht); | 186 | int rhashtable_expand(struct rhashtable *ht); |
| 199 | int rhashtable_shrink(struct rhashtable *ht); | 187 | int rhashtable_shrink(struct rhashtable *ht); |
| 200 | 188 | ||
