> -----Original Message-----
> From: Ivan Dyukov <[email protected]>
> Sent: Friday, July 10, 2020 8:02 AM
> To: [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; Yigit, Ferruh
> <[email protected]>; [email protected]; Zhao1, Wei
> <[email protected]>; Guo, Jia <[email protected]>; Xing, Beilei
> <[email protected]>; Yang, Qiming <[email protected]>; Lu,
> Wenzhuo <[email protected]>; [email protected];
> [email protected]; Chautru, Nicolas
> <[email protected]>; Richardson, Bruce
> <[email protected]>; Ananyev, Konstantin
> <[email protected]>; Dumitrescu, Cristian
> <[email protected]>; Nicolau, Radu <[email protected]>;
> [email protected]; Doherty, Declan <[email protected]>;
> [email protected]; [email protected]; [email protected];
> [email protected]; Hunt, David <[email protected]>; Burakov,
> Anatoly <[email protected]>; Li, Xiaoyun <[email protected]>;
> Wu, Jingjing <[email protected]>; Mcnamara, John
> <[email protected]>; Singh, Jasvinder
> <[email protected]>; Marohn, Byron <[email protected]>;
> Wang, Yipeng1 <[email protected]>
> Subject: [PATCH v7 21/25] examples/ntb: new link status print format
>
> Add usage of rte_eth_link_strf function to example applications
>
> Signed-off-by: Ivan Dyukov <[email protected]>
> ---
> examples/ntb/ntb_fwd.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c index
> eba8ebf9f..84fe374c4 100644
> --- a/examples/ntb/ntb_fwd.c
> +++ b/examples/ntb/ntb_fwd.c
> @@ -729,6 +729,7 @@ start_pkt_fwd(void)
> struct rte_eth_link eth_link;
> uint32_t lcore_id;
> int ret, i;
> + char link_status_text[60];
>
> ret = ntb_fwd_config_setup();
> if (ret < 0) {
> @@ -747,11 +748,10 @@ start_pkt_fwd(void)
> return;
> }
> if (eth_link.link_status) {
> - printf("Eth%u Link Up. Speed %u Mbps -
> %s\n",
> - eth_port_id, eth_link.link_speed,
> - (eth_link.link_duplex ==
> - ETH_LINK_FULL_DUPLEX) ?
> - ("full-duplex") : ("half-duplex"));
> + rte_eth_link_strf(link_status_text, 60, NULL,
> + &link);
s/link/eth_link/
.../examples/ntb/ntb_fwd.c:752:11: error: passing argument 4 of
‘rte_eth_link_strf’ from incompatible pointer type
[-Werror=incompatible-pointer-types]
752 | &link);
| ^~~~~
| |
| int (*)(const char *, const char *)
> + printf("Eth%u %s", eth_port_id,
> + link_status_text);
> break;
> }
> }
> --
> 2.17.1