From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb0-f193.google.com (mail-yb0-f193.google.com [209.85.213.193]) by dpdk.org (Postfix) with ESMTP id 639C69E7 for ; Thu, 8 Sep 2016 17:30:20 +0200 (CEST) Received: by mail-yb0-f193.google.com with SMTP id g5so1115043yba.1 for ; Thu, 08 Sep 2016 08:30:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=7WDKO7sl9g+4A03VPLeiFvcL/WlHgMKCMHxvEnp7ctA=; b=kd2puP152OhncM/2wcHptjS/trY3IL4dex8+obgj0AGuggPAc4MJtRWQdc+Z+QCuPj srzNCLbKZfoLzgzhGO8n1Koc5DymbaMfH1+GEFFX8YgII36+E/ZPMaTSfT0rYckQWf+x HhL7t11s5T6X2iRsBSgz8FgCx1/VBk5wMqiWFZb3LoTJVjaNc3SsxsgRYnRC/EQBSJdr Wlk7cN+CJXKTk/9X3y1qyZI24Glc17lNmPD0CpiMym1kHMR/Kx4PwA/FQB3hYvP7jY9X HPi8Wf2mQHYnvXhsRz9+Q0pkR6gxzFrghys13IYX1KgNdAz+i+u3Yi7ops5ePEhLVW/w 7TvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=7WDKO7sl9g+4A03VPLeiFvcL/WlHgMKCMHxvEnp7ctA=; b=jCZ9P+KendISJnM2pQ3kfUsSZ1zeECRPS4/CKV8ad8eijnCv5+klfh+yrDAgcMcN/p bET6cGkMayXpk/WAMu93peSEiq6FPyYf+TnmpbnVCTfK89+Iw4xiH2V7SjuQIs9k1BPZ 3i6yfGkA3G5LR+8HLKyNJYIHAUI6ykNWydCHiyXJ8eH/EJ1czWAAk20LMr0q8w/taKHm wWb152sQxMnnd0o/0QYdheenQkVpiD0BmrBYF95dyVx2NQbEvcfDg14wYW6YWwGsOBK0 QM1MqOiQdT56qixCU6HbNlG+Pjg3+8LfpRyngyBs7p8I36Aib0x0+SLSlU9h3f7Awyo/ vS1w== X-Gm-Message-State: AE9vXwM8Ra1P6WxtlkKheZhw1blufEnTaRRYPSWXCtqZO0mnCGVHOnRAOpFG1klYqhkSRRLiR3/kQdtXxCF1mg== X-Received: by 10.37.5.11 with SMTP id 11mr307906ybf.100.1473348619840; Thu, 08 Sep 2016 08:30:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.224.132 with HTTP; Thu, 8 Sep 2016 08:29:59 -0700 (PDT) In-Reply-To: <1dbf4474-40de-428f-1d17-e73709e642b2@6wind.com> References: <1473344895-18491-1-git-send-email-h.mikita89@gmail.com> <39302a3a-9662-7f75-db3b-e7dd4244c32f@intel.com> <1dbf4474-40de-428f-1d17-e73709e642b2@6wind.com> From: Hiroyuki Mikita Date: Fri, 9 Sep 2016 00:29:59 +0900 Message-ID: To: Olivier Matz Cc: Ferruh Yigit , dev@dpdk.org Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-dev] [PATCH] mempool: fix check flags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2016 15:30:20 -0000 Sorry, I did not notice the same kind of patch. I close this patch. Hiroyuki 2016-09-08 23:46 GMT+09:00 Olivier Matz : > Hi Hiroki, Ferruh, > > On 09/08/2016 04:44 PM, Ferruh Yigit wrote: >> On 9/8/2016 3:28 PM, Hiroyuki Mikita wrote: >>> fix check flags in case of single producer and single consumer >>> >>> Fixes: 449c49b9 ("mempool: support handler operations") >>> >>> Signed-off-by: Hiroyuki Mikita >>> --- >>> lib/librte_mempool/rte_mempool.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c >>> index 2e28e2e..61bd63c 100644 >>> --- a/lib/librte_mempool/rte_mempool.c >>> +++ b/lib/librte_mempool/rte_mempool.c >>> @@ -879,7 +879,7 @@ rte_mempool_create(const char *name, unsigned n, unsigned elt_size, >>> * Since we have 4 combinations of the SP/SC/MP/MC examine the flags to >>> * set the correct index into the table of ops structs. >>> */ >>> - if (flags & (MEMPOOL_F_SP_PUT | MEMPOOL_F_SC_GET)) >>> + if ((flags & MEMPOOL_F_SP_PUT) & (flags & MEMPOOL_F_SC_GET)) >> >> Isn't this always false? >> >> What about: >> if ((flags & MEMPOOL_F_SP_PUT) && (flags & MEMPOOL_F_SC_GET)) >> >>> rte_mempool_set_ops_byname(mp, "ring_sp_sc", NULL); >>> else if (flags & MEMPOOL_F_SP_PUT) >>> rte_mempool_set_ops_byname(mp, "ring_sp_mc", NULL); >>> >> > > Looks the same kind of patch was posted few hours before: > http://dpdk.org/dev/patchwork/patch/15686/ > > Regards, > Olivier