From: Zyta Szpak <zr@semihalf.com>
To: Remy Horton <remy.horton@intel.com>,
thomas.monjalon@6wind.com, wenzhuo.lu@intel.com,
helin.zhang@intel.com, konstantin.ananyev@intel.com,
jingjing.wu@intel.com
Cc: dev@dpdk.org
Subject: Re: [PATCH v4 1/2] ethdev: remove get_reg_length callback
Date: Tue, 28 Jun 2016 18:05:18 +0200 [thread overview]
Message-ID: <5772A03E.70802@semihalf.com> (raw)
In-Reply-To: <f8812fcc-14e3-5b77-4ff4-60de2c22eedd@intel.com>
OK
On 27.06.2016 12:46, Remy Horton wrote:
> Morning,
>
>
> On 23/06/2016 14:26, zr@semihalf.com wrote:
>> From: Zyta Szpak <zr@semihalf.com>
>>
>> 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 callbacks did not provide register size
>> to the app in any way. It is needed to allocate proper number
>> of bytes before retrieving registers content with
>> rte_eth_dev_get_reg. This commit remove rte_eth_dev_get_reg_length
>> callback and adds width parameter to reg_info struct which makes
>> it possible to call rte_eth_dev_get_reg_info to get attributes
>> first. The drivers using this callback fill width and length
>> when call to function made with data=NULL.
>
> I think this would read better as a commit message:
>
> 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, which
> is needed to allocate correct number of bytes before retrieving
> registers using rte_eth_dev_get_reg.
>
> This commit changes rte_eth_dev_get_reg_info so that it can be used to
> retrieve both the number of registers and their width, and removes the
> now-redundant rte_eth_dev_get_reg_length.
>
>
>> -/**
>> - * Retrieve device registers and register attributes
>> + * Retrieve device registers and register attributes (nb of regs and
>> reg size)
>> *
>> * @param port_id
>> * The port identifier of the Ethernet device.
>
> Need detail regarding how *info->data affects function behaviour.
> Something along the lines of:
>
> /**
> * Retrieve device registers and register attributes (number of
> * registers and register size)
> *
> * @param port_id
> * The port identifier of the Ethernet device.
> * @param info
> * Pointer to rte_dev_reg_info structure to fill in. If info->data is
> * NULL the function fills in the width and length fields. If non-NULL
> * the registers are put into the buffer pointed at by the data field.
>
> Program code itself looks good to me.
>
> ..Remy
next prev parent reply other threads:[~2016-06-28 16:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-23 13:26 [PATCH v4 1/2] ethdev: remove get_reg_length callback zr
2016-06-23 13:26 ` [PATCH v4 2/2] examples/ethtool: use rte_eth_dev_get_reg_info for reg params zr
2016-06-27 10:46 ` Remy Horton
2016-06-27 10:46 ` [PATCH v4 1/2] ethdev: remove get_reg_length callback Remy Horton
2016-06-28 16:05 ` Zyta Szpak [this message]
2016-06-27 15:19 ` Thomas Monjalon
2016-06-28 16:05 ` Zyta Szpak
2016-07-04 6:51 ` [PATCH v5 " Zyta Szpak
2016-07-04 6:51 ` [PATCH v5 2/2] examples/ethtool: use rte_eth_dev_get_reg_info for reg params Zyta Szpak
2016-07-04 10:39 ` Remy Horton
2016-07-04 10:38 ` [PATCH v5 1/2] ethdev: remove get_reg_length callback Remy Horton
2016-07-04 11:34 ` Zyta Szpak
2016-07-04 11:36 ` [PATCH v6 " Zyta Szpak
2016-07-04 11:36 ` [PATCH v6 2/2] examples/ethtool: use rte_eth_dev_get_reg_info for reg params Zyta Szpak
2016-07-04 13:24 ` Remy Horton
2016-07-08 17:02 ` Thomas Monjalon
2016-07-04 13:24 ` [PATCH v6 1/2] ethdev: remove get_reg_length callback Remy Horton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5772A03E.70802@semihalf.com \
--to=zr@semihalf.com \
--cc=dev@dpdk.org \
--cc=helin.zhang@intel.com \
--cc=jingjing.wu@intel.com \
--cc=konstantin.ananyev@intel.com \
--cc=remy.horton@intel.com \
--cc=thomas.monjalon@6wind.com \
--cc=wenzhuo.lu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.