Soft Patch Panel
 help / color / mirror / Atom feed
* [spp] [PATCH] spp_vf: fix build
@ 2018-01-22 14:25 Ferruh Yigit
  2018-01-30  3:55 ` Yasufumi Ogawa
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2018-01-22 14:25 UTC (permalink / raw)
  To: Yasufumi Ogawa; +Cc: spp, Ferruh Yigit, nakamura.hioryuki

build error:
...spp/src/vf/classifier_mac.c:314:5:
   error: format specifies type 'unsigned short' but the argument
          has type 'int' [-Werror,-Wformat]
	classified_data->num_pkt - n_tx, classified_data->port);
	^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...build/include/rte_log.h:316:32:
   note: expanded from macro 'RTE_LOG'
	 RTE_LOGTYPE_ ## t, # t ": " __VA_ARGS__)
				     ^~~~~~~~~~~

Looks like caused by integer promotion, to fix cast variable
explicityly to uint16_t.

Fixes: 11512d8b6c28 ("spp_vf: add vf functions")
Cc: nakamura.hioryuki@po.ntt-tx.co.jp

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---

Cc: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 src/vf/classifier_mac.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/vf/classifier_mac.c b/src/vf/classifier_mac.c
index 2e502a5..760d597 100644
--- a/src/vf/classifier_mac.c
+++ b/src/vf/classifier_mac.c
@@ -311,7 +311,8 @@ transmit_packet(struct classified_data *classified_data)
 			rte_pktmbuf_free(classified_data->pkts[i]);
 		RTE_LOG(DEBUG, SPP_CLASSIFIER_MAC,
 				"drop packets(tx). num=%hu, dpdk_port=%hu\n",
-				classified_data->num_pkt - n_tx, classified_data->port);
+				(uint16_t)(classified_data->num_pkt - n_tx),
+				classified_data->port);
 	}
 
 	classified_data->num_pkt = 0;
-- 
2.14.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [spp] [PATCH] spp_vf: fix build
  2018-01-22 14:25 [spp] [PATCH] spp_vf: fix build Ferruh Yigit
@ 2018-01-30  3:55 ` Yasufumi Ogawa
  2018-02-01 12:01   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Yasufumi Ogawa @ 2018-01-30  3:55 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: spp, nakamura.hioryuki

On 2018/01/22 23:25, Ferruh Yigit wrote:
> build error:
> ...spp/src/vf/classifier_mac.c:314:5:
>     error: format specifies type 'unsigned short' but the argument
>            has type 'int' [-Werror,-Wformat]
> 	classified_data->num_pkt - n_tx, classified_data->port);
> 	^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ...build/include/rte_log.h:316:32:
>     note: expanded from macro 'RTE_LOG'
> 	 RTE_LOGTYPE_ ## t, # t ": " __VA_ARGS__)
> 				     ^~~~~~~~~~~
> 
> Looks like caused by integer promotion, to fix cast variable
> explicityly to uint16_t.

Ferruh,

Thanks for your contribution. Although I compiled Hiroyuki's patch with 
DPDK 17.11 release (tagged as v17.11) and there is no error, but error 
is occured after replacing DPDK latest.

...spp/src/vf/spp_vf.c:931:28: error: ‘RTE_LOG_LEVEL’ undeclared (first 
use in this function)
    rte_log_set_global_level(RTE_LOG_LEVEL);

...spp/src/vf/spp_vf.c:931:28: note: each undeclared identifier is 
reported only once for each function it appears in
/home/dpdk1711/dpdk-home/dpdk/mk/internal/rte.compile-pre.mk:114: ...

It is different from your error, but caused by rte_log. I think it is 
possibly because of a change of rte_log after 17.11 release. In any 
case, I think your change should be merged.

Acked-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

Thanks,
Yasufumi

> 
> Fixes: 11512d8b6c28 ("spp_vf: add vf functions")
> Cc: nakamura.hioryuki@po.ntt-tx.co.jp
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> 
> Cc: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
> ---
>   src/vf/classifier_mac.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/vf/classifier_mac.c b/src/vf/classifier_mac.c
> index 2e502a5..760d597 100644
> --- a/src/vf/classifier_mac.c
> +++ b/src/vf/classifier_mac.c
> @@ -311,7 +311,8 @@ transmit_packet(struct classified_data *classified_data)
>   			rte_pktmbuf_free(classified_data->pkts[i]);
>   		RTE_LOG(DEBUG, SPP_CLASSIFIER_MAC,
>   				"drop packets(tx). num=%hu, dpdk_port=%hu\n",
> -				classified_data->num_pkt - n_tx, classified_data->port);
> +				(uint16_t)(classified_data->num_pkt - n_tx),
> +				classified_data->port);
>   	}
>   
>   	classified_data->num_pkt = 0;
> 


-- 
Yasufumi Ogawa
NTT Network Service Systems Labs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [spp] [PATCH] spp_vf: fix build
  2018-01-30  3:55 ` Yasufumi Ogawa
@ 2018-02-01 12:01   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2018-02-01 12:01 UTC (permalink / raw)
  To: Yasufumi Ogawa; +Cc: spp, nakamura.hioryuki

On 1/30/2018 3:55 AM, Yasufumi Ogawa wrote:
> On 2018/01/22 23:25, Ferruh Yigit wrote:
>> build error:
>> ...spp/src/vf/classifier_mac.c:314:5:
>>     error: format specifies type 'unsigned short' but the argument
>>            has type 'int' [-Werror,-Wformat]
>> 	classified_data->num_pkt - n_tx, classified_data->port);
>> 	^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> ...build/include/rte_log.h:316:32:
>>     note: expanded from macro 'RTE_LOG'
>> 	 RTE_LOGTYPE_ ## t, # t ": " __VA_ARGS__)
>> 				     ^~~~~~~~~~~
>>
>> Looks like caused by integer promotion, to fix cast variable
>> explicityly to uint16_t.
> 
> Ferruh,
> 
> Thanks for your contribution. Although I compiled Hiroyuki's patch with 
> DPDK 17.11 release (tagged as v17.11) and there is no error, but error 
> is occured after replacing DPDK latest.
> 
> ...spp/src/vf/spp_vf.c:931:28: error: ‘RTE_LOG_LEVEL’ undeclared (first 
> use in this function)
>     rte_log_set_global_level(RTE_LOG_LEVEL);
> 
> ...spp/src/vf/spp_vf.c:931:28: note: each undeclared identifier is 
> reported only once for each function it appears in
> /home/dpdk1711/dpdk-home/dpdk/mk/internal/rte.compile-pre.mk:114: ...
> 
> It is different from your error, but caused by rte_log. I think it is 
> possibly because of a change of rte_log after 17.11 release. In any 
> case, I think your change should be merged.
> 
> Acked-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-01 12:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-22 14:25 [spp] [PATCH] spp_vf: fix build Ferruh Yigit
2018-01-30  3:55 ` Yasufumi Ogawa
2018-02-01 12:01   ` Ferruh Yigit

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).