DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ixgbe: fix icc issue with mbuf initializer
@ 2014-11-03 11:11 Bruce Richardson
  2014-11-03 12:31 ` David Marchand
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Bruce Richardson @ 2014-11-03 11:11 UTC (permalink / raw)
  To: dev

When using Intel C++ compiler(icc) 14.0.1.106 or the older icc 13.x
version, the mbuf initializer variable was not getting configured
correctly, as the mb_def variable was not set correctly. This is due
to an issue with icc (DPD200249565 which already been fixed in
icc 14.0.2 and newer compiler release) where it incorrectly calculates
the field offsets with initializers when zero-sized fields
are used in a structure.
To work around this, the code in ixgbe_rxq_vec_setup does not setup the
fields using an initializer, but instead assigns the values individually
in code
NOTE: There is no performance impact to this change as the queue
setup functions are not data-plane APIs, but are only used at app
initialization.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
index e813e43..b57c588 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
@@ -730,16 +730,15 @@ static struct ixgbe_txq_ops vec_txq_ops = {
 int
 ixgbe_rxq_vec_setup(struct igb_rx_queue *rxq)
 {
-	struct rte_mbuf mb_def = {
-		.nb_segs = 1,
-		.data_off = RTE_PKTMBUF_HEADROOM,
-#ifdef RTE_MBUF_REFCNT
-		{ .refcnt = 1, }
-#endif
-	};
+	struct rte_mbuf mb_def = { .buf_addr = 0 }; /* zeroed mbuf */
 
+	mb_def.nb_segs = 1;
+	mb_def.data_off = RTE_PKTMBUF_HEADROOM;
 	mb_def.buf_len = rxq->mb_pool->elt_size - sizeof(struct rte_mbuf);
 	mb_def.port = rxq->port_id;
+#ifdef RTE_MBUF_REFCNT
+	mb_def.refcnt = 1;
+#endif
 	rxq->mbuf_initializer = *((uint64_t *)&mb_def.rearm_data);
 	return 0;
 }
-- 
1.9.3

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH] ixgbe: fix icc issue with mbuf initializer
  2014-11-03 11:11 [dpdk-dev] [PATCH] ixgbe: fix icc issue with mbuf initializer Bruce Richardson
@ 2014-11-03 12:31 ` David Marchand
  2014-11-03 12:47   ` Bruce Richardson
  2014-11-03 17:01 ` [dpdk-dev] [PATCH v2] " Bruce Richardson
  2014-11-28  8:52 ` [dpdk-dev] [PATCH] " Cao, Min
  2 siblings, 1 reply; 9+ messages in thread
From: David Marchand @ 2014-11-03 12:31 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

Hello Bruce,

On Mon, Nov 3, 2014 at 12:11 PM, Bruce Richardson <
bruce.richardson@intel.com> wrote:

> diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
> b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
> index e813e43..b57c588 100644
> --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
> +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
> @@ -730,16 +730,15 @@ static struct ixgbe_txq_ops vec_txq_ops = {
>  int
>  ixgbe_rxq_vec_setup(struct igb_rx_queue *rxq)
>  {
> -       struct rte_mbuf mb_def = {
> -               .nb_segs = 1,
> -               .data_off = RTE_PKTMBUF_HEADROOM,
> -#ifdef RTE_MBUF_REFCNT
> -               { .refcnt = 1, }
> -#endif
> -       };
> +       struct rte_mbuf mb_def = { .buf_addr = 0 }; /* zeroed mbuf */
>
> +       mb_def.nb_segs = 1;
> +       mb_def.data_off = RTE_PKTMBUF_HEADROOM;
>         mb_def.buf_len = rxq->mb_pool->elt_size - sizeof(struct rte_mbuf);
>         mb_def.port = rxq->port_id;
> +#ifdef RTE_MBUF_REFCNT
> +       mb_def.refcnt = 1;
> +#endif
>         rxq->mbuf_initializer = *((uint64_t *)&mb_def.rearm_data);
>         return 0;
>  }
>

I would expect we use rte_mbuf_refcnt_set / rte_mbuf_refcnt_read to access
this "refcnt" field.
This api handles both RTE_MBUF_REFCNT_ATOMIC and ! RTE_MBUF_REFCNT_ATOMIC
configs.
But I suppose this is fine at init time (since the union will initialize
properly the field).

By the way, why do we have this RTE_MBUF_REFCNT_ATOMIC option ?
>From my point of view, there is not much use of a refcnt that is not atomic
:-).


-- 
David Marchand

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH] ixgbe: fix icc issue with mbuf initializer
  2014-11-03 12:31 ` David Marchand
