From: Remy Horton <remy.horton@intel.com>
To: dev@dpdk.org
Cc: zr@semihalf.com, zyta.szpak@semihalf.com
Subject: Re: [dpdk-dev] [PATCH] examples/ethtool: include case for 64-bit registers
Date: Fri, 20 May 2016 09:25:43 +0100 [thread overview]
Message-ID: <573ECA07.1060303@intel.com> (raw)
In-Reply-To: <1462963714-21022-1-git-send-email-zr@semihalf.com>
Morning,
On 11/05/2016 11:48, zr@semihalf.com wrote:
> From: Zyta Szpak <zyta.szpak@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
next prev parent reply other threads:[~2016-05-20 8:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 10:48 zr
2016-05-20 8:25 ` Remy Horton [this message]
2016-05-23 5:11 ` Zyta Szpak
2016-05-25 6:36 ` [dpdk-dev] [PATCH 1/2] ethdev: add callback to get register size in bytes zr
2016-05-25 6:36 ` [dpdk-dev] [PATCH 2/2] examples/ethtool: get reg width to allocate memory zr
2016-05-25 13:14 ` Remy Horton
2016-05-25 13:14 ` [dpdk-dev] [PATCH 1/2] ethdev: add callback to get register size in bytes Remy Horton
2016-05-30 9:00 ` Zyta Szpak
2016-05-27 10:28 ` Panu Matilainen
2016-05-27 14:43 ` Thomas Monjalon
2016-05-30 9:32 ` Zyta Szpak
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=573ECA07.1060303@intel.com \
--to=remy.horton@intel.com \
--cc=dev@dpdk.org \
--cc=zr@semihalf.com \
--cc=zyta.szpak@semihalf.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).