]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita307f75ab21c74f5939361ee0c0d08aa7aacc961
treea0b91dc171133fc0ecbe5c192f6793a6d3f913f8
parent6c4813d7004ed9c8611b0a1f46d197784658f94d
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