[dpdk-dev] [PATCH v6 2/2] examples/ethtool: use rte_eth_dev_get_reg_info for reg params

2016-07-04 Thread Zyta Szpak
From: Zyta Szpak This change deals with hard-coded register width. The app was allocating too little space for 64-bit registers which resulted in memory corruption. This commit resolves this by getting the number of registers and size of register by rte_eth_dev_get_reg_info function called first

[dpdk-dev] [PATCH v6 1/2] ethdev: remove get_reg_length callback

2016-07-04 Thread Zyta Szpak
From: Zyta Szpak Removes hard-coded assumption that device registers are always 32 bits wide. The rte_eth_dev_get_reg_length and rte_eth_dev_get_reg_info callbacks did not provide register size to the app in any way while is needed to allocate correct number of bytes before retrieving registers

[dpdk-dev] [PATCH v5 1/2] ethdev: remove get_reg_length callback

2016-07-04 Thread Zyta Szpak
(1 << 16); >> + return 0; >> + } >> + >> regs->version = CHELSIO_CHIP_VERSION(adapter->params.chip) | >> (CHELSIO_CHIP_RELEASE(adapter->params.chip) << >> 10) | >>

[dpdk-dev] [PATCH v5 2/2] examples/ethtool: use rte_eth_dev_get_reg_info for reg params

2016-07-04 Thread Zyta Szpak
From: Zyta Szpak Version 4 of fixing the fixed register width assumption. The app was allocating too little space for 64-bit registers which resulted in memory corruption. This commit resolves this by getting the number of registers and size of register by rte_eth_dev_get_reg_info function

[dpdk-dev] [PATCH v5 1/2] ethdev: remove get_reg_length callback

2016-07-04 Thread Zyta Szpak
From: Zyta Szpak Removes hard-coded assumption that device registers are always 32 bits wide. The rte_eth_dev_get_reg_length and rte_eth_dev_get_reg_info callbacks did not provide register size to the app in any way while is needed to allocate correct number of bytes before retrieving registers

[dpdk-dev] [PATCH v4 1/2] ethdev: remove get_reg_length callback

2016-06-28 Thread Zyta Szpak
OK On 27.06.2016 17:19, Thomas Monjalon wrote: > 2016-06-23 15:26, zr at semihalf.com: >> From: Zyta Szpak >> >> Version 4 of fixing the assumption of that device registers >> are always 32 bits long. rte_eth_dev_get_reg_length and >> rte_eth_dev_get_reg_info c

[dpdk-dev] [PATCH v4 1/2] ethdev: remove get_reg_length callback

2016-06-28 Thread Zyta Szpak
OK On 27.06.2016 12:46, Remy Horton wrote: > Morning, > > > On 23/06/2016 14:26, zr at semihalf.com wrote: >> From: Zyta Szpak >> >> Version 4 of fixing the assumption of that device registers >> are always 32 bits long. rte_eth_dev_get_reg_length and >&

[dpdk-dev] [PATCH v3 1/2] ethdev: add callback to get register size in bytes

2016-06-22 Thread Zyta Szpak
reg_info struct. rte_eth_dev_get_regs() itself wouldn't change at all. Or do you have different opinion? On 21.06.2016 11:55, Zyta Szpak wrote: > OK, I will do the v4. > > On 17.06.2016 12:20, Thomas Monjalon wrote: >> 2016-06-13 16:51, Remy Horton: >>> On 12/06/2016 15:51,

[dpdk-dev] [PATCH v3 1/2] ethdev: add callback to get register size in bytes

2016-06-21 Thread Zyta Szpak
OK, I will do the v4. On 17.06.2016 12:20, Thomas Monjalon wrote: > 2016-06-13 16:51, Remy Horton: >> On 12/06/2016 15:51, Zyta Szpak wrote: >>> I would prefer having only one function rte_eth_dev_get_regs() >>> which returns length and width if data is NULL.

[dpdk-dev] [PATCH v3 1/2] ethdev: add callback to get register size in bytes

2016-06-12 Thread Zyta Szpak
er request before buffer allocation, > and the second call fills the buffer. > > We can deprecate the old API and introduce this new one. > > Opinions? > In my opinion as it is now it works fine. Gathering all parameters in one callback might be a good idea if the maintainer also agrees to that because as I mentioned, it interferes. Any other opinions?\ Best regards, Zyta Szpak

[dpdk-dev] [PATCH v2 1/2] ethdev: add callback to get register size in bytes

2016-05-31 Thread Zyta Szpak
On 30.05.2016 12:58, Panu Matilainen wrote: > On 05/30/2016 12:39 PM, zr at semihalf.com wrote: >> From: Zyta Szpak >> >> Version 2 of fixing the fixed register width assumption. >> rte_eth_dev_get_reg_length and rte_eth_dev_get_reg callbacks >> do not provid

[dpdk-dev] [PATCH 1/2] ethdev: add callback to get register size in bytes

2016-05-30 Thread Zyta Szpak
On 27.05.2016 12:28, Panu Matilainen wrote: > On 05/25/2016 09:36 AM, zr at semihalf.com wrote: >> From: Zyta Szpak >> >> Version 2 of fixing the fixed register width assumption. >> rte_eth_dev_get_reg_length and rte_eth_dev_get_reg callbacks >> do not provid

[dpdk-dev] [PATCH 1/2] ethdev: add callback to get register size in bytes

2016-05-30 Thread Zyta Szpak
Was expecting rte_eth_dev_get_reg_width() itself to default to > sizeof(uint32_t) rather than -ENOTSUP, but that is purely personal > taste which others might disagree with. You'll also need a > documentation update & Fixes: line. > > > On 25/05/2016 07:36, zr a

[dpdk-dev] [PATCH] examples/ethtool: include case for 64-bit registers

2016-05-23 Thread Zyta Szpak
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.