[spp] [PATCH] spp_vf: fix to generate debug information

Yasufumi Ogawa ogawa.yasufumi at lab.ntt.co.jp
Fri Dec 28 05:26:51 CET 2018


On 2018/12/27 18:04, x-fn-spp at sl.ntt-tx.co.jp wrote:
> From: Hideyuki Yamashita <yamashita.hideyuki at 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 at po.ntt-tx.co.jp>
> Signed-off-by: Naoki Takada <takada.naoki at 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



More information about the spp mailing list