DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com, Chaoyong He <chaoyong.he@corigine.com>
Subject: [PATCH 12/13] net/nfp: improve modularazation of CPP bridge module
Date: Wed, 20 Sep 2023 19:34:53 +0800	[thread overview]
Message-ID: <20230920113454.739356-13-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20230920113454.739356-1-chaoyong.he@corigine.com>

Try to keep the API small by move the logic which need not expose from
header file to source file verbatim.
Also remove the unneeded header file include statement of source file.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
---
 drivers/net/nfp/nfp_cpp_bridge.c | 14 ++++++++++----
 drivers/net/nfp/nfp_cpp_bridge.h |  8 --------
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/net/nfp/nfp_cpp_bridge.c b/drivers/net/nfp/nfp_cpp_bridge.c
index a9998f3c08..ed9a946b0c 100644
--- a/drivers/net/nfp/nfp_cpp_bridge.c
+++ b/drivers/net/nfp/nfp_cpp_bridge.c
@@ -5,17 +5,23 @@
  * Small portions derived from code Copyright(c) 2010-2015 Intel Corporation.
  */
 
+#include "nfp_cpp_bridge.h"
+
 #include <unistd.h>
 #include <sys/ioctl.h>
 
 #include <rte_service_component.h>
 
 #include "nfpcore/nfp_cpp.h"
-#include "nfpcore/nfp_mip.h"
-#include "nfpcore/nfp_nsp.h"
-
 #include "nfp_logs.h"
-#include "nfp_cpp_bridge.h"
+
+#define NFP_CPP_MEMIO_BOUNDARY    (1 << 20)
+#define NFP_BRIDGE_OP_READ        20
+#define NFP_BRIDGE_OP_WRITE       30
+#define NFP_BRIDGE_OP_IOCTL       40
+
+#define NFP_IOCTL 'n'
+#define NFP_IOCTL_CPP_IDENTIFICATION _IOW(NFP_IOCTL, 0x8f, uint32_t)
 
 /* Prototypes */
 static int nfp_cpp_bridge_serve_write(int sockfd, struct nfp_cpp *cpp);
diff --git a/drivers/net/nfp/nfp_cpp_bridge.h b/drivers/net/nfp/nfp_cpp_bridge.h
index 85289e158b..e6a957a090 100644
--- a/drivers/net/nfp/nfp_cpp_bridge.h
+++ b/drivers/net/nfp/nfp_cpp_bridge.h
@@ -10,14 +10,6 @@
 
 #include "nfp_common.h"
 
-#define NFP_CPP_MEMIO_BOUNDARY	(1 << 20)
-#define NFP_BRIDGE_OP_READ	20
-#define NFP_BRIDGE_OP_WRITE	30
-#define NFP_BRIDGE_OP_IOCTL	40
-
-#define NFP_IOCTL 'n'
-#define NFP_IOCTL_CPP_IDENTIFICATION _IOW(NFP_IOCTL, 0x8f, uint32_t)
-
 int nfp_enable_cpp_service(struct nfp_pf_dev *pf_dev);
 int nfp_map_service(uint32_t service_id);
 
-- 
2.39.1


  parent reply	other threads:[~2023-09-20 11:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-20 11:34 [PATCH 00/13] improve the modularization of NFP PMD Chaoyong He
2023-09-20 11:34 ` [PATCH 01/13] net/nfp: make sure header file is self-containing Chaoyong He
2023-09-20 11:34 ` [PATCH 02/13] net/nfp: improve modularazation of rxtx module Chaoyong He
2023-09-20 11:34 ` [PATCH 03/13] net/nfp: improve modularazation of nfd3 module Chaoyong He
2023-09-20 11:34 ` [PATCH 04/13] net/nfp: improve modularazation of nfdk module Chaoyong He
2023-09-20 11:34 ` [PATCH 05/13] net/nfp: improve modularazation of common module Chaoyong He
2023-09-20 11:34 ` [PATCH 06/13] net/nfp: improve modularazation of flower module Chaoyong He
2023-09-20 11:34 ` [PATCH 07/13] net/nfp: improve modularazation of flower representor module Chaoyong He
2023-09-20 11:34 ` [PATCH 08/13] net/nfp: improve modularazation of flower ctrl module Chaoyong He
2023-09-20 11:34 ` [PATCH 09/13] net/nfp: improve modularazation of flower cmsg module Chaoyong He
2023-09-20 11:34 ` [PATCH 10/13] net/nfp: improve modularazation of flow module Chaoyong He
2023-09-20 11:34 ` [PATCH 11/13] net/nfp: improve modularazation of meter module Chaoyong He
2023-09-20 11:34 ` Chaoyong He [this message]
2023-09-20 11:34 ` [PATCH 13/13] net/nfp: cleanup the include statement of PMD Chaoyong He
2023-09-22 11:23 ` [PATCH 00/13] improve the modularization of NFP PMD Ferruh Yigit
2023-09-25  1:34   ` Chaoyong He

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=20230920113454.739356-13-chaoyong.he@corigine.com \
    --to=chaoyong.he@corigine.com \
    --cc=dev@dpdk.org \
    --cc=oss-drivers@corigine.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).