[dpdk-dev] [PATCH v2 6/6] mbuf: flatten struct vlan_macip into mbuf struct

Richardson, Bruce bruce.richardson at intel.com
Sun Sep 7 21:40:01 CEST 2014


> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Friday, September 05, 2014 5:21 PM
> To: Richardson, Bruce; dev at dpdk.org
> Subject: RE: [dpdk-dev] [PATCH v2 6/6] mbuf: flatten struct vlan_macip into
> mbuf struct
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Bruce Richardson
> > Sent: Thursday, August 28, 2014 4:43 PM
> > To: dev at dpdk.org
> > Subject: [dpdk-dev] [PATCH v2 6/6] mbuf: flatten struct vlan_macip into
> > mbuf struct
> >
> > The vlan_macip structure combined a vlan tag id with l2 and l3 headers
> > lengths for tracking offloads. However, this structure was only used as
> > a unit by the e1000 and ixgbe drivers, not generally.
> >
> > This patch removes the structure from the mbuf header and places the
> > fields into the mbuf structure directly at the required point, without
> > any net effect on the structure layout. This allows us to treat the vlan
> > tags and header length fields as separate for future mbuf changes. The
> > drivers which were written to use the combined structure still do so,
> > using a driver-local definition of it.
> >
> > Changes in V2:
> > * None
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> 
> After applying this patch, I see a performance degradation (around 5%) using
> testpmd with the default RX path, so this may require a v3 patch.
> 
> Thanks,
> Pablo

Thanks for Pablo for flagging this. Since no fields are moved in the structure, merely flattened, I suspect any degradation must come from having the l2_len and l3_len bit fields split out. I'll do up a v3 with a union to allow them to be assigned simultaneously and see if it helps things. Fast-path is unaffected in my tests.

/Bruce


More information about the dev mailing list