Hi, sorry on my late reply I was on sick leave. Sure I can do that. This fix was the fastest possible without interfering with DPDK API. I will add the callback then.
Regards, Zyta Szpak On 20.05.2016 10:25, Remy Horton wrote: > Morning, > > On 11/05/2016 11:48, zr at semihalf.com wrote: >> From: Zyta Szpak <zyta.szpak at semihalf.com> >> >> rte_eth_dev_get_reg_length and rte_eth_dev_get_reg callbacks >> do not provide register size to the app in any way. Example assuming >> they are 32-bit wide always allocates not enough memory if the >> registers are 64-bit wide. It results in memory corruption. >> This commit is a quick fix to make enough room for 64-bit >> register values when this returned value is given to malloc. > [..] > > This is a loose end that needs to be fixed but my feeling is that it > ought to be done via querying the driver rather than overstating > register bank size. My suggestion would be to add something like > get_reg_wordsize to struct eth_dev_ops and then to use sizeof(uint32) > as fallback for drivers that don't implement the callback. > > Regards, > > ..R?my