HI Pablo >-----Original Message----- >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.gua...@intel.com] >Sent: 20 June 2018 03:48 >To: Verma, Shally <shally.ve...@cavium.com> >Cc: Trahe, Fiona <fiona.tr...@intel.com>; dev@dpdk.org; Athreya, Narayana >Prasad <narayanaprasad.athr...@cavium.com>; >Challa, Mahipal <mahipal.cha...@cavium.com>; Gupta, Ashish ><ashish.gu...@cavium.com>; Sahu, Sunila ><sunila.s...@cavium.com> >Subject: RE: [PATCH v1 4/7] compress/octeontx: add ops enq deq apis > >External Email > >> -----Original Message----- >> From: Shally Verma [mailto:shally.ve...@caviumnetworks.com] >> Sent: Tuesday, June 5, 2018 11:35 AM >> To: De Lara Guarch, Pablo <pablo.de.lara.gua...@intel.com> >> Cc: Trahe, Fiona <fiona.tr...@intel.com>; dev@dpdk.org; >> pathr...@caviumnetworks.com; mcha...@caviumnetworks.com; Ashish Gupta >> <ashish.gu...@caviumnetworks.com>; Sunila Sahu >> <sunila.s...@caviumnetworks.com> >> Subject: [PATCH v1 4/7] compress/octeontx: add ops enq deq apis >> >> implement enqueue and dequeue apis >> >> Signed-off-by: Ashish Gupta <ashish.gu...@caviumnetworks.com> >> Signed-off-by: Shally Verma <shally.ve...@caviumnetworks.com> >> Signed-off-by: Sunila Sahu <sunila.s...@caviumnetworks.com> > >... > >> --- 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