> -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monja...@6wind.com] > Sent: Wednesday, April 5, 2017 10:38 AM > To: Olivier Matz <olivier.m...@6wind.com> > Cc: dev@dpdk.org; Ananyev, Konstantin <konstantin.anan...@intel.com>; > Richardson, Bruce <bruce.richard...@intel.com>; m...@smartsharesystems.com; > Chilikin, Andrey <andrey.chili...@intel.com>; jblu...@infradead.org; > nelio.laranje...@6wind.com; arybche...@solarflare.com; > jerin.ja...@caviumnetworks.com > Subject: Re: [PATCH v2 0/8] mbuf: structure reorganization > > 2017-04-04 18:27, Olivier Matz: > > Based on discussions done in [1] and in this thread, this patchset > > reorganizes the mbuf. > > > > The main changes are: > > - reorder structure to increase vector performance on some non-ia > > platforms. > > - add a 64bits timestamp field in the 1st cache line. This timestamp > > is not normalized, i.e. no unit or time reference is enforced. A > > library may be added to do this job in the future. > > - m->next, m->nb_segs, and m->refcnt are always initialized for mbufs > > in the pool, avoiding the need of setting m->next (located in the > > 2nd cache line) in the Rx path for mono-segment packets. > > - change port and nb_segs to 16 bits > > - move seqn in the 2nd cache line > > Applied, thanks for the long work > +1
> We need to add a patch to bump ABIVER and document the changes. > > > > Things discussed but not done in the patchset: > > - move refcnt and nb_segs to the 2nd cache line: many drivers sets > > them in the Rx path, so it could introduce a performance regression, > or > > it would require to change all the drivers, which is not an easy task. > > If it is worth to move these fields in 2nd cache line, can we plan to > rework drivers for not setting them in Rx? Any drivers that are already setting these fields directly may get a perf bump by not doing so. However, I'm not sure there is a compelling need to move them down just yet. Let's try and avoid breaking the mbuf again for a few releases. > > > Once this patchset is pushed, the Rx path of drivers could be > > optimized a bit, by removing writes to m->next, m->nb_segs and > > m->refcnt. The patch 4/8 gives an idea of what could be done. > > Yes drivers patches are welcome :) > Please target RC2 for these changes. We indeed plan to do so! /Bruce