Skip to content

Commit

Permalink
net: Fix GRO_HASH_BUCKETS assertion.
Browse files Browse the repository at this point in the history
FIELD_SIZEOF() is in bytes, but we want bits.

Fixes: d9f37d0 ("net: convert gro_count to bitmask")
Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jul 17, 2018
1 parent 301f935 commit ccdb517
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -9282,7 +9282,7 @@ static struct hlist_head * __net_init netdev_create_hash(void)
static int __net_init netdev_init(struct net *net)
{
BUILD_BUG_ON(GRO_HASH_BUCKETS >
FIELD_SIZEOF(struct napi_struct, gro_bitmask));
8 * FIELD_SIZEOF(struct napi_struct, gro_bitmask));

if (net != &init_net)
INIT_LIST_HEAD(&net->dev_base_head);
Expand Down

0 comments on commit ccdb517

Please sign in to comment.