[PATCH] ethdev: fix get_reg_info
fengchengwen
fengchengwen at huawei.com
Fri Mar 7 10:33:45 CET 2025
On 2025/2/20 2:45, Stephen Hemminger wrote:
> On Tue, 18 Feb 2025 12:58:28 +0100
> Thierry Herbelot <thierry.herbelot at 6wind.com> wrote:
>
>> 'width' and 'offset' are input parameters when dumping the register
>> info of an Ethernet device. They should be copied in the new request
>> before calling the device callback function.
>>
>> Fixes: 083db2ed9e9 ('ethdev: add report of register names and filter')
>> Cc: stable at dpdk.org
>>
>> Signed-off-by: Thierry Herbelot <thierry.herbelot at 6wind.com>
>
> Why does the ethdev code create an on stack temporary variable.
> Looks like it only wants to make sure that names element is NULL.
It mainly for ABI compatibility.
The original solution is to add an ext API (rte_eth_dev_get_reg_info_ext) and deprecate the original API (rte_eth_dev_get_reg_info).
>
> Really should be one function and when extended fields were added
> should have used API versioning.
> Probably too late now, although rte_eth_dev_get_reg_info_ext()
> is an experimental API.
More information about the dev
mailing list