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 DE2DDA09D3; Thu, 12 Nov 2020 16:44:03 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8589D592C; Thu, 12 Nov 2020 16:44:01 +0100 (CET) Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) by dpdk.org (Postfix) with ESMTP id F23D0592B for ; Thu, 12 Nov 2020 16:43:58 +0100 (CET) Received: by mail-qk1-f195.google.com with SMTP id r7so5646428qkf.3 for ; Thu, 12 Nov 2020 07:43:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=v5kFEGGXq2KmO+IW27/SHNX0+E1UHIgr7dmETsbR+QE=; b=jGKmcZEqA7AFxXGkeZBEBfCM9mIzUwgq2BJzRynlNUs7MNgqHao2iwIS7EsAN8V2xZ kL6RCupCE/l4/Oudd61Wufjjn4mrhbs2iG9K1A8Hd7TrvPcY/rGYYKJNm+0oM4HJPctR BOv+qFIHZB2j6XsjtPvZJZG4wDsor59nMlwqNNXKOIOlidSBrxk7U3uMUlEXfT7GtGMf odaIx4NgbWGLIJegPVWnYHDX0lBTzsylEl/ZzzEiBtPUPLWSAFJIYLQt4dD+PGbdDgv7 o+PU5NQnv3lbNijgFPH6iMuc8P0HXZi6wG1BZhIgU7ZMP9C0r26QdLUANJhVVUoqIoUF k0HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=v5kFEGGXq2KmO+IW27/SHNX0+E1UHIgr7dmETsbR+QE=; b=o7Vg1LLysWWBDlGHuzlQuBkzLX1UtLhBeCH3MDFt5VAP3i33qIt5eYSxK2s0tUL4++ jK61kptCFEWUvm6I9oQdQ2PMg+gixNoaOkw2tUT3qV5CjTI9N6kU6JrMUW9/dGtNaHDA 2JXme422Tm/l1tn4tYxCsV11f0uqv1dYpwqvcVUnFZRWm1/UZskwzp4NKHjtwhWxHhIe AmR0LruOVAVKhLpzZT4nS8u4k+5x63etbUg5L7irWSAq1wEzWFcWDy0HLVj3YJ+DtZeT yqBHs6kb2WWokDRiHwMYz6HUIIhxApu9/0mgS2oJSjdtyUhPbQuhyukweM5/jfpymu+K +0Ew== X-Gm-Message-State: AOAM531L2espaVhasalCFnW9LOBkxywdTG4Vvz7ZFqlqzlhNMiaRdbJr LZCip4SQgTBBN88m2zaAiWaNUkGa8eWidD/wPnA8VQ== X-Google-Smtp-Source: ABdhPJymXbkUPuHjOWdc54ZV31WeRQ8FUy6TjJxirdZ4bu6nhUyFHDE+TKc5oiNM0geG6zoJx/yYW1M/bi7WsCXPpwM= X-Received: by 2002:a05:620a:7ea:: with SMTP id k10mr361208qkk.292.1605195838405; Thu, 12 Nov 2020 07:43:58 -0800 (PST) MIME-Version: 1.0 References: <20201110140938.15046-1-maxime.leroy@6wind.com> <20201110140938.15046-2-maxime.leroy@6wind.com> In-Reply-To: From: Maxime Leroy Date: Thu, 12 Nov 2020 16:43:47 +0100 Message-ID: To: Slava Ovsiienko Cc: Matan Azrad , Shahaf Shuler , "dev@dpdk.org" , "NBU-Contact-N?lio Laranjeiro" Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 1/4] Revert "net/mlx5: fix Rx queue count calculation" 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, On Wed, Nov 11, 2020 at 8:51 PM Slava Ovsiienko wrote: > > Hi, Maxime > > Thanks a lot for the patch. There is the comment for the entire series. > > [1]_____ > > > > First issue, when there are more than 8 CQEs to uncompress, the computation > > done in this commit cannot work. Because the zip-ai variable describes the > > current index inside the CQE8 array and thus is limited from 0 to 7 included. So > > if we are decompressed the 9 packets, ai is 0. So in this case, n is equals to > > cqe_cnt - 0. > > > > Example with 11 packets we will have: > > C | a | e0 | e1 | e2 | e3 | e4 | e5 | C | a | e0 > > > 1. ai is not index in the array (just tree lsbs of ai). It is an index of the miniCQE being processed > in the compressed session and is in the range [0 . .zip.cqe_cnt-1]. In your example there will be > two compressed sessions. The bug was we corrected each compressed session for the ai of the > first one (in processing that we were). The name of the variable (i.e. array index) has confused me. But you are right. > > [2]_____ > > /* if we are processing a compressed cqe */ > > if (zip->ai) { > >- used = zip->cqe_cnt - zip->ca; > > cq_ci = zip->cq_ci; > >+ cq_end = cq_ci + zip->cqe_cnt; > >+ cq_cur = zip->ca + zip->ai; > >+ used = cq_end - cq_cur; > > } else { > > used = 0; > > cq_ci = rxq->cq_ci; > > Sorry, it seems to be incorrect. > zip->cq_ci is the index of the NEXT CQE, following the compressed session being processed. > zip->ai is index of miniCQE being processed. "used" should be calculated much simple: > > used = zip->cqe_cnt - zip->ai You are right. > > [3]_____ > - if (dev->rx_pkt_burst == NULL || > - dev->rx_pkt_burst == removed_rx_burst) { > + if (dev->rx_pkt_burst != mlx5_rx_burst) { > > In this way, we cut the support for other rx_burst routines, we should restore. > > [4]______ > I'am OK with Didier patch "net/mlx5: fix Rx descriptor status returned value" > > I see you wrote the luxury commit messages, and I'm crying with bloody tears about what I'm going to ask you for - > could we squash the series in to single commit? Or at least two - Didier and yours? > > With best regards, Slava > I have just sent a V2 version fixing all these points. Best regards, Maxime Leroy > >