[dpdk-dev] [PATCH v1 4/7] compress/octeontx: add ops enq deq apis
Verma, Shally
Shally.Verma at cavium.com
Fri Jun 29 09:42:01 CEST 2018
HI Pablo
>-----Original Message-----
>From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch at intel.com]
>Sent: 20 June 2018 03:48
>To: Verma, Shally <Shally.Verma at cavium.com>
>Cc: Trahe, Fiona <fiona.trahe at intel.com>; dev at dpdk.org; Athreya, Narayana Prasad <NarayanaPrasad.Athreya at cavium.com>;
>Challa, Mahipal <Mahipal.Challa at cavium.com>; Gupta, Ashish <Ashish.Gupta at cavium.com>; Sahu, Sunila
><Sunila.Sahu at cavium.com>
>Subject: RE: [PATCH v1 4/7] compress/octeontx: add ops enq deq apis
>
>External Email
>
>> -----Original Message-----
>> From: Shally Verma [mailto:shally.verma at caviumnetworks.com]
>> Sent: Tuesday, June 5, 2018 11:35 AM
>> To: De Lara Guarch, Pablo <pablo.de.lara.guarch at intel.com>
>> Cc: Trahe, Fiona <fiona.trahe at intel.com>; dev at dpdk.org;
>> pathreya at caviumnetworks.com; mchalla at caviumnetworks.com; Ashish Gupta
>> <ashish.gupta at caviumnetworks.com>; Sunila Sahu
>> <sunila.sahu at 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.gupta at caviumnetworks.com>
>> Signed-off-by: Shally Verma <shally.verma at caviumnetworks.com>
>> Signed-off-by: Sunila Sahu <sunila.sahu at 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
More information about the dev
mailing list