From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id 6CAB05690 for ; Thu, 5 Mar 2015 20:01:08 +0100 (CET) Received: by wghl2 with SMTP id l2so11600264wgh.8 for ; Thu, 05 Mar 2015 11:01:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=2o8oBqdnj67mbsz93AY+To5akjvEEWc4oee+kxJbf3U=; b=GalBpVbxRIrdGM1Guof/1+zosesF3NKWeW18eGalyZsrYtyuUbNZsIrdBivHEuLPRM ehXJdfKSvITdlLGZyRFKZ4Vz487/DPQ1LnTzAoEMf7/LPz+VYY4BTViGaTwOOza1qNnq jlqocCuVa4kL7ELbwPZiifQD4tZC4Xj93w9mOvm8uSmHwe+OHp8z1vDzj8/FtD8YgEvG IHruueIpYc9sIWsEuX8b2d3v9fHtxtbiPtDIFUCb4YNWZgIW762W155ymlf8VCkmyWpz GZ+04s3iF4kkKWKB4+nymi75tepqhCeoBsZLnwTnqCkLIeKhRJJ++4/jUUziFr397E0S EnpQ== X-Gm-Message-State: ALoCoQmhZhr5o8ZUJR54aaEKp8/Kmi261/bu2nCgukzN6gVm+3UdjjD10HuXznP12OcRSnVYFvdv X-Received: by 10.180.219.102 with SMTP id pn6mr24992623wic.50.1425582068151; Thu, 05 Mar 2015 11:01:08 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id dx11sm11717177wjb.23.2015.03.05.11.01.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Mar 2015 11:01:07 -0800 (PST) From: Thomas Monjalon To: Cunming Liang Date: Thu, 05 Mar 2015 20:00:32 +0100 Message-ID: <11499499.PraFdaBCNG@xps13> Organization: 6WIND User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; ) In-Reply-To: <20150305114439.GA1504@bricha3-MOBL3> References: <1425302904-32449-1-git-send-email-cunming.liang@intel.com> <20150305114439.GA1504@bricha3-MOBL3> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v1] ixgbe/vector: add rxd 2^n check to avoid mbuf leak 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, 05 Mar 2015 19:01:08 -0000 > > The mbuf leak happens when the assigned number of rx descriptor is not power of 2. > > As it's presumed on vpmd rx(for rx_tail wrap), adding condition check to prevent it. > > The root cause reference code in *_recv_raw_pkts_vec* as below. > > "rxq->rx_tail = (uint16_t)(rxq->rx_tail & (rxq->nb_rx_desc - 1));". > > > > Reported-by: Stephen Hemminger > > Signed-off-by: Cunming Liang > Acked-by: Bruce Richardson Applied, thanks