From: Olivier MATZ <olivier.matz@6wind.com>
To: Alejandro Lucero <alejandro.lucero@netronome.com>, dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] ret_pktmbuf_pool_init problem with opaque_arg
Date: Fri, 09 Jan 2015 15:28:30 +0100 [thread overview]
Message-ID: <54AFE58E.50009@6wind.com> (raw)
In-Reply-To: <CAD+H9911EO_0J_GRt34j-ugOSqeJo-QobNYc_cMe+52kvXLEfw@mail.gmail.com>
Hi Alejandro,
On 01/09/2015 03:12 PM, Alejandro Lucero wrote:
> Inside this function mbuf_data_room_size is set to a default value if
> opaque_arg is null and it should be set to the value pointed by opaque_arg
> if not null. Current implementation is using not the value but with the
> pointer itself. I think this:
>
> roomsz = (uint16_t)(uintptr_t)opaque_arg;
>
> should be something like this:
>
> roomsz = *(uint16_t *)opaque_arg;
>
In this particular case, the integer value is stored in the pointer
value: the pointer is not used as a pointer but as an integer. I agree
it can be surprising, but I think the code is correct.
Regards,
Olivier
next prev parent reply other threads:[~2015-01-09 14:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-09 14:12 Alejandro Lucero
2015-01-09 14:28 ` Olivier MATZ [this message]
2015-01-09 14:38 ` Alejandro Lucero
2015-01-09 22:42 ` Stephen Hemminger
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=54AFE58E.50009@6wind.com \
--to=olivier.matz@6wind.com \
--cc=alejandro.lucero@netronome.com \
--cc=dev@dpdk.org \
/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).