From: Ivan Vecera <ivecera@redhat.com>
To: netdev@vger.kernel.org
Cc: poros@redhat.com, mschmidt@redhat.com,
jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com,
davem@davemloft.net, kuba@kernel.org, edumazet@google.com,
pabeni@redhat.com, intel-wired-lan@lists.osuosl.org,
linux-kernel@vger.kernel.org, przemyslaw.kitszel@intel.com
Subject: [PATCH net-next v2 6/9] i40e: Move memory allocation structures to i40e_alloc.h
Date: Wed, 27 Sep 2023 10:31:32 +0200 [thread overview]
Message-ID: <20230927083135.3237206-7-ivecera@redhat.com> (raw)
In-Reply-To: <20230927083135.3237206-1-ivecera@redhat.com>
Structures i40e_dma_mem & i40e_virt_mem are defined i40e_osdep.h while
memory allocation functions that use them are declared in i40e_alloc.h
Move them there.
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
---
drivers/net/ethernet/intel/i40e/i40e_adminq.h | 1 +
drivers/net/ethernet/intel/i40e/i40e_alloc.h | 14 ++++++++++++++
drivers/net/ethernet/intel/i40e/i40e_osdep.h | 12 ------------
3 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.h b/drivers/net/ethernet/intel/i40e/i40e_adminq.h
index 267f2e0a21ce..1c3d2bc5c3f7 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.h
@@ -4,6 +4,7 @@
#ifndef _I40E_ADMINQ_H_
#define _I40E_ADMINQ_H_
+#include "i40e_alloc.h"
#include "i40e_osdep.h"
#include "i40e_adminq_cmd.h"
diff --git a/drivers/net/ethernet/intel/i40e/i40e_alloc.h b/drivers/net/ethernet/intel/i40e/i40e_alloc.h
index 4b2d8da048c6..e0dde326255d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_alloc.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_alloc.h
@@ -4,8 +4,22 @@
#ifndef _I40E_ALLOC_H_
#define _I40E_ALLOC_H_
+#include <linux/types.h>
+
struct i40e_hw;
+/* memory allocation tracking */
+struct i40e_dma_mem {
+ void *va;
+ dma_addr_t pa;
+ u32 size;
+};
+
+struct i40e_virt_mem {
+ void *va;
+ u32 size;
+};
+
/* prototype for functions used for dynamic memory allocation */
int i40e_allocate_dma_mem(struct i40e_hw *hw,
struct i40e_dma_mem *mem,
diff --git a/drivers/net/ethernet/intel/i40e/i40e_osdep.h b/drivers/net/ethernet/intel/i40e/i40e_osdep.h
index 70cac3bb31ec..fd18895cfb56 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_osdep.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_osdep.h
@@ -29,18 +29,6 @@ struct device *i40e_hw_to_dev(struct i40e_hw *hw);
#define rd64(a, reg) readq((a)->hw_addr + (reg))
#define i40e_flush(a) readl((a)->hw_addr + I40E_GLGEN_STAT)
-/* memory allocation tracking */
-struct i40e_dma_mem {
- void *va;
- dma_addr_t pa;
- u32 size;
-};
-
-struct i40e_virt_mem {
- void *va;
- u32 size;
-};
-
#define i40e_debug(h, m, s, ...) \
do { \
if (((m) & (h)->debug_mask)) \
--
2.41.0
next prev parent reply other threads:[~2023-09-27 8:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-27 8:31 [PATCH net-next v2 0/9] i40e: House-keeping and clean-up Ivan Vecera
2023-09-27 8:31 ` [PATCH net-next v2 1/9] i40e: Remove back pointer from i40e_hw structure Ivan Vecera
2023-10-05 8:08 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2023-09-27 8:31 ` [PATCH net-next v2 2/9] i40e: Move I40E_MASK macro to i40e_register.h Ivan Vecera
2023-10-05 8:10 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2023-09-27 8:31 ` [PATCH net-next v2 3/9] i40e: Refactor I40E_MDIO_CLAUSE* macros Ivan Vecera
2023-10-05 8:12 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2023-09-27 8:31 ` [PATCH net-next v2 4/9] virtchnl: Add header dependencies Ivan Vecera
2023-09-27 8:31 ` [PATCH net-next v2 5/9] i40e: Simplify memory allocation functions Ivan Vecera
2023-10-05 8:14 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2023-09-27 8:31 ` Ivan Vecera [this message]
2023-10-05 8:16 ` [Intel-wired-lan] [PATCH net-next v2 6/9] i40e: Move memory allocation structures to i40e_alloc.h Pucha, HimasekharX Reddy
2023-09-27 8:31 ` [PATCH net-next v2 7/9] i40e: Split i40e_osdep.h Ivan Vecera
2023-10-05 8:18 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2023-09-27 8:31 ` [PATCH net-next v2 8/9] i40e: Remove circular header dependencies and fix headers Ivan Vecera
2023-10-05 8:22 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2023-09-27 8:31 ` [PATCH net-next v2 9/9] i40e: Move DDP specific macros and structures to i40e_ddp.c Ivan Vecera
2023-10-05 8:23 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2023-09-27 8:53 ` [PATCH net-next v2 0/9] i40e: House-keeping and clean-up Przemek Kitszel
2023-09-28 22:12 ` Jesse Brandeburg
2023-10-04 19:17 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230927083135.3237206-7-ivecera@redhat.com \
--to=ivecera@redhat.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mschmidt@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=poros@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).