@ 2014-11-03 12:47   ` Bruce Richardson
  2014-11-03 12:59     ` Thomas Monjalon
  0 siblings, 1 reply; 9+ messages in thread
From: Bruce Richardson @ 2014-11-03 12:47 UTC (permalink / raw)
  To: David Marchand; +Cc: dev

On Mon, Nov 03, 2014 at 01:31:10PM +0100, David Marchand wrote:
> Hello Bruce,
> 
> On Mon, Nov 3, 2014 at 12:11 PM, Bruce Richardson <
> bruce.richardson@intel.com> wrote:
> 
> > diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
> > b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
> > index e813e43..b57c588 100644
> > --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
> > +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
> > @@ -730,16 +730,15 @@ static struct ixgbe_txq_ops vec_txq_ops = {
> >  int
> >  ixgbe_rxq_vec_setup(struct igb_rx_queue *rxq)
> >  {
> > -       struct rte_mbuf mb_def = {
> > -               .nb_segs = 1,
> > -               .data_off = RTE_PKTMBUF_HEADROOM,
> > -#ifdef RTE_MBUF_REFCNT
> > -               { .refcnt = 1, }
> > -#endif
> > -       };
> > +       struct rte_mbuf mb_def = { .buf_addr = 0 }; /* zeroed mbuf */
> >
> > +       mb_def.nb_segs = 1;
> > +       mb_def.data_off = RTE_PKTMBUF_HEADROOM;
> >         mb_def.buf_len = rxq->mb_pool->elt_size - sizeof(struct rte_mbuf);
> >         mb_def.port = rxq->port_id;
> > +#ifdef RTE_MBUF_REFCNT
> > +       mb_def.refcnt = 1;
> > +#endif
> >         rxq->mbuf_initializer = *((uint64_t *)&mb_def.rearm_data);
> >         return 0;
> >  }
> >
> 
> I would expect we use rte_mbuf_refcnt_set / rte_mbuf_refcnt_read to access
> this "refcnt" field.
> This api handles both RTE_MBUF_REFCNT_ATOMIC and ! RTE_MBUF_REFCNT_ATOMIC
> configs.
> But I suppose this is fine at init time (since the union will initialize
> properly the field).

It's a good point, I'll update patch to use the appropriate macro which will clean up the code a bit.

/Bruce

> 
> By the way, why do we have this RTE_MBUF_REFCNT_ATOMIC option ?
> From my point of view, there is not much use of a refcnt that is not atomic
> :-).
> 
> 
> -- 
> David Marchand

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH] ixgbe: fix icc issue with mbuf initializer
  2014-11-03 12:47   ` Bruce Richardson
@ 2014-11-03 12:59     ` Thomas Monjalon
  2014-11-03 13:16       ` Bruce Richardson
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Monjalon @ 2014-11-03 12:59 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

2014-11-03 12:47, Bruce Richardson:
> On Mon, Nov 03, 2014 at 01:31:10PM +0100, David Marchand wrote:
> > On Mon, Nov 3, 2014 at 12:11 PM, Bruce Richardson <
> > > +#ifdef RTE_MBUF_REFCNT
> > > +       mb_def.refcnt = 1;
> > > +#endif
> > 
> > I would expect we use rte_mbuf_refcnt_set / rte_mbuf_refcnt_read to access
> > this "refcnt" field.
> > This api handles both RTE_MBUF_REFCNT_ATOMIC and ! RTE_MBUF_REFCNT_ATOMIC
> > configs.
> > But I suppose this is fine at init time (since the union will initialize
> > properly the field).
> 
> It's a good point, I'll update patch to use the appropriate macro which will clean up the code a bit.

> > By the way, why do we have this RTE_MBUF_REFCNT_ATOMIC option ?
> > From my point of view, there is not much use of a refcnt that is not atomic
> > :-).

Bruce, I think it's a good question but you didn't answer.
Maybe we should remove this option to keep only atomic mode.

-- 
Thomas

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH] ixgbe: fix icc issue with mbuf initializer
  2014-11-03 12:59     ` Thomas Monjalon
