From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ye Xiaolong Subject: Re: [PATCH v3 1/5] net/af_xdp: introduce AF XDP PMD driver Date: Fri, 22 Mar 2019 10:05:34 +0800 Message-ID: <20190322020534.GG84243@intel.com> References: <20190301080947.91086-1-xiaolong.ye@intel.com> <20190321091845.78495-1-xiaolong.ye@intel.com> <20190321091845.78495-2-xiaolong.ye@intel.com> <20190321082415.1dc0a2b9@shemminger-XPS-13-9360> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, Qi Zhang , Karlsson Magnus , Topel Bjorn To: Stephen Hemminger Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 72A7C1B55F for ; Fri, 22 Mar 2019 03:09:40 +0100 (CET) Content-Disposition: inline In-Reply-To: <20190321082415.1dc0a2b9@shemminger-XPS-13-9360> 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 03/21, Stephen Hemminger wrote: >On Thu, 21 Mar 2019 17:18:41 +0800 >Xiaolong Ye wrote: > >> + >> +static inline int >> +reserve_fill_queue(struct xsk_umem_info *umem, int reserve_size) >> +{ >> + struct xsk_ring_prod *fq = &umem->fq; >> + uint32_t idx; >> + void *addr = NULL; >> + int i, ret; >> + >> + ret = xsk_ring_prod__reserve(fq, reserve_size, &idx); >> + if (!ret) { >> + RTE_LOG(ERR, AF_XDP, "Failed to reserve enough fq descs.\n"); >> + return ret; >> + } >> + >> + for (i = 0; i < reserve_size; i++) { >> + __u64 *fq_addr; >> + rte_ring_dequeue(umem->buf_ring, &addr); > >You should check return value of dequeue, otherwise static checkers will >(rightly) complain that "everyone else checks return value of of rte_ring_dequeue() >why not here?" Got it, will do.