> -----Original Message-----
> From: Stephen Hemminger <step...@networkplumber.org>
> Sent: Wednesday, January 6, 2021 11:55 PM
> To: Jiawei(Jonny) Wang <jiaw...@nvidia.com>
> Cc: ferruh.yi...@intel.com; wenzhuo...@intel.com; beilei.x...@intel.com;
> bernard.iremon...@intel.com; Ori Kam <or...@nvidia.com>; Slava
> Ovsiienko <viachesl...@nvidia.com>; NBU-Contact-Thomas Monjalon
> <tho...@monjalon.net>; Raslan Darawsheh <rasl...@nvidia.com>;
> dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v6] app/testpmd: fix testpmd packets dump
> overlapping
> 
> On Wed,  6 Jan 2021 16:13:37 +0200
> Jiawei Wang <jiaw...@nvidia.com> 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