@ 2014-11-03 13:16       ` Bruce Richardson
  0 siblings, 0 replies; 9+ messages in thread
From: Bruce Richardson @ 2014-11-03 13:16 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Mon, Nov 03, 2014 at 01:59:16PM +0100, Thomas Monjalon wrote:
> 2014-11-03 12:47, Bruce Richardson:
> > On Mon, Nov 03, 2014 at 01:31:10PM +0100, David Marchand wrote:
> > > On Mon, Nov 3, 2014 at 12:11 PM, Bruce Richardson <
> > > > +#ifdef RTE_MBUF_REFCNT
> > > > +       mb_def.refcnt = 1;
> > > > +#endif
> > > 
> > > I would expect we use rte_mbuf_refcnt_set / rte_mbuf_refcnt_read to access
> > > this "refcnt" field.
> > > This api handles both RTE_MBUF_REFCNT_ATOMIC and ! RTE_MBUF_REFCNT_ATOMIC
> > > configs.
> > > But I suppose this is fine at init time (since the union will initialize
> > > properly the field).
> > 
> > It's a good point, I'll update patch to use the appropriate macro which will clean up the code a bit.
> 
> > > By the way, why do we have this RTE_MBUF_REFCNT_ATOMIC option ?
> > > From my point of view, there is not much use of a refcnt that is not atomic
> > > :-).
> 
> Bruce, I think it's a good question but you didn't answer.
> Maybe we should remove this option to keep only atomic mode.
> 

I didn't answer just because it wasn't directly relevant to the patch. It was not
meant as a snub. :-)

As for why the option is there, it's purely for performance, I suspect. The
cost of doing increments and decrements using atomic operations is far higher
than doing a read-modify-write on a single core. However, the downside is
obviously that you need to know what you are doing if you disable atomic refcnts
and, given that atomic is the default, I reckon we can probably get rid of the
option permanently - unless someone has a use case where they turn off the option,
and can't take the performance hit of the atomic instructions.

As a further asside, if we get the proposed changes made to the zero-copy vhost
implementation - discussed previously[1] - we should hopefully be able to get rid
of the refcnt option too, and leave it permanently enabled.

/Bruce

[1] Discussed in this thread: http://permalink.gmane.org/gmane.comp.networking.dpdk.devel/7098

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-dev] [PATCH v2] ixgbe: fix icc issue with mbuf initializer
  2014-11-03 11:11 [dpdk-dev] [PATCH] ixgbe: fix icc issue with mbuf initializer Bruce Richardson
  2014-11-03 12:31 ` David Marchand
@ 2014-11-03 17:01 ` Bruce Richardson
  2014-11-05 21:45   ` Thomas Monjalon
  2014-11-28  8:52   ` Cao, Min
  2014-11-28  8:52 ` [dpdk-dev] [PATCH] " Cao, Min
  2 siblings, 2 replies; 9+ messages in thread
From: Bruce Richardson @ 2014-11-03 17:01 UTC (permalink / raw)
  To: dev

When using Intel C++ compiler(icc) 14.0.1.106 or the older icc 13.x
version, the mbuf initializer variable was not getting configured
correctly, as the mb_def variable was not set correctly. This is due
to an issue with icc (DPD200249565 which already been fixed in
icc 14.0.2 and newer compiler release) where it incorrectly calculates
the field offsets with initializers when zero-sized fields
are used in a structure.
To work around this, the code in ixgbe_rxq_vec_setup does not setup the
fields using an initializer, but instead assigns the values individually
in code
NOTE: There is no performance impact to this change as the queue
setup functions are not data-plane APIs, but are only used at app
initialization.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

---
V2 change: use rte_mbuf_refcnt_set to update reference count

---
 lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
