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 AF5FFA04B6 for ; Thu, 10 Sep 2020 13:23:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 914351C0D4; Thu, 10 Sep 2020 13:23:40 +0200 (CEST) Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by dpdk.org (Postfix) with ESMTP id 105031BEB3 for ; Thu, 10 Sep 2020 13:23:38 +0200 (CEST) Received: by mail-qk1-f193.google.com with SMTP id n133so5568648qkn.11 for ; Thu, 10 Sep 2020 04:23:37 -0700 (PDT) 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=bYwdI7oe/xApcUTSsHFdV58ZvDcZ5A3tOlXbsbQhEe0=; b=dnnxfr0j0liOYELSWR8zX67r8Fy6AAK+pKWbujjOEqQQ7ZbWn3H2wzLJesl2+wSgMc h2BJdyFzZ2AKhtszyCe2eDyHlc/fFKUtYA5DyelQ9QhgELtcsXrSfk4UaN3AkLkQv1+O ai7HrkgN8EqC2fTNZ2g5v1kvGXx7d6L1GoB7rDErAqtIXVdroKdII06rgvIkDSgLaLAW yDZR22Ysvmk1ksitFUPZAdWOYwf0v1kdKnm04BRms+KjcSeraq8klsysgaTjDO50+nIw DUz9D3SHSde2cvruiaweaqsskO83P14bq6Bzdds3ua6iN7rGFyTqIRyD7E2kQ4rO0ydk 3fNg== 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=bYwdI7oe/xApcUTSsHFdV58ZvDcZ5A3tOlXbsbQhEe0=; b=WgpeYm+ceOT/9HXZvSpo5wYCN0fXMJTONc0S18elwjcQoVfzEuWQ43dwb+iindVQ/j 8xEew/lcwX0Y/Ds57ioNVuKMJK8LJFZL53PkzhHasU7l86La604EsuCJR9/kRUMw5cr/ nkCB+hcvpGK4z4zh91VgNqO3TPahZVswUNXAnROy7u5GtgjgBOOlDtdCX/IPQQMsAW9x 7gK8kxOz5SL/IfG7Q2k3nLcHpc+l/3RhUWHH1vsWAaxCw5DXOfsi0QytuX3MB5muwoGz 3FxEVtSemaGncZPBJEqaOrllJseqC8PtIzQk9n9MSGgBPswiz0KhJXOkcnRDeM/BLKLT L90g== X-Gm-Message-State: AOAM5334ddmH7oc9bqyAnh/YqPdX59VuFrLHc2XB2Yk7NMod8OXeSHAz L2Bbk9RzrJFlk5lUnE14hrUdL0YjyjtK/0jk+bJWzbXlLc0= X-Google-Smtp-Source: ABdhPJz66fOgzbjX5jAjaxWGBDgiNnkUvMKAsUPbnlIjfDKhPGconbnC9/dhrcsbijAaTYRuFf04smln76wgmfeL40s= X-Received: by 2002:a05:620a:89e:: with SMTP id b30mr7645950qka.231.1599737017491; Thu, 10 Sep 2020 04:23:37 -0700 (PDT) MIME-Version: 1.0 References: <20200716104320.10582-1-maxime.leroy@6wind.com> In-Reply-To: <20200716104320.10582-1-maxime.leroy@6wind.com> From: Maxime Leroy Date: Thu, 10 Sep 2020 13:23:26 +0200 Message-ID: To: Raslan Darawsheh Cc: stable@dpdk.org, dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [PATCH] net/mlx5: fix rss reta is reset when device is started X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi Raslan, Any comment/review on the fix ? Regards, Maxime On Thu, Jul 16, 2020 at 12:43 PM Maxime Leroy wrote: > > The following sequences was working fine on mlx5: > rte_eth_dev_configure(portid, ...); > > for (queueid = 0; queueid < nb_txq; queueid++) > rte_eth_tx_queue_setup(portid, queueid, ...); > > for (queueid = 0; queueid < nb_rxq; queueid++) > rte_eth_rx_queue_setup(portid, queueid, ...); > > // use a custom reta configuration > rte_eth_dev_rss_reta_update(portid, reta_conf, reta_size); > rte_eth_dev_start(portid); > > We were able to configure a custom reta before starting the port. > > The commit "net/mlx5: support RSS on hairpin" breaks this logic by > moving the code initializing the RSS reta from rte_eth_dev_configure > into rte_eth_dev_start. > > To fix the issue, the skip_default_rss_reta is always set to 1 in > rte_eth_dev_rss_reta to avoid reconfigure the rss reta when the device > is started. > > Fixes: 63bd16292c3a ("net/mlx5: support RSS on hairpin") > Signed-off-by: Maxime Leroy > --- > drivers/net/mlx5/mlx5_rss.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c > index 653b0691..6f75ece2 100644 > --- a/drivers/net/mlx5/mlx5_rss.c > +++ b/drivers/net/mlx5/mlx5_rss.c > @@ -220,9 +220,11 @@ mlx5_dev_rss_reta_update(struct rte_eth_dev *dev, > MLX5_ASSERT(reta_conf[idx].reta[pos] < priv->rxqs_n); > (*priv->reta_idx)[i] = reta_conf[idx].reta[pos]; > } > + > + priv->skip_default_rss_reta = 1; > + > if (dev->data->dev_started) { > mlx5_dev_stop(dev); > - priv->skip_default_rss_reta = 1; > return mlx5_dev_start(dev); > } > return 0; > -- > 2.27.0 >