packet: switch kvzalloc to allocate memory
authorLi RongQing <lirongqing@baidu.com>
Mon, 13 Aug 2018 02:42:46 +0000 (10:42 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Aug 2018 16:21:05 +0000 (09:21 -0700)
commit71e41286203c017d24f041a7cd71abea7ca7b1e0
treea0b91dc171133fc0ecbe5c192f6793a6d3f913f8
parent0192e7d46c776f7f735560bfa4d40eac3fd700f9
packet: switch kvzalloc to allocate memory

The patches includes following change:

*Use modern kvzalloc()/kvfree() instead of custom allocations.

*Remove order argument for alloc_pg_vec, it can get from req.

*Remove order argument for free_pg_vec, free_pg_vec now uses
kvfree which does not need order argument.

*Remove pg_vec_order from struct packet_ring_buffer, no longer
need to save/restore 'order'

*Remove variable 'order' for packet_set_ring, it is now unused

Signed-off-by: Zhang Yu <zhangyu31@baidu.com>
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/packet/af_packet.c
net/packet/internal.h