Soft Patch Panel
 help / color / mirror / Atom feed
From: ogawa.yasufumi@lab.ntt.co.jp
To: ferruh.yigit@intel.com, spp@dpdk.org, ogawa.yasufumi@lab.ntt.co.jp
Subject: [spp] [PATCH 4/6] spp_vf/common: change name of func of adding port
Date: Tue, 15 Jan 2019 12:28:36 +0900	[thread overview]
Message-ID: <1547522918-10223-5-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> (raw)
In-Reply-To: <1547522918-10223-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp>

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

To avoid to be same as the name of common library, change add_ring_pmd()
and add_vhost_pmd() to have prefix.

* spp_vf_add_ring_pmd()
* spp_vf_add_vhost_pmd()

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 src/vf/common/spp_proc.c | 11 ++++++++---
 src/vf/common/spp_proc.h |  6 +++---
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/vf/common/spp_proc.c b/src/vf/common/spp_proc.c
index abbd5d5..9a118bd 100644
--- a/src/vf/common/spp_proc.c
+++ b/src/vf/common/spp_proc.c
@@ -14,6 +14,9 @@
 #include "spp_proc.h"
 #include "spp_port.h"
 
+#include "shared/secondary/add_port.h"
+#include "shared/secondary/utils.h"
+
 #ifdef SPP_VF_MODULE
 #include "../spp_forward.h"
 #include "../classifier_mac.h"
@@ -22,6 +25,8 @@
 #include "../../mirror/spp_mirror.h"
 #endif /* SPP_MIRROR_MODULE */
 
+#define RTE_LOGTYPE_APP RTE_LOGTYPE_USER1
+
 /* Manage data to addoress */
 struct manage_data_addr_info {
 	struct startup_param	  *p_startup_param;
@@ -71,7 +76,7 @@ dump_buff(const char *name, const void *addr, const size_t size)
 
 /* generation of the ring port */
 int
-add_ring_pmd(int ring_id)
+spp_vf_add_ring_pmd(int ring_id)
 {
 	struct rte_ring *ring;
 	int ring_port_id;
@@ -93,7 +98,7 @@ add_ring_pmd(int ring_id)
 
 /* generation of the vhost port */
 int
-add_vhost_pmd(int index, int client)
+spp_vf_add_vhost_pmd(int index, int client)
 {
 	struct rte_eth_conf port_conf = {
 		.rxmode = { .max_rx_pkt_len = ETHER_MAX_LEN }
@@ -815,7 +820,7 @@ flush_port(void)
 	for (cnt = 0; cnt < RTE_MAX_ETHPORTS; cnt++) {
 		port = &p_iface_info->vhost[cnt];
 		if ((port->iface_type != UNDEF) && (port->dpdk_port < 0)) {
-			ret = add_vhost_pmd(port->iface_no,
+			ret = spp_vf_add_vhost_pmd(port->iface_no,
 				g_mng_data_addr.p_startup_param->vhost_client);
 			if (ret < 0)
 				return SPP_RET_NG;
diff --git a/src/vf/common/spp_proc.h b/src/vf/common/spp_proc.h
index 4001c21..2fc8cc2 100644
--- a/src/vf/common/spp_proc.h
+++ b/src/vf/common/spp_proc.h
@@ -13,7 +13,7 @@
  */
 
 #include <netinet/in.h>
-#include "common.h"
+#include "shared/common.h"
 
 /**
  * TODO(Yamashita) change type names.
@@ -355,7 +355,7 @@ void dump_buff(const char *name, const void *addr, const size_t size);
  * @retval 0~   ring_port_id.
  * @retval -1   failed.
  */
-int add_ring_pmd(int ring_id);
+int spp_vf_add_ring_pmd(int ring_id);
 
 /**
  * added vhost_pmd
@@ -368,7 +368,7 @@ int add_ring_pmd(int ring_id);
  * @retval 0~   vhost_port_id.
  * @retval -1   failed.
  */
-int add_vhost_pmd(int index, int client);
+int spp_vf_add_vhost_pmd(int index, int client);
 
 /**
  * Get core status
-- 
2.17.1

  parent reply	other threads:[~2019-01-15  3:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-15  3:28 [spp] [PATCH 0/6] Refactor for including headers ogawa.yasufumi
2019-01-15  3:28 ` [spp] [PATCH 1/6] shared: fix include error of add_port libs ogawa.yasufumi
2019-01-15  3:28 ` [spp] [PATCH 2/6] spp_nfv: update to use common app_port libs ogawa.yasufumi
2019-01-15  3:28 ` [spp] [PATCH 3/6] spp_vf/common: add RTE_LOGTYPE in each of files ogawa.yasufumi
2019-01-15  3:28 ` ogawa.yasufumi [this message]
2019-01-15  3:28 ` [spp] [PATCH 5/6] spp_vf: update makefile ogawa.yasufumi
2019-01-15  3:28 ` [spp] [PATCH 6/6] spp_mirror: " ogawa.yasufumi

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=1547522918-10223-5-git-send-email-ogawa.yasufumi@lab.ntt.co.jp \
    --to=ogawa.yasufumi@lab.ntt.co.jp \
    --cc=ferruh.yigit@intel.com \
    --cc=spp@dpdk.org \
    /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).