Re: [lng-odp] [Linaro/odp] [PATCH API-NEXT v1] api: packet: print data (#258)

2017-10-25 Thread Savolainen, Petri (Nokia - FI/Espoo)
that has to be odp helper, not need for that in odp api — Helper is not API, in general all applications cannot rely that. Out validation/example/etc apps can rely on helpers, but not all. This solves a very common debug need for data plane application - print a received packet on the screen.

Re: [lng-odp] [Linaro/odp] [PATCH API-NEXT v1] api: packet: print data (#258)

2017-10-25 Thread Savolainen, Petri (Nokia - FI/Espoo)
Hi Petri there's no check on snprintf regarding the returned len. Is there any possibility in this code that the final buffer will be bigger than max_len? — I calculate max string len from number of bytes to print: int num_rows = (byte_len + bytes_per_row - 1) / bytes_per_row; int max_len =