From: "Richardson, Bruce" <bruce.richardson@intel.com>
To: Etai Lev-Ran <elevran@gmail.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] rte_ring_sc_dequeue returns 0 but sets packet to NULL
Date: Fri, 22 Nov 2013 09:54:43 +0000 [thread overview]
Message-ID: <59AF69C657FD0841A61C55336867B5B01A975ACA@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <003d01cee5d1$acbee400$063cac00$@com>
> IMHO, adding NULL objects is likely an error not a legitimate use case for
> adding ring elements.
>
> Can anyone think of a use case where adding NULL pointer objects makes
> sense?
>
[BR] As well as the use case already mentioned of passing using NULLs, there is also the scenario where we want to use the rings to pass integers e.g. uintptr_t values as array indexes, instead of pointers. While NULL may not be a valid pointer value, zero is a very common integer value.
prev parent reply other threads:[~2013-11-22 9:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-19 10:35 Jose Gavine Cueto
[not found] ` <000301cee54e$bb49d170$31dd7450$@com>
[not found] ` <CAJ5bv6G+BiB2XSg-sUDeQLg85=S02+Y0m79CjBxfQo=aQOGBXw@mail.gmail.com>
[not found] ` <002f01cee5c9$eb6bf0b0$c243d210$@com>
[not found] ` <CAJ5bv6H3ye9LkA5M4SB_QjADjHOx1hnw7RQkVBrJ3nzHeGaEBg@mail.gmail.com>
[not found] ` <CAGNKSKc+=SeWXhohZWte4k8OjQz9q=i4seqm7JznQQB6T9sWoA@mail.gmail.com>
[not found] ` <CAJ5bv6GM5vX8QR+bg8gmiEBtGYeQ15iKRmyRGyZ2Tv4VEDqagw@mail.gmail.com>
2013-11-20 9:19 ` Etai Lev-Ran
2013-11-20 18:32 ` Jeff Venable
2013-11-20 19:20 ` elevran
2013-11-22 9:54 ` Richardson, Bruce [this message]
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=59AF69C657FD0841A61C55336867B5B01A975ACA@IRSMSX103.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=elevran@gmail.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).