Re: [PATCH net-next 3/3] idpf: sprinkle __counted_by{,_le}() in the virtchnl2 header

2024-03-26 Thread Gustavo A. R. Silva
On 3/26/24 10:41, Alexander Lobakin wrote: Both virtchnl2.h and its consumer idpf_virtchnl.c are very error-prone. There are 10 structures with flexible arrays at the end, but 9 of them has flex member counter in Little Endian. Make the code a bit more robust by applying __counted_by_le() to t

[PATCH net-next 3/3] idpf: sprinkle __counted_by{,_le}() in the virtchnl2 header

2024-03-26 Thread Alexander Lobakin
Both virtchnl2.h and its consumer idpf_virtchnl.c are very error-prone. There are 10 structures with flexible arrays at the end, but 9 of them has flex member counter in Little Endian. Make the code a bit more robust by applying __counted_by_le() to those 9. LE platforms is the main target for this