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

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Tue Sep 9 17:20:10 CEST 2014



> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Bruce Richardson
> Sent: Tuesday, September 09, 2014 3:41 PM
> To: dev at dpdk.org
> Subject: [dpdk-dev] [PATCH v3 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
> 
> Changes in V3:
> * minor comment cleanup following review by Olivier
> * reduce perf regression caused by splitting vlan_macip field. This is
>   done by providing a single uint16_t value to allow writing/clearing
>   the l2 and l3 lengths together. There is still a small perf hit to the
>   slow path TX due to the reads from vlan_tci and l2/l3 lengths being
>   separated. (<5% in my tests with testpmd with no extra params).
>   Unfortunately, this cannot be eliminated, without restoring the vlan
>   tags and l2/l3 lengths as a combined 32-bit field. This would prevent
>   us from ever looking to move those fields about and is an artificial tie
>   that applies only for performance in igb and ixgbe drivers. Therefore,
>   this patch keeps the vlan_tci field separate from the lengths as the
>   best solution going forward.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> V2 Acked-by: Olivier Matz <olivier.matz at 6wind.com>

V3 Acked-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>



More information about the dev mailing list