ntact-Thomas Monjalon
> ; Raslan Darawsheh ;
> 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 wrote:
>
> > + int buf_size = MAX_STRING_LEN;
> > + char p
ntact-Thomas Monjalon
> ; Raslan Darawsheh ;
> 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 wrote:
>
> > +print_ether_addr(const char *what, const struct rte_ethe
On Wed, 6 Jan 2021 16:13:37 +0200
Jiawei Wang wrote:
> + int buf_size = MAX_STRING_LEN;
> + char print_buf[buf_size];
Don't use dynamic sized array if you don't have to.
Various static checkers can see look for out of bounds access to
fixed size array.
On Wed, 6 Jan 2021 16:13:37 +0200
Jiawei Wang 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?
When testpmd enabled the verbosity for the received packets, if two packets
were received at the same time, for example, sampling packet and normal
packet, the dump output of these packets may be overlapping due to multiple
core handling the multiple queues simultaneously.
The patch uses one strin
5 matches
Mail list logo