nvethernet: support for page pool

Add support for page pool and
enable it when CONFIG_PAGE_POOL
config got enabled.

Bug 200686236

Change-Id: I08efd68106182f65eac4e24b9f55baa22ce5968b
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2532360
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
This commit is contained in:
Bhadram Varka
2020-12-29 21:14:54 +05:30
committed by Revanth Kumar Uppala
parent b55cba3cf7
commit a79b1f58c0
3 changed files with 150 additions and 13 deletions

View File

@@ -49,6 +49,12 @@
#else
#include <soc/tegra/fuse.h>
#endif
#if IS_ENABLED(CONFIG_PAGE_POOL)
#if (KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE)
#include <net/page_pool.h>
#define ETHER_PAGE_POOL
#endif
#endif
#include <osi_core.h>
#include <osi_dma.h>
#include <mmc.h>
@@ -446,6 +452,10 @@ struct ether_priv_data {
struct ether_ivc_ctxt ictxt;
/** VM channel info data associated with VM IRQ */
struct ether_vm_irq_data *vm_irq_data;
#ifdef ETHER_PAGE_POOL
/** Pointer to page pool */
struct page_pool *page_pool;
#endif
#ifdef CONFIG_DEBUG_FS
/** Debug fs directory pointer */
struct dentry *dbgfs_dir;