From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v1] ixgbe/vector: add rxd 2^n check to avoid mbuf leak Date: Thu, 05 Mar 2015 20:00:32 +0100 Message-ID: <11499499.PraFdaBCNG@xps13> References: <1425302904-32449-1-git-send-email-cunming.liang@intel.com> <20150305114439.GA1504@bricha3-MOBL3> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Cunming Liang Return-path: In-Reply-To: <20150305114439.GA1504@bricha3-MOBL3> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" > > 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