net/mlx5e: Allocate virtually contiguous memory for VLANs list
Physical continuity is not necessary, and requested allocation size might be larger than PAGE_SIZE. Hence, use v-alloc/free API. Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Moshe Shemesh <moshe@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
88468311c0
commit
035e0dd573
@ -155,7 +155,7 @@ static int mlx5e_vport_context_update_vlans(struct mlx5e_priv *priv)
|
||||
list_size = max_list_size;
|
||||
}
|
||||
|
||||
vlans = kcalloc(list_size, sizeof(*vlans), GFP_KERNEL);
|
||||
vlans = kvcalloc(list_size, sizeof(*vlans), GFP_KERNEL);
|
||||
if (!vlans)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -171,7 +171,7 @@ static int mlx5e_vport_context_update_vlans(struct mlx5e_priv *priv)
|
||||
netdev_err(ndev, "Failed to modify vport vlans list err(%d)\n",
|
||||
err);
|
||||
|
||||
kfree(vlans);
|
||||
kvfree(vlans);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user