index e813e43..42c0f60 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
@@ -730,16 +730,13 @@ static struct ixgbe_txq_ops vec_txq_ops = {
 int
 ixgbe_rxq_vec_setup(struct igb_rx_queue *rxq)
 {
-	struct rte_mbuf mb_def = {
-		.nb_segs = 1,
-		.data_off = RTE_PKTMBUF_HEADROOM,
-#ifdef RTE_MBUF_REFCNT
-		{ .refcnt = 1, }
-#endif
-	};
+	struct rte_mbuf mb_def = { .buf_addr = 0 }; /* zeroed mbuf */
 
+	mb_def.nb_segs = 1;
+	mb_def.data_off = RTE_PKTMBUF_HEADROOM;
 	mb_def.buf_len = rxq->mb_pool->elt_size - sizeof(struct rte_mbuf);
 	mb_def.port = rxq->port_id;
+	rte_mbuf_refcnt_set(&mb_def, 1);
 	rxq->mbuf_initializer = *((uint64_t *)&mb_def.rearm_data);
 	return 0;
 }
-- 
1.9.3

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v2] ixgbe: fix icc issue with mbuf initializer
  2014-11-03 17:01 ` [dpdk-dev] [PATCH v2] " Bruce Richardson
@ 2014-11-05 21:45   ` Thomas Monjalon
  2014-11-28  8:52   ` Cao, Min
  1 sibling, 0 replies; 9+ messages in thread
From: Thomas Monjalon @ 2014-11-05 21:45 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

> When using Intel C++ compiler(icc) 14.0.1.106 or the older icc 13.x
> version, the mbuf initializer variable was not getting configured
> correctly, as the mb_def variable was not set correctly. This is due
> to an issue with icc (DPD200249565 which already been fixed in
> icc 14.0.2 and newer compiler release) where it incorrectly calculates
> the field offsets with initializers when zero-sized fields
> are used in a structure.
> To work around this, the code in ixgbe_rxq_vec_setup does not setup the
> fields using an initializer, but instead assigns the values individually
> in code
> NOTE: There is no performance impact to this change as the queue
> setup functions are not data-plane APIs, but are only used at app
> initialization.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Applied

Thanks
-- 
Thomas

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v2] ixgbe: fix icc issue with mbuf initializer
  2014-11-03 17:01 ` [dpdk-dev] [PATCH v2] " Bruce Richardson
  2014-11-05 21:45   ` Thomas Monjalon
@ 2014-11-28  8:52   ` Cao, Min
  1 sibling, 0 replies; 9+ messages in thread
From: Cao, Min @ 2014-11-28  8:52 UTC (permalink / raw)
  To: Richardson, Bruce, dev

Tested-by: Min Cao <min.cao@intel.com>

Patch name: 		[dpdk-dev] [PATCH v2] ixgbe: fix icc issue with mbuf initializer
Test Flag: 			Tested-by
Tester name: 		min.cao@intel.com
ICC version:            13.1.2
ICC package:            l_ccompxe_2013.4.183.tgz
Result summary:		total 6 cases, 6 passed, 0 failed

Test Case 1:		
Name:				l2fwd
Environment:		OS: Fedora20 3.11.10-301.fc20.x86_64
				CPU: Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz
				NIC: Fortville eagle/spirit 
Test result(32bit):	PASSED
Test result(64bit):	PASSED

Test Case 2:		
Name:				l3fwd
Environment:		OS: Fedora20 3.11.10-301.fc20.x86_64
				CPU: Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz
				NIC: Fortville eagle/spirit 
Test result(32bit):	PASSED
Test result(64bit):	PASSED
Test Case 3:		
Name:				pmd
Environment:		OS: Fedora20 3.11.10-301.fc20.x86_64
				CPU: Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz
				NIC: Fortville eagle/spirit 
Test result(32bit):	PASSED
Test result(64bit):	PASSED

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson
Sent: Tuesday, November 04, 2014 1:01 AM
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2] ixgbe: fix icc issue with mbuf initializer

When using Intel C++ compiler(icc) 14.0.1.106 or the older icc 13.x
version, the mbuf initializer variable was not getting configured
correctly, as the mb_def variable was not set correctly. This is due
to an issue with icc (DPD200249565 which already been fixed in
icc 14.0.2 and newer compiler release) where it incorrectly calculates
the field offsets with initializers when zero-sized fields
are used in a structure.
To work around this, the code in ixgbe_rxq_vec_setup does not setup the
fields using an initializer, but instead assigns the values individually
in code
NOTE: There is no performance impact to this change as the queue
setup functions are not data-plane APIs, but are only used at app
initialization.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

---
V2 change: use rte_mbuf_refcnt_set to update reference count

---
 lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
index e813e43..42c0f60 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
@@ -730,16 +730,13 @@ static struct ixgbe_txq_ops vec_txq_ops = {
 int
 ixgbe_rxq_vec_setup(struct igb_rx_queue *rxq)
 {
-	struct rte_mbuf mb_def = {
-		.nb_segs = 1,
-		.data_off = RTE_PKTMBUF_HEADROOM,
-#ifdef RTE_MBUF_REFCNT
-		{ .refcnt = 1, }
-#endif
-	};
+	struct rte_mbuf mb_def = { .buf_addr = 0 }; /* zeroed mbuf */
 
+	mb_def.nb_segs = 1;
+	mb_def.data_off = RTE_PKTMBUF_HEADROOM;
 	mb_def.buf_len = rxq->mb_pool->elt_size - sizeof(struct rte_mbuf);
 	mb_def.port = rxq->port_id;
+	rte_mbuf_refcnt_set(&mb_def, 1);
 	rxq->mbuf_initializer = *((uint64_t *)&mb_def.rearm_data);
 	return 0;
 }
-- 
1.9.3

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH] ixgbe: fix icc issue with mbuf initializer
  2014-11-03 11:11 [dpdk-dev] [PATCH] ixgbe: fix icc issue with mbuf initializer Bruce Richardson
  2014-11-03 12:31 ` David Marchand
  2014-11-03 17:01 ` [dpdk-dev] [PATCH v2] " Bruce Richardson
