[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 provide register size to the app in any

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

2016-05-30 Thread Zyta Szpak
Hi, It is the standard DPDK return value -ENOTSUP when the function is not supported by Ethernet device. I think it is safer to keep it this way rather than default implicitly to sizeof(uint32_t) and more generic. Regards, Zyta On 25.05.2016 15:14, Remy Horton wrote: > 'noon, > > Was expecting

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

2016-05-27 Thread Thomas Monjalon
2016-05-27 13:28, Panu Matilainen: > On 05/25/2016 09:36 AM, zr at semihalf.com wrote: > > @@ -1455,6 +1458,8 @@ struct eth_dev_ops { > > > > eth_get_reg_length_t get_reg_length; > > /**< Get # of registers */ > > + eth_get_reg_width_t get_reg_width; > > + /**< Get # of bytes in

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

2016-05-27 Thread Panu Matilainen
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 provide register size to the app in any way. It is > needed to allocate proper number of bytes

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

2016-05-25 Thread Remy Horton
'noon, 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 at semihalf.com wrote: > From: Zyta

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

2016-05-25 Thread z...@semihalf.com
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 provide register size to the app in any way. It is needed to allocate proper number of bytes before retrieving registers content with