From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavan Nikhilesh Bhagavatula Subject: Re: [PATCH v2 1/3] net/octeontx: add support for event Rx adapter Date: Tue, 24 Oct 2017 12:26:22 +0530 Message-ID: <20171024065621.GA15356@PBHAGAVATULA-LT> References: <1508230393-27018-1-git-send-email-pbhagavatula@caviumnetworks.com> <1508316342-17781-1-git-send-email-pbhagavatula@caviumnetworks.com> <20171023180941.GA22149@jerin> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: dev@dpdk.org To: Jerin Jacob Return-path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0060.outbound.protection.outlook.com [104.47.37.60]) by dpdk.org (Postfix) with ESMTP id F1D661B738 for ; Tue, 24 Oct 2017 08:56:45 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20171023180941.GA22149@jerin> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Oct 23, 2017 at 11:39:42PM +0530, Jerin Jacob wrote: > -----Original Message----- > > Date: Wed, 18 Oct 2017 14:15:40 +0530 > > From: Pavan Nikhilesh > > To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com, > > nikhil.rao@intel.com > > Cc: dev@dpdk.org, Pavan Nikhilesh > > Subject: [dpdk-dev] [PATCH v2 1/3] net/octeontx: add support for event Rx > > adapter > > X-Mailer: git-send-email 2.7.4 > > > > Add functions to modify and delete qos responsible for mapping eth queues > > to event queues used for configuring event Rx adapter. > > The mbox functions have been moved from octeontx_pkivf.c to > > octeontx_pkivf.h to allow event_octeontx to access them. > > > > Signed-off-by: Pavan Nikhilesh > > --- > > > > v2 changes: > > - Improve conditional statement readability (Nikhil). > > > > This series depends on http://dpdk.org/dev/patchwork/patch/30430 > > > > > > static __rte_always_inline uint16_t __hot > > __octeontx_xmit_pkts(void *lmtline_va, void *ioreg_va, int64_t *fc_status_va, > > @@ -195,10 +107,8 @@ octeontx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) > > uint16_t __hot > > octeontx_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) > > { > > - struct rte_mbuf *mbuf; > > struct octeontx_rxq *rxq; > > struct rte_event ev; > > - octtx_wqe_t *wqe; > > size_t count; > > uint16_t valid_event; > > > > @@ -210,23 +120,7 @@ octeontx_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) > > 1, 0); > > if (!valid_event) > > break; > > - > > - wqe = (octtx_wqe_t *)(uintptr_t)ev.u64; > > - rte_prefetch_non_temporal(wqe); > > - > > - /* Get mbuf from wqe */ > > - mbuf = (struct rte_mbuf *)((uintptr_t)wqe - > > - OCTTX_PACKET_WQE_SKIP); > > - mbuf->packet_type = > > - ptype_table[wqe->s.w2.lcty][wqe->s.w2.lety][wqe->s.w2.lfty]; > > - mbuf->data_off = RTE_PTR_DIFF(wqe->s.w3.addr, mbuf->buf_addr); > > - mbuf->pkt_len = wqe->s.w1.len; > > - mbuf->data_len = mbuf->pkt_len; > > - mbuf->nb_segs = 1; > > - mbuf->ol_flags = 0; > > - mbuf->port = rxq->port_id; > > IMO, You don't need to move the mbuf conversion inline function to 2/3, > Instead if we do in 1/3.It will functionality correct at 1/3. > > > - rte_mbuf_refcnt_set(mbuf, 1); > > - rx_pkts[count++] = mbuf; > > + rx_pkts[count++] = (struct rte_mbuf *)ev.u64; > > This will create build error on 32bit. You can avoid the typecast by > changing to ev.mbuf. > /export/dpdk-next-eventdev/drivers/net/octeontx/octeontx_rxtx.c: In > function ‘octeontx_recv_pkts’: > /export/dpdk-next-eventdev/drivers/net/octeontx/octeontx_rxtx.c:123:22: > error: cast to pointer from integer of different size > [-Werror=int-to-pointer-cast] > rx_pkts[count++] = (struct rte_mbuf *)ev.u64; > ^ > cc1: all warnings being treated as errors Agreed, will move mbuf conversion to 1/3 and fix 32 bit compilation issues and send a v3. Thanks, Pavan