* [dpdk-dev] [PATCH] mbuf: clarify comment on adding TX offload flags
@ 2015-07-09 13:22 Bruce Richardson
2015-07-09 13:46 ` Eduard Gibert
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Bruce Richardson @ 2015-07-09 13:22 UTC (permalink / raw)
To: dev
The comment for TX offload flags stated that those flags started at bit
55 and then were added to the right of that, leaving 8 bits reserved for
generic mbuf (i.e. non-offload) use. This comment may not have been
clear as 5 of the 8 flags which were reserved have now been used for TX
offloads.
This patch:
* updates the description so that it now reflects reality that
only three flags are available for generic mbuf use
* reserved the final generic flag so that it can't be taken over for TX
offload in future
* clarifies the comment for TX flags to indicate that they should be
counting downwards not upwards.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/librte_mbuf/rte_mbuf.h | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 80419df..0c0034b 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -75,9 +75,10 @@ extern "C" {
*
* - RX flags start at bit position zero, and get added to the left of previous
* flags.
- * - The most-significant 8 bits are reserved for generic mbuf flags
- * - TX flags therefore start at bit position 55 (i.e. 63-8), and new flags get
- * added to the right of the previously defined flags
+ * - The most-significant 3 bits are reserved for generic mbuf flags
+ * - TX flags therefore start at bit position 60 (i.e. 63-3), and new flags get
+ * added to the right of the previously defined flags i.e. they should count
+ * downwards, not upwards.
*
* Keep these flags synchronized with rte_get_rx_ol_flag_name() and
* rte_get_tx_ol_flag_name().
@@ -197,6 +198,8 @@ extern "C" {
*/
#define PKT_TX_OUTER_IPV6 (1ULL << 60)
+#define __RESERVED (1ULL << 61) /**< reserved for future mbuf use */
+
#define IND_ATTACHED_MBUF (1ULL << 62) /**< Indirect attached mbuf */
/* Use final bit of flags to indicate a control mbuf */
--
2.4.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] mbuf: clarify comment on adding TX offload flags
2015-07-09 13:22 [dpdk-dev] [PATCH] mbuf: clarify comment on adding TX offload flags Bruce Richardson
@ 2015-07-09 13:46 ` Eduard Gibert
2015-07-09 13:59 ` Thomas Monjalon
2015-07-15 10:16 ` Olivier MATZ
2 siblings, 0 replies; 5+ messages in thread
From: Eduard Gibert @ 2015-07-09 13:46 UTC (permalink / raw)
To: dev
Hello,
I am trying to run any DPDK application in my machine but I'm unable to do
so because it always hangs after the print "EAL: Setting up memory.." That
applies to all of the DPDK applications. Anyone has any ideas on why this
is happening?
Thanks,
Eduard Gibert Renart
2015-07-09 9:22 GMT-04:00 Bruce Richardson <bruce.richardson@intel.com>:
> The comment for TX offload flags stated that those flags started at bit
> 55 and then were added to the right of that, leaving 8 bits reserved for
> generic mbuf (i.e. non-offload) use. This comment may not have been
> clear as 5 of the 8 flags which were reserved have now been used for TX
> offloads.
> This patch:
> * updates the description so that it now reflects reality that
> only three flags are available for generic mbuf use
> * reserved the final generic flag so that it can't be taken over for TX
> offload in future
> * clarifies the comment for TX flags to indicate that they should be
> counting downwards not upwards.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> lib/librte_mbuf/rte_mbuf.h | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
> index 80419df..0c0034b 100644
> --- a/lib/librte_mbuf/rte_mbuf.h
> +++ b/lib/librte_mbuf/rte_mbuf.h
> @@ -75,9 +75,10 @@ extern "C" {
> *
> * - RX flags start at bit position zero, and get added to the left of
> previous
> * flags.
> - * - The most-significant 8 bits are reserved for generic mbuf flags
> - * - TX flags therefore start at bit position 55 (i.e. 63-8), and new
> flags get
> - * added to the right of the previously defined flags
> + * - The most-significant 3 bits are reserved for generic mbuf flags
> + * - TX flags therefore start at bit position 60 (i.e. 63-3), and new
> flags get
> + * added to the right of the previously defined flags i.e. they should
> count
> + * downwards, not upwards.
> *
> * Keep these flags synchronized with rte_get_rx_ol_flag_name() and
> * rte_get_tx_ol_flag_name().
> @@ -197,6 +198,8 @@ extern "C" {
> */
> #define PKT_TX_OUTER_IPV6 (1ULL << 60)
>
> +#define __RESERVED (1ULL << 61) /**< reserved for future mbuf
> use */
> +
> #define IND_ATTACHED_MBUF (1ULL << 62) /**< Indirect attached mbuf */
>
> /* Use final bit of flags to indicate a control mbuf */
> --
> 2.4.3
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] mbuf: clarify comment on adding TX offload flags
2015-07-09 13:22 [dpdk-dev] [PATCH] mbuf: clarify comment on adding TX offload flags Bruce Richardson
2015-07-09 13:46 ` Eduard Gibert
@ 2015-07-09 13:59 ` Thomas Monjalon
2015-07-15 10:16 ` Olivier MATZ
2 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2015-07-09 13:59 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
2015-07-09 14:22, Bruce Richardson:
> The comment for TX offload flags stated that those flags started at bit
> 55 and then were added to the right of that, leaving 8 bits reserved for
> generic mbuf (i.e. non-offload) use. This comment may not have been
> clear as 5 of the 8 flags which were reserved have now been used for TX
> offloads.
We failed to properly review some patches which are now integrated in
version 1.8. So you cannot fix it without breaking API.
It's a bit sad but your patch fixing the comment is reasonnable.
Fixes: 711ba9e23e68 ("mbuf: remove aliasing of Tx offloading flags with Rx ones")
Fixes: 1c3b7c33e977 ("mbuf: add Tx offloading flags for tunnels")
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] mbuf: clarify comment on adding TX offload flags
2015-07-09 13:22 [dpdk-dev] [PATCH] mbuf: clarify comment on adding TX offload flags Bruce Richardson
2015-07-09 13:46 ` Eduard Gibert
2015-07-09 13:59 ` Thomas Monjalon
@ 2015-07-15 10:16 ` Olivier MATZ
2015-07-16 12:16 ` Thomas Monjalon
2 siblings, 1 reply; 5+ messages in thread
From: Olivier MATZ @ 2015-07-15 10:16 UTC (permalink / raw)
To: Bruce Richardson, dev
On 07/09/2015 03:22 PM, Bruce Richardson wrote:
> The comment for TX offload flags stated that those flags started at bit
> 55 and then were added to the right of that, leaving 8 bits reserved for
> generic mbuf (i.e. non-offload) use. This comment may not have been
> clear as 5 of the 8 flags which were reserved have now been used for TX
> offloads.
> This patch:
> * updates the description so that it now reflects reality that
> only three flags are available for generic mbuf use
> * reserved the final generic flag so that it can't be taken over for TX
> offload in future
> * clarifies the comment for TX flags to indicate that they should be
> counting downwards not upwards.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] mbuf: clarify comment on adding TX offload flags
2015-07-15 10:16 ` Olivier MATZ
@ 2015-07-16 12:16 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2015-07-16 12:16 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
2015-07-15 12:16, Olivier MATZ:
> On 07/09/2015 03:22 PM, Bruce Richardson wrote:
> > The comment for TX offload flags stated that those flags started at bit
> > 55 and then were added to the right of that, leaving 8 bits reserved for
> > generic mbuf (i.e. non-offload) use. This comment may not have been
> > clear as 5 of the 8 flags which were reserved have now been used for TX
> > offloads.
> > This patch:
> > * updates the description so that it now reflects reality that
> > only three flags are available for generic mbuf use
> > * reserved the final generic flag so that it can't be taken over for TX
> > offload in future
> > * clarifies the comment for TX flags to indicate that they should be
> > counting downwards not upwards.
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>
> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Applied, thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-16 12:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-09 13:22 [dpdk-dev] [PATCH] mbuf: clarify comment on adding TX offload flags Bruce Richardson
2015-07-09 13:46 ` Eduard Gibert
2015-07-09 13:59 ` Thomas Monjalon
2015-07-15 10:16 ` Olivier MATZ
2015-07-16 12:16 ` Thomas Monjalon
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).