Re: [PATCH][net-next] packet: switch kvzalloc to allocate memory

2018-08-10 Thread David Miller
From: Li RongQing Date: Fri, 10 Aug 2018 18:00:00 +0800 > @@ -4275,7 +4259,7 @@ static int packet_set_ring(struct sock *sk, union > tpacket_req_u *req_u, > > err = -ENOMEM; > order = get_order(req->tp_block_size); > - pg_vec = alloc_pg_vec(req, order);

[PATCH][net-next] packet: switch kvzalloc to allocate memory

2018-08-10 Thread Li RongQing
Use modern kvzalloc()/kvfree() instead of custom allocations. And remove order argument for free_pg_vec and alloc_pg_vec, this argument is useless to kvfree, or can get from req. Signed-off-by: Zhang Yu Signed-off-by: Li RongQing --- net/packet/af_packet.c | 40