From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 967C0A00E6 for ; Thu, 21 Mar 2019 16:24:25 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C6C051B4F9; Thu, 21 Mar 2019 16:24:24 +0100 (CET) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by dpdk.org (Postfix) with ESMTP id A76171B4F4 for ; Thu, 21 Mar 2019 16:24:22 +0100 (CET) Received: by mail-pf1-f173.google.com with SMTP id c207so4511634pfc.7 for ; Thu, 21 Mar 2019 08:24:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NOzTw6rGxoKMs585FBZV8p2Rsd3ljL2+fwku7oaGeAM=; b=SpdKKWWwdB2CDbfHAgmlMGG0S490a8vxE1NdxEM9X24sHpvETHQV3xZ/H9Xp8CvJx2 ttXnWjGkg+kAP8Cxz4pN1lf6SFMmqZXIP2iQB+QfalSpbObljkoY3IyJwmKKLtfW47/H GVwVUeDdVClHhuG+K7Yc/erlDlBdNSrq4fa+wp0pv3prB+83YRJq565OFBXlxyiWTgij ikl9+wy1PCzWrc7ag+QzbiKukhxNLnbRafGb3C9H5sETxBcxyvheQUGr7mim3WZdYe27 Qh8rRAkwFjwsuIG0bf3CJHJGyn8FQr1rOQEjlJcSczJaQzgtHijoarsdtdf06RGUYbD4 kQFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NOzTw6rGxoKMs585FBZV8p2Rsd3ljL2+fwku7oaGeAM=; b=kV9yevG7LLkiy/eAOUVOOa6k7wrf3mFHJZh350VowvYI1GUhIGJV97Pdzedzum8Jgw wb8pB+IzE8KcrFNGvfMVfA+cO44GCg5p4Vle4Kd61hWEFBLmpipmvgdxOpOJLwG7MXfD didCYOgX0/4F28kpYfvrozJEOhRXVEYwPz32zWk+Z9xIT5hy5g4X3h/ioRhH10+UrlVx 9v9w7uu7k4siotkXrqWEc6dEfb5fERZ3HYeGH/oJ1ZzwhcyePvKITb+40tsIDVaua1PC JGjjpvcugVpPOrGDs18w4vl7Dsv1xAoBxg9DrIRA4q+C8F5buQVtUGeGP9npXmgw5eGN 4Zqg== X-Gm-Message-State: APjAAAVlkqzOOK8717epfQAujX56ECVPEizGMLbHiR8XIpdNsQ164+xZ oV6c8EmiB4In3pGzVeydys05Kw== X-Google-Smtp-Source: APXvYqxeN/wDFo2aExcXCv9jkxm4oCDhwCfPRBNJ89jdQbJlwjFCFVMH+9a/l9xa/nsxbgvZTTpaqA== X-Received: by 2002:a62:4754:: with SMTP id u81mr3956276pfa.66.1553181861594; Thu, 21 Mar 2019 08:24:21 -0700 (PDT) Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id z127sm6133602pgb.77.2019.03.21.08.24.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Mar 2019 08:24:21 -0700 (PDT) Date: Thu, 21 Mar 2019 08:24:15 -0700 From: Stephen Hemminger To: Xiaolong Ye Cc: dev@dpdk.org, Qi Zhang , Karlsson Magnus , Topel Bjorn Message-ID: <20190321082415.1dc0a2b9@shemminger-XPS-13-9360> In-Reply-To: <20190321091845.78495-2-xiaolong.ye@intel.com> References: <20190301080947.91086-1-xiaolong.ye@intel.com> <20190321091845.78495-1-xiaolong.ye@intel.com> <20190321091845.78495-2-xiaolong.ye@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 1/5] net/af_xdp: introduce AF XDP PMD driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Message-ID: <20190321152415.qG68iI54GiM5P6PqbDcrOQ-14M_Hf8LJAG7_jO7AxdA@z> 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?"