Re: [dpdk-dev] [PATCH v2] mbuf: fix compile by removing struct from function

2019-01-11 Thread Van Haaren, Harry
Converging discussion, +Stephen Hemminger wrote: > I believe this was done so that the compiler doesn't generate > bad code. > > If you reference the mbuf to get the fields then each operation becomes > a load shift and mask operation to get to the bitfield. But if they > are local then this is a

Re: [dpdk-dev] [PATCH v2] mbuf: fix compile by removing struct from function

2019-01-11 Thread Olivier Matz
Hi, On Thu, Jan 10, 2019 at 06:40:06PM +, Dumitrescu, Cristian wrote: > > > > -Original Message- > > From: Van Haaren, Harry > > Sent: Thursday, January 10, 2019 6:07 PM > > To: dev@dpdk.org > > Cc: Van Haaren, Harry ; Pattan, Reshma > > ; Dumitrescu, Cristian > > ; tho...@monjalon.n

Re: [dpdk-dev] [PATCH v2] mbuf: fix compile by removing struct from function

2019-01-10 Thread Stephen Hemminger
Cc: Pattan, Reshma ; tho...@monjalon.net; > > olivier.m...@6wind.com > > Subject: Re: [dpdk-dev] [PATCH v2] mbuf: fix compile by removing struct > > from function > > > > > > > > > -Original Message- > > > From: Van Haaren, Harry > > &g

Re: [dpdk-dev] [PATCH v2] mbuf: fix compile by removing struct from function

2019-01-10 Thread Gavin Hu (Arm Technology China)
> -Original Message- > From: dev On Behalf Of Dumitrescu, Cristian > Sent: Friday, January 11, 2019 2:40 AM > To: Van Haaren, Harry ; dev@dpdk.org > Cc: Pattan, Reshma ; tho...@monjalon.net; > olivier.m...@6wind.com > Subject: Re: [dpdk-dev] [PATCH v2] mbuf: fi

Re: [dpdk-dev] [PATCH v2] mbuf: fix compile by removing struct from function

2019-01-10 Thread Dumitrescu, Cristian
> -Original Message- > From: Van Haaren, Harry > Sent: Thursday, January 10, 2019 6:07 PM > To: dev@dpdk.org > Cc: Van Haaren, Harry ; Pattan, Reshma > ; Dumitrescu, Cristian > ; tho...@monjalon.net; > olivier.m...@6wind.com > Subject: [PATCH v2] mbuf: fix compile by removing struct from

[dpdk-dev] [PATCH v2] mbuf: fix compile by removing struct from function

2019-01-10 Thread Harry van Haaren
Although C compilation works with the struct rte_mbuf_sched declared inside the struct rte_mbuf namespace, C++ fails to compile. This fix removes the temporary struct rte_mbuf_sched, instead reading from the mbuf directly for each struct member. As the struct is now not used directly, the C++ comp