DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 7/7] bond: remove debug function to fix link with shared lib
Date: Tue,  3 Mar 2015 16:23:50 +0100	[thread overview]
Message-ID: <1425396230-13379-8-git-send-email-thomas.monjalon@6wind.com> (raw)
In-Reply-To: <1425396230-13379-1-git-send-email-thomas.monjalon@6wind.com>

The function print_client_stats was used in the example without being
clearly exported in the map file. So it breaks linking with shared library
when debug is enabled.
It's better to remove this function as it probably could be implemented
with statistics API.

Fixes: cc7e8ae84faa ("add example application for link bonding mode 6")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 examples/bond/main.c                   |  5 -----
 lib/librte_pmd_bond/rte_eth_bond_pmd.c | 13 -------------
 2 files changed, 18 deletions(-)

diff --git a/examples/bond/main.c b/examples/bond/main.c
index e4457f2..7da6bfc 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -650,7 +650,6 @@ cmdline_parse_inst_t cmd_quit = {
 	},
 };
 
-extern void print_client_stats(void);
 struct cmd_show_result {
 	cmdline_fixed_string_t show;
 };
@@ -680,10 +679,6 @@ static void cmd_show_parsed(__attribute__((unused)) void *parsed_result,
 			global_flag_stru_p->port_packets[1],
 			global_flag_stru_p->port_packets[2]);
 	rte_spinlock_unlock(&global_flag_stru_p->lock);
-
-#if defined(RTE_LIBRTE_BOND_DEBUG_ALB_L1) || defined(RTE_LIBRTE_BOND_DEBUG_ALB)
-	print_client_stats();
-#endif
 }
 
 cmdline_parse_token_string_t cmd_show_show =
diff --git a/lib/librte_pmd_bond/rte_eth_bond_pmd.c b/lib/librte_pmd_bond/rte_eth_bond_pmd.c
index 7dee5f2..af8113e 100644
--- a/lib/librte_pmd_bond/rte_eth_bond_pmd.c
+++ b/lib/librte_pmd_bond/rte_eth_bond_pmd.c
@@ -279,19 +279,6 @@ update_client_stats(uint32_t addr, uint8_t port, uint32_t *TXorRXindicator)
 
 }
 
-void print_client_stats(void);
-void print_client_stats(void)
-{
-	int i = 0;
-	char buf[MaxIPv4String];
-
-	for (; i < active_clients; i++)	{
-		ipv4_addr_to_dot(client_stats[i].ipv4_addr, buf, MaxIPv4String);
-		printf("port:%d client:%s RX:%d TX:%d\n", client_stats[i].port,	buf,
-				client_stats[i].ipv4_rx_packets,
-				client_stats[i].ipv4_tx_packets);
-	}
-}
 #ifdef RTE_LIBRTE_BOND_DEBUG_ALB
 #define MODE6_DEBUG(info, src_ip, dst_ip, eth_h, arp_op, port, burstnumber)	\
 		RTE_LOG(DEBUG, PMD, \
-- 
2.2.2

  parent reply	other threads:[~2015-03-03 15:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03 15:23 [dpdk-dev] [PATCH 0/7] fix build with debug enabled Thomas Monjalon
2015-03-03 15:23 ` [dpdk-dev] [PATCH 1/7] mempool: " Thomas Monjalon
2015-03-04  9:59   ` Olivier MATZ
2015-03-03 15:23 ` [dpdk-dev] [PATCH 2/7] fm10k: " Thomas Monjalon
2015-03-03 15:23 ` [dpdk-dev] [PATCH 3/7] virtio: fix build with mempool " Thomas Monjalon
2015-03-04  1:15   ` Ouyang, Changchun
2015-03-03 15:23 ` [dpdk-dev] [PATCH 4/7] virtio: fix build with " Thomas Monjalon
2015-03-04  1:17   ` Ouyang, Changchun
2015-03-03 15:23 ` [dpdk-dev] [PATCH 5/7] mlx4: fix build with mempool " Thomas Monjalon
2015-03-03 16:02   ` Adrien Mazarguil
2015-03-03 15:23 ` [dpdk-dev] [PATCH 6/7] mlx4: mute auto config in quiet mode Thomas Monjalon
2015-03-03 16:03   ` Adrien Mazarguil
2015-03-03 15:23 ` Thomas Monjalon [this message]
2015-03-04  9:49   ` [dpdk-dev] [PATCH 7/7] bond: remove debug function to fix link with shared lib Declan Doherty
2015-03-04 10:21 ` [dpdk-dev] [PATCH 0/7] fix build with debug enabled Thomas Monjalon

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=1425396230-13379-8-git-send-email-thomas.monjalon@6wind.com \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@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).