page_pool: introduce page_pool_free and use in mlx5
authorJesper Dangaard Brouer <brouer@redhat.com>
Tue, 18 Jun 2019 13:05:37 +0000 (15:05 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Jun 2019 15:23:13 +0000 (11:23 -0400)
commite54cfd7e1745e52eb6c67ee9c77aefb8e4666a88
treebaf9b88f268bb9c2d947b008f3687b8b073ba6f5
parentcbf3351067cea1a58862b2c7667b479a358a2071
page_pool: introduce page_pool_free and use in mlx5

In case driver fails to register the page_pool with XDP return API (via
xdp_rxq_info_reg_mem_model()), then the driver can free the page_pool
resources more directly than calling page_pool_destroy(), which does a
unnecessarily RCU free procedure.

This patch is preparing for removing page_pool_destroy(), from driver
invocation.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
include/net/page_pool.h
net/core/page_pool.c