> -----Original Message-----
> From: Stephen Hemminger <[email protected]>
> Sent: Wednesday, January 6, 2021 11:55 PM
> To: Jiawei(Jonny) Wang <[email protected]>
> Cc: [email protected]; [email protected]; [email protected];
> [email protected]; Ori Kam <[email protected]>; Slava
> Ovsiienko <[email protected]>; NBU-Contact-Thomas Monjalon
> <[email protected]>; Raslan Darawsheh <[email protected]>;
> [email protected]
> Subject: Re: [dpdk-dev] [PATCH v6] app/testpmd: fix testpmd packets dump
> overlapping
> 
> On Wed,  6 Jan 2021 16:13:37 +0200
> Jiawei Wang <[email protected]> wrote:
> 
> > +print_ether_addr(const char *what, const struct rte_ether_addr
> *eth_addr,
> > +            char print_buf[], int buf_size, int *cur_len)
> 
> Use size_t instead of int for sizes?
> The length can never be negative?

The buf_size and cur_len always >0, buf_size means that the total size of 
string buffer, default is 8K,
the cur_len means that the current location of putting the new dump output, 
start from 0.

Thanks. 

Reply via email to