From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 201D9A04B5; Thu, 29 Oct 2020 12:29:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 41BD9CA65; Thu, 29 Oct 2020 12:29:15 +0100 (CET) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 6DDC4CA5C for ; Thu, 29 Oct 2020 12:29:12 +0100 (CET) Received: by mail-wr1-f67.google.com with SMTP id n18so2352210wrs.5 for ; Thu, 29 Oct 2020 04:29:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=/8r/Z7yBZk7Fjhdds4BSZ2lOaTgjSE0RLiCmKQ+EOEo=; b=CfeRiMUE3ZBAgSQo49EoEXeTAgWFRi9ttZDrPXpY35GJd/LoYcMAL05Xn4vAA8RmZb UxzcaHfeqihL++udi5APtW96LUvYIgave/+dFup/utO89behF62/6Xo9Ex+dKUnhJnZV uNCoZAd1LBxfZlsXvh3ycjjxTZzYRRjYNIUoAhvAM4Wo6RfFV4wplHYEWB3iBUmEujbH ZTN3yC7Qeqb+PH0x2D5FQTlVcxIzhYwY1xy4JgLBI8W8aRLi+mE5+B7/uAh+0fZF61tS 36hDvAZ+4gl3L1W6RbfKON/wHwlgwKESIX7/aaQXutDui1d24j9DJ9+kAJ52YT8J/ugo 3Z+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=/8r/Z7yBZk7Fjhdds4BSZ2lOaTgjSE0RLiCmKQ+EOEo=; b=eY9OGJE7eUoPVZIC/9EcZ9j9k4o6TEJEmAZ8YDld0MeE55NuUllAWReoSQJKo2j/5u G9uiUC6/B9p5pivsqygTeIBDF4AW1uoSJAY6JHMwQsUp4Tfq50dPLIrIKmqIOiW/ydMM d1dTzvW9UqMnvbrGpbFttDvtR9njPY5mlQ9y4NGD3eOvBAyrt+FqQs/RPerxhz04HSRH yf4Nh5lKsWZDstqYbfFMKorocF58+6TIreWRmjzHNmB7XH9EUWX1xS768Y/OYF7dUVhe tOAlB14M4DLk0qIEjJfnTtzg+c56lXANa0HwdPEgcNdLbYkGzExvnaWkI5SgxuwLmjcy IinA== X-Gm-Message-State: AOAM532Zoof3gZ2AIu6HkIA/8aYjh/7hV2rIG/l+iDdPAgaaT/GAL6Ph 070pDn6hFwOgoEANe6ZE82sdwQ== X-Google-Smtp-Source: ABdhPJzLlXuqDaih4TJT3ta+Uhh4DRwpcIt1Uj8ifIL1b5VYOJMRJSQ0wi6Jj/1BH8vXwc1G/a35MQ== X-Received: by 2002:adf:bb43:: with SMTP id x3mr5047583wrg.250.1603970951148; Thu, 29 Oct 2020 04:29:11 -0700 (PDT) Received: from [10.16.0.101] (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id p9sm3756589wma.12.2020.10.29.04.29.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Oct 2020 04:29:10 -0700 (PDT) To: Slava Ovsiienko Cc: "dev@dpdk.org" , "stable@dpdk.org" , Matan Azrad References: <20200313095659.19000-1-didier.pallard@6wind.com> From: Didier Pallard Message-ID: Date: Thu, 29 Oct 2020 12:29:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix Rx descriptor status returned value 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" Hi slava, Is this fixed in main branch now? If yes could you please point me out the proper commit? Thanks Didier On 3/17/20 10:25 AM, Slava Ovsiienko wrote: > > *From:* Didier Pallard > *Sent:* Tuesday, March 17, 2020 11:19 > *To:* Slava Ovsiienko > *Cc:* dev@dpdk.org; stable@dpdk.org; Matan Azrad > *Subject:* Re: [dpdk-dev] [PATCH] net/mlx5: fix Rx descriptor status > returned value > > >>>well, please do if you don't mind, > > OK, I will. > > >>>You will validate it quicker, and I'm currently working on a > different topic. > > >>>Btw, do you think it's possible to have an implementation of > [r,t]x_status_descriptor functions for vectorized implementation? > > >>>thanks > > Yes, we are planning this update. > > With best regards, Slava > > didier > > On Tue, Mar 17, 2020 at 9:33 AM Slava Ovsiienko > > wrote: > > >> From: Didier Pallard > > >> Sent: Monday, March 16, 2020 19:24 > >> To: Slava Ovsiienko > > >> Cc: dev@dpdk.org ; stable@dpdk.org > ; Matan Azrad > > >> Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix Rx descriptor > status returned value > >> Well, you're right, another way to fix the problem could be to > set up the queue size assuming the provided number > >> is a number of packets in queue rather than a number of mbufs > in queue. > > Yes, it is intended in queue setup routine. But, for mlx5 we have > a bug for regular mlx5_rx_burst if scattering is enabled, > the Rx queue is created with size wqe_n elements, should be wqe_n > << sges_n instead, to be able to receive the requested > number of packets (wqe_n). I think we must fix. Would you like to > update your patch, or should I provide mine? > > >> But not sure it's better, it's also important for the > application/user to know the number of mbufs that could fit in a > rx/tx queue, > >> whatever the number of packets that it covers, since it is very > important to size the memory pools correctly to avoid any > >> mbuf shortage during system life. > >> Thanks > >> Didier > To estimate - the number of "DPDK descriptors" should be > multiplied by the maximal length of scattered packet chain. > > With best regards, Slava > > > -----Original Message----- > > From: dev > On Behalf Of Didier Pallard > > Sent: Friday, March 13, 2020 11:57 > > To: mailto:dev@dpdk.org > > Cc: mailto:stable@dpdk.org > > Subject: [dpdk-dev] [PATCH] net/mlx5: fix Rx descriptor status > returned value > > > > Two bugs in rx_queue_count function: > > - One entry may contain several segments, so 'used' must be > multiplied > >   by number of segments per entry to properly reflect the queue > usage. > > - rx_queue_count returns the number of entries used in queue, so > it ranges > >   from 0 to max number of entries in queue, not this number minus > >   one. > > > > Fixes: 8788fec1f269 ("net/mlx5: implement descriptor status API") > > Cc: mailto:stable@dpdk.org > > Signed-off-by: Didier Pallard > > > --- > >  drivers/net/mlx5/mlx5_rxtx.c | 2 +- > >  1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/mlx5/mlx5_rxtx.c > b/drivers/net/mlx5/mlx5_rxtx.c index > > 5ac63da8039d..17f80c25443e 100644 > > --- a/drivers/net/mlx5/mlx5_rxtx.c > > +++ b/drivers/net/mlx5/mlx5_rxtx.c > > @@ -500,7 +500,7 @@ rx_queue_count(struct mlx5_rxq_data *rxq) > >               used += n; > >               cqe = &(*rxq->cqes)[cq_ci & cqe_cnt]; > >       } > > -     used = RTE_MIN(used, (1U << rxq->elts_n) - 1); > > +     used = RTE_MIN(used * (1 << rxq->sges_n), 1U << rxq->elts_n); > >       return used; > >  } > > > > -- > > 2.24.1 >