> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Tuesday, July 10, 2018 12:08 PM
> To: 'Anoob Joseph' <[email protected]>; Doherty, Declan
> <[email protected]>
> Cc: Akhil Goyal <[email protected]>; Ankur Dwivedi
> <[email protected]>; Jerin Jacob
> <[email protected]>; Narayana Prasad
> <[email protected]>; [email protected]
> Subject: RE: [PATCH v1 2/3] app/crypto-perf: honour cryptodev's min
> headroom/tailroom
> 
> 
> 
> > -----Original Message-----
> > From: Anoob Joseph [mailto:[email protected]]
> > Sent: Wednesday, July 4, 2018 2:56 PM
> > To: Doherty, Declan <[email protected]>; De Lara Guarch, Pablo
> > <[email protected]>
> > Cc: Anoob Joseph <[email protected]>; Akhil Goyal
> > <[email protected]>; Ankur Dwivedi
> > <[email protected]>; Jerin Jacob
> > <[email protected]>; Narayana Prasad
> > <[email protected]>; [email protected]
> > Subject: [PATCH v1 2/3] app/crypto-perf: honour cryptodev's min
> > headroom/tailroom
> >
> > Crypto dev would specify its headroom and tailroom requirement and the
> > application is expected to honour this while creating buffers.
> >
> > Signed-off-by: Anoob Joseph <[email protected]>
> 
> ...
> 
> > --- a/app/test-crypto-perf/cperf_test_common.c
> > +++ b/app/test-crypto-perf/cperf_test_common.c
> 
> ...
> 
> > fill_multi_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp,
> >             m->buf_iova = next_seg_phys_addr;
> >             next_seg_phys_addr += mbuf_hdr_size + segment_sz;
> >             m->buf_len = segment_sz;
> > -           m->data_len = segment_sz;
> > +           m->data_len = data_len;
> >
> > -           /* No headroom needed for the buffer */
> > -           m->data_off = 0;
> > +           /* Use headroom specified for the buffer */
> > +           m->data_off = headroom;
> 
> Headroom is only applicable for the first segment/s.
> This is adding headroom in all the segments, which looks wrong.
> 

I think "max_size" needs to be recalculated in "cperf_alloc_common_memory",
adding headroom and tailroom size, which will potentially increase the number 
of segments required.
Then, headroom size needs to be checked in case it is bigger than segment size, 
so data might need to start in the next segment.
Similar thing for tailroom.

Thanks,
Pablo



Reply via email to