HI Pablo >-----Original Message----- >From: De Lara Guarch, Pablo [mailto:[email protected]] >Sent: 20 June 2018 03:48 >To: Verma, Shally <[email protected]> >Cc: Trahe, Fiona <[email protected]>; [email protected]; Athreya, Narayana >Prasad <[email protected]>; >Challa, Mahipal <[email protected]>; Gupta, Ashish ><[email protected]>; Sahu, Sunila ><[email protected]> >Subject: RE: [PATCH v1 4/7] compress/octeontx: add ops enq deq apis > >External Email > >> -----Original Message----- >> From: Shally Verma [mailto:[email protected]] >> Sent: Tuesday, June 5, 2018 11:35 AM >> To: De Lara Guarch, Pablo <[email protected]> >> Cc: Trahe, Fiona <[email protected]>; [email protected]; >> [email protected]; [email protected]; Ashish Gupta >> <[email protected]>; Sunila Sahu >> <[email protected]> >> Subject: [PATCH v1 4/7] compress/octeontx: add ops enq deq apis >> >> implement enqueue and dequeue apis >> >> Signed-off-by: Ashish Gupta <[email protected]> >> Signed-off-by: Shally Verma <[email protected]> >> Signed-off-by: Sunila Sahu <[email protected]> > >... > >> --- a/drivers/compress/octeontx/zipvf.h >> +++ b/drivers/compress/octeontx/zipvf.h > >... > >> +static inline int >> +zipvf_prepare_out_buf(struct zip_stream *zstrm, struct rte_comp_op *op) >> +{ >> + uint32_t offset; >> + union zip_zptr_s *sg_list = NULL; >> + struct rte_mbuf *m_dst; >> + union zip_inst_s *inst = zstrm->inst; >> + rte_iova_t iova; >> + >> + offset = op->src.offset; >> + m_dst = op->m_dst; >> + >> + if (m_dst->nb_segs == 1) { >> + /* Prepare direct input data pointer */ >> + inst->s.ds = 0; >> + inst->s.out_ptr_addr.s.addr = >> + rte_pktmbuf_iova_offset(m_dst, offset); >> + inst->s.totaloutputlength = rte_pktmbuf_data_len(m_dst) - >> + op->dst.offset; >> + inst->s.out_ptr_ctl.s.length = inst->s.totaloutputlength; >> + return 0; >> + } >> + >> + ZIP_PMD_ERR("output packet is segmented\n"); >> + >> + /* Packet is segmented, create gather buffer */ >> + inst->s.ds = 1; >> + iova = rte_mempool_virt2iova(zstrm->bufs[OUT_DATA_BUF]); >> + if (iova & 0xF) { >> + /* Align it to 16 Byte address */ >> + iova = ZIP_ALIGN_ROUNDUP(iova, ZIP_SGPTR_ALIGN); >> + } >> + >> + inst->s.out_ptr_addr.s.addr = iova; >> + inst->s.inp_ptr_ctl.s.length = (m_dst->nb_segs < MAX_SG_LEN) ? >> + (m_dst->nb_segs) : MAX_SG_LEN; >> + >> + sg_list = (union zip_zptr_s *)iova; > >There is a compilation issue on gcc 32 bits: > >drivers/compress/octeontx/zipvf.h:260:12: error: >cast to pointer from integer of different size [-Werror=int-to-pointer-cast] > sg_list = (union zip_zptr_s *)iova; > [Shally] Shouldn't rte_iova_t should be defined to 32-bit size for 32-bit machine?
Thanks Shally

