net/mlx5e: Use kzalloc() in mlx5e_accel_fs_tcp_create()
'accel_tcp' is allocted by kvzalloc() now, which is a small chunk. Use kzalloc() directly instead of kvzalloc(). Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
4238654ce1
commit
96c31b5b2c
@ -365,7 +365,7 @@ void mlx5e_accel_fs_tcp_destroy(struct mlx5e_flow_steering *fs)
|
||||
for (i = 0; i < ACCEL_FS_TCP_NUM_TYPES; i++)
|
||||
accel_fs_tcp_destroy_table(fs, i);
|
||||
|
||||
kvfree(accel_tcp);
|
||||
kfree(accel_tcp);
|
||||
mlx5e_fs_set_accel_tcp(fs, NULL);
|
||||
}
|
||||
|
||||
@ -377,7 +377,7 @@ int mlx5e_accel_fs_tcp_create(struct mlx5e_flow_steering *fs)
|
||||
if (!MLX5_CAP_FLOWTABLE_NIC_RX(mlx5e_fs_get_mdev(fs), ft_field_support.outer_ip_version))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
accel_tcp = kvzalloc(sizeof(*accel_tcp), GFP_KERNEL);
|
||||
accel_tcp = kzalloc(sizeof(*accel_tcp), GFP_KERNEL);
|
||||
if (!accel_tcp)
|
||||
return -ENOMEM;
|
||||
mlx5e_fs_set_accel_tcp(fs, accel_tcp);
|
||||
@ -397,7 +397,7 @@ int mlx5e_accel_fs_tcp_create(struct mlx5e_flow_steering *fs)
|
||||
err_destroy_tables:
|
||||
while (--i >= 0)
|
||||
accel_fs_tcp_destroy_table(fs, i);
|
||||
kvfree(accel_tcp);
|
||||
kfree(accel_tcp);
|
||||
mlx5e_fs_set_accel_tcp(fs, NULL);
|
||||
return err;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user