@ 2014-11-28  8:52 ` Cao, Min
  2 siblings, 0 replies; 9+ messages in thread
From: Cao, Min @ 2014-11-28  8:52 UTC (permalink / raw)
  To: Richardson, Bruce, dev

Tested-by: Min Cao <min.cao@intel.com>

Patch name: 		[dpdk-dev] [PATCH v2] ixgbe: fix icc issue with mbuf initializer
Test Flag: 			Tested-by
Tester name: 		min.cao@intel.com
ICC version:            13.1.2
ICC package:            l_ccompxe_2013.4.183.tgz
Result summary:		total 6 cases, 6 passed, 0 failed

Test Case 1:		
Name:				l2fwd
Environment:		OS: Fedora20 3.11.10-301.fc20.x86_64
				CPU: Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz
				NIC: Fortville eagle/spirit 
Test result(32bit):	PASSED
Test result(64bit):	PASSED

Test Case 2:		
Name:				l3fwd
Environment:		OS: Fedora20 3.11.10-301.fc20.x86_64
				CPU: Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz
				NIC: Fortville eagle/spirit 
Test result(32bit):	PASSED
Test result(64bit):	PASSED
Test Case 3:		
Name:				pmd
Environment:		OS: Fedora20 3.11.10-301.fc20.x86_64
				CPU: Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz
				NIC: Fortville eagle/spirit 
Test result(32bit):	PASSED
Test result(64bit):	PASSED

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson
Sent: Monday, November 03, 2014 7:11 PM
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] ixgbe: fix icc issue with mbuf initializer

When using Intel C++ compiler(icc) 14.0.1.106 or the older icc 13.x
version, the mbuf initializer variable was not getting configured
correctly, as the mb_def variable was not set correctly. This is due
to an issue with icc (DPD200249565 which already been fixed in
icc 14.0.2 and newer compiler release) where it incorrectly calculates
the field offsets with initializers when zero-sized fields
are used in a structure.
To work around this, the code in ixgbe_rxq_vec_setup does not setup the
fields using an initializer, but instead assigns the values individually
in code
NOTE: There is no performance impact to this change as the queue
setup functions are not data-plane APIs, but are only used at app
initialization.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
index e813e43..b57c588 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
@@ -730,16 +730,15 @@ static struct ixgbe_txq_ops vec_txq_ops = {
 int
 ixgbe_rxq_vec_setup(struct igb_rx_queue *rxq)
 {
-	struct rte_mbuf mb_def = {
-		.nb_segs = 1,
-		.data_off = RTE_PKTMBUF_HEADROOM,
-#ifdef RTE_MBUF_REFCNT
-		{ .refcnt = 1, }
-#endif
-	};
+	struct rte_mbuf mb_def = { .buf_addr = 0 }; /* zeroed mbuf */
 
+	mb_def.nb_segs = 1;
+	mb_def.data_off = RTE_PKTMBUF_HEADROOM;
 	mb_def.buf_len = rxq->mb_pool->elt_size - sizeof(struct rte_mbuf);
 	mb_def.port = rxq->port_id;
+#ifdef RTE_MBUF_REFCNT
+	mb_def.refcnt = 1;
+#endif
 	rxq->mbuf_initializer = *((uint64_t *)&mb_def.rearm_data);
 	return 0;
 }
-- 
1.9.3

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-11-28  8:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-03 11:11 [dpdk-dev] [PATCH] ixgbe: fix icc issue with mbuf initializer Bruce Richardson
2014-11-03 12:31 ` David Marchand
2014-11-03 12:47   ` Bruce Richardson
2014-11-03 12:59     ` Thomas Monjalon
2014-11-03 13:16       ` Bruce Richardson
2014-11-03 17:01 ` [dpdk-dev] [PATCH v2] " Bruce Richardson
2014-11-05 21:45   ` Thomas Monjalon
2014-11-28  8:52   ` Cao, Min
2014-11-28  8:52 ` [dpdk-dev] [PATCH] " Cao, Min

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git