From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5B6DBA052A; Tue, 26 Jan 2021 16:33:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 47678140FB5; Tue, 26 Jan 2021 16:33:48 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 2B4E0140F88 for ; Tue, 26 Jan 2021 16:33:47 +0100 (CET) IronPort-SDR: A9fGaUth1yb8+fORBp7jTTIDeWkybLQbYcRujeFJSfTQyGHTKT4j0bqlGLzRJPpFkQ9jY5lJxk 2tt5+/jzLWog== X-IronPort-AV: E=McAfee;i="6000,8403,9876"; a="180063681" X-IronPort-AV: E=Sophos;i="5.79,375,1602572400"; d="scan'208";a="180063681" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2021 07:33:45 -0800 IronPort-SDR: kBIENZ5d35ToT0Pds4kD8izmkTjKzhN/5M03jhd63j5wE7qQZhrfN8sS5eLq0DOWo68E7zqwP9 Jx6HbyjjufDw== X-IronPort-AV: E=Sophos;i="5.79,375,1602572400"; d="scan'208";a="362022954" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.227.53]) ([10.213.227.53]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2021 07:33:44 -0800 To: Nalla Pradeep , Radha Mohan Chintakuntla , Veerasenareddy Burru Cc: jerinj@marvell.com, dev@dpdk.org, sburla@marvell.com References: <20210118093602.5449-1-pnalla@marvell.com> <20210118093602.5449-10-pnalla@marvell.com> From: Ferruh Yigit Message-ID: <9760e507-5866-8593-7359-41fa97f367f7@intel.com> Date: Tue, 26 Jan 2021 15:33:42 +0000 MIME-Version: 1.0 In-Reply-To: <20210118093602.5449-10-pnalla@marvell.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2 10/11] net/octeontx_ep: Receive data path function added X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list 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 1/18/2021 9:36 AM, Nalla Pradeep wrote: > Function to deliver packets from DROQ to application is added. It also > fills DROQ with receive buffers timely such that device can fill them > with incoming packets. > > Signed-off-by: Nalla Pradeep <...> > @@ -327,7 +333,8 @@ otx_ep_init_droq(struct otx_ep_device *otx_ep, uint32_t q_no, > /* OQ configuration and setup */ > int > otx_ep_setup_oqs(struct otx_ep_device *otx_ep, int oq_no, int num_descs, > - int desc_size, struct rte_mempool *mpool, unsigned int socket_id) > + int desc_size, struct rte_mempool *mpool, > + unsigned int socket_id) Again can you please fix these were it is first introduced? <...> > +/* Check for response arrival from OCTEON TX2 > + * returns number of requests completed > + */ > +uint16_t > +otx_ep_recv_pkts(void *rx_queue, > + struct rte_mbuf **rx_pkts, > + uint16_t budget) > +{ > + struct otx_ep_droq *droq = rx_queue; > + struct otx_ep_device *otx_ep; > + struct rte_mbuf *oq_pkt; > + > + uint32_t pkts = 0; > + uint32_t new_pkts = 0; > + int next_fetch; > + > + otx_ep = droq->otx_ep_dev; > + > + if (droq->pkts_pending > budget) { > + new_pkts = budget; > + } else { > + new_pkts = droq->pkts_pending; > + new_pkts += otx_ep_check_droq_pkts(droq); > + if (new_pkts > budget) > + new_pkts = budget; > + } > + if (!new_pkts) { > + /* otx_ep_dbg("Zero new_pkts:%d\n", new_pkts); */ > + goto update_credit; /* No pkts at this moment */ > + } > + > + /* otx_ep_dbg("Received new_pkts = %d\n", new_pkts); */ > + > + for (pkts = 0; pkts < new_pkts; pkts++) { > + /* Push the received pkt to application */ > + next_fetch = (pkts == new_pkts - 1) ? 0 : 1; > + oq_pkt = otx_ep_droq_read_packet(otx_ep, droq, next_fetch); > + if (!oq_pkt) { > + otx_ep_err("DROQ read pkt failed pending %lu last_pkt_count %lu new_pkts %d.\n", > + droq->pkts_pending, droq->last_pkt_count, Both 'pkts_pending' & 'last_pkt_count' are 64bit and using '%lu' format specifier breaks the build for 32bit: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Werror=format=] Can you please use 'PRIu64' instead?