* [spp] [PATCH] spp_vf: fix to generate debug information
@ 2018-12-27 9:04 x-fn-spp
2018-12-28 4:26 ` Yasufumi Ogawa
0 siblings, 1 reply; 2+ messages in thread
From: x-fn-spp @ 2018-12-27 9:04 UTC (permalink / raw)
To: ferruh.yigit, ogawa.yasufumi; +Cc: spp
From: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
This patch changes 'inline' declaration to 'static inline'or 'extern
inline' to be able to generate debug information.
Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
Signed-off-by: Naoki Takada <takada.naoki@lab.ntt.co.jp>
---
src/vf/common/command_dec.c | 4 ++--
src/vf/common/spp_port.c | 6 +++---
src/vf/common/string_buffer.c | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/vf/common/command_dec.c b/src/vf/common/command_dec.c
index 5b6ffcf..b328ca8 100644
--- a/src/vf/common/command_dec.c
+++ b/src/vf/common/command_dec.c
@@ -212,7 +212,7 @@ spp_convert_component_type(const char *type_str)
}
/* set decode error */
-inline int
+static inline int
set_decode_error(struct spp_command_decode_error *error,
const int error_code, const char *error_name)
{
@@ -225,7 +225,7 @@ set_decode_error(struct spp_command_decode_error *error,
}
/* set decode error */
-inline int
+static inline int
set_string_value_decode_error(struct spp_command_decode_error *error,
const char *value, const char *error_name)
{
diff --git a/src/vf/common/spp_port.c b/src/vf/common/spp_port.c
index d7d374e..fd76d79 100644
--- a/src/vf/common/spp_port.c
+++ b/src/vf/common/spp_port.c
@@ -57,7 +57,7 @@ spp_port_ability_init(void)
}
/* Get information of port ability. */
-inline void
+extern inline void
spp_port_ability_get_info(
int port_id, enum spp_port_rxtx rxtx,
struct spp_port_ability **info)
@@ -365,7 +365,7 @@ port_ability_each_operation(uint16_t port_id,
}
/* Wrapper function for rte_eth_rx_burst(). */
-inline uint16_t
+extern inline uint16_t
spp_eth_rx_burst(
uint16_t port_id, uint16_t queue_id __attribute__ ((unused)),
struct rte_mbuf **rx_pkts, const uint16_t nb_pkts)
@@ -387,7 +387,7 @@ spp_eth_rx_burst(
}
/* Wrapper function for rte_eth_tx_burst(). */
-inline uint16_t
+extern inline uint16_t
spp_eth_tx_burst(
uint16_t port_id, uint16_t queue_id __attribute__ ((unused)),
struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
diff --git a/src/vf/common/string_buffer.c b/src/vf/common/string_buffer.c
index acf0f81..768dd3a 100644
--- a/src/vf/common/string_buffer.c
+++ b/src/vf/common/string_buffer.c
@@ -13,14 +13,14 @@
#define RTE_LOGTYPE_SPP_STRING_BUFF RTE_LOGTYPE_USER1
/* get message buffer capacity */
-inline size_t
+static inline size_t
strbuf_get_capacity(const char *strbuf)
{
return *((const size_t *)(strbuf - sizeof(size_t)));
}
/* re-allocate message buffer */
-inline char*
+static inline char*
strbuf_reallocate(char *strbuf, size_t required_len)
{
size_t new_cap = strbuf_get_capacity(strbuf) * 2;
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [spp] [PATCH] spp_vf: fix to generate debug information
2018-12-27 9:04 [spp] [PATCH] spp_vf: fix to generate debug information x-fn-spp
@ 2018-12-28 4:26 ` Yasufumi Ogawa
0 siblings, 0 replies; 2+ messages in thread
From: Yasufumi Ogawa @ 2018-12-28 4:26 UTC (permalink / raw)
To: x-fn-spp, spp; +Cc: ferruh.yigit
On 2018/12/27 18:04, x-fn-spp@sl.ntt-tx.co.jp wrote:
> From: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
>
> This patch changes 'inline' declaration to 'static inline'or 'extern
> inline' to be able to generate debug information.
Thank you for your contribution, applied.
>
> Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
> Signed-off-by: Naoki Takada <takada.naoki@lab.ntt.co.jp>
> ---
> src/vf/common/command_dec.c | 4 ++--
> src/vf/common/spp_port.c | 6 +++---
> src/vf/common/string_buffer.c | 4 ++--
> 3 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/src/vf/common/command_dec.c b/src/vf/common/command_dec.c
> index 5b6ffcf..b328ca8 100644
> --- a/src/vf/common/command_dec.c
> +++ b/src/vf/common/command_dec.c
> @@ -212,7 +212,7 @@ spp_convert_component_type(const char *type_str)
> }
>
> /* set decode error */
> -inline int
> +static inline int
> set_decode_error(struct spp_command_decode_error *error,
> const int error_code, const char *error_name)
> {
> @@ -225,7 +225,7 @@ set_decode_error(struct spp_command_decode_error *error,
> }
>
> /* set decode error */
> -inline int
> +static inline int
> set_string_value_decode_error(struct spp_command_decode_error *error,
> const char *value, const char *error_name)
> {
> diff --git a/src/vf/common/spp_port.c b/src/vf/common/spp_port.c
> index d7d374e..fd76d79 100644
> --- a/src/vf/common/spp_port.c
> +++ b/src/vf/common/spp_port.c
> @@ -57,7 +57,7 @@ spp_port_ability_init(void)
> }
>
> /* Get information of port ability. */
> -inline void
> +extern inline void
> spp_port_ability_get_info(
> int port_id, enum spp_port_rxtx rxtx,
> struct spp_port_ability **info)
> @@ -365,7 +365,7 @@ port_ability_each_operation(uint16_t port_id,
> }
>
> /* Wrapper function for rte_eth_rx_burst(). */
> -inline uint16_t
> +extern inline uint16_t
> spp_eth_rx_burst(
> uint16_t port_id, uint16_t queue_id __attribute__ ((unused)),
> struct rte_mbuf **rx_pkts, const uint16_t nb_pkts)
> @@ -387,7 +387,7 @@ spp_eth_rx_burst(
> }
>
> /* Wrapper function for rte_eth_tx_burst(). */
> -inline uint16_t
> +extern inline uint16_t
> spp_eth_tx_burst(
> uint16_t port_id, uint16_t queue_id __attribute__ ((unused)),
> struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
> diff --git a/src/vf/common/string_buffer.c b/src/vf/common/string_buffer.c
> index acf0f81..768dd3a 100644
> --- a/src/vf/common/string_buffer.c
> +++ b/src/vf/common/string_buffer.c
> @@ -13,14 +13,14 @@
> #define RTE_LOGTYPE_SPP_STRING_BUFF RTE_LOGTYPE_USER1
>
> /* get message buffer capacity */
> -inline size_t
> +static inline size_t
> strbuf_get_capacity(const char *strbuf)
> {
> return *((const size_t *)(strbuf - sizeof(size_t)));
> }
>
> /* re-allocate message buffer */
> -inline char*
> +static inline char*
> strbuf_reallocate(char *strbuf, size_t required_len)
> {
> size_t new_cap = strbuf_get_capacity(strbuf) * 2;
>
--
Yasufumi Ogawa
NTT Network Service Systems Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-28 4:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-27 9:04 [spp] [PATCH] spp_vf: fix to generate debug information x-fn-spp
2018-12-28 4:26 ` Yasufumi Ogawa
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).