From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C60DCA0C45; Mon, 13 Sep 2021 14:11:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B071540151; Mon, 13 Sep 2021 14:11:25 +0200 (CEST) Received: from mail-108-mta249.mxroute.com (mail-108-mta249.mxroute.com [136.175.108.249]) by mails.dpdk.org (Postfix) with ESMTP id F2FC24014F for ; Mon, 13 Sep 2021 14:11:22 +0200 (CEST) Received: from filter004.mxroute.com ([149.28.56.236] filter004.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta249.mxroute.com (ZoneMTA) with ESMTPSA id 17bdf119fb000074ba.001 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Mon, 13 Sep 2021 12:11:19 +0000 X-Zone-Loop: 56560537ec011e85707271976ead719283301cd58733 X-Originating-IP: [149.28.56.236] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ashroe.eu; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=39kNO+/ll4gDgXpdKzMpnoQOdrqjvL8lH9m9+rInkBI=; b=gtYn1Arnx//uhYdADK5HCrqwql fDdPth5BM8UB9ZKtmv8UFvfVNvidltVq5Bz9pmWQEsnT/XJP08C2ewthOJtTUYwgAnzmU5pqHu36W Vq6mBvFzco/ytVIuTpaKtz6vWnVoSLgjEgckTeX86kzNazDfDs3PIdDKIzTpP4UAGksKfGgXTgeud LMbiq2Q5DroTwLaBz8FGviPpos/p6nkvMoR9e8o7lA56vcRZ7kALaC2JJG95zJs8wB/lxIJDvYqTy mZbr7SAUWjvYPIggCN5lvf07xltj2/s0zIPmvA6bHeENHYwzkbR6VUhc8Qw7xsuLZedRsiYnhEJYC SKzLDd/Q==; To: Rongwei Liu , matan@nvidia.com, viacheslavo@nvidia.com, orika@nvidia.com, thomas@monjalon.net Cc: dev@dpdk.org, rasland@nvidia.com, Jiawei Wang References: <20210910042347.12820-1-rongweil@nvidia.com> <20210910042347.12820-2-rongweil@nvidia.com> From: "Kinsella, Ray" Message-ID: Date: Mon, 13 Sep 2021 13:11:15 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20210910042347.12820-2-rongweil@nvidia.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-AuthUser: mdr@ashroe.eu Subject: Re: [dpdk-dev] [RFC 1/1] net/mlx5: set txq affinity in round-robin X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" On 10/09/2021 05:23, Rongwei Liu wrote: > Previously, we set txq affinity to 0 and let firmware > to perform round-robin when bonding. Firmware uses a > global counter to assign txq affinity to different > physical ports accord to remainder after division. > > There are three dis-advantages: > 1. The global counter is shared between kernel and dpdk. > 2. After restarting pmd or port, the previous counter value > is reused, so the new affinity is unpredictable. > 3. There is no way to get what affinity is set by firmware. > > In this update, we will create several TISs up to the > number of bonding ports and bind each TIS to one PF port. > > For each port, it will start to pick up TIS using its port > index. Upper layer application can quickly calculate each txq's > affinity without querying. > > At DPDK layer, when creating txq with 2 bonding ports, the > affinity is set like: > port 0: 1-->2-->1-->2 > port 1: 2-->1-->2-->1 > port 2: 1-->2-->1-->2 > > Note: Only applicable to Devx api. > > Signed-off-by: Jiawei Wang > Signed-off-by: Rongwei Liu > --- > drivers/common/mlx5/mlx5_devx_cmds.c | 38 ++++++++++++++++++++++ > drivers/common/mlx5/mlx5_devx_cmds.h | 12 +++++++ > drivers/common/mlx5/mlx5_prm.h | 26 +++++++++++++++ > drivers/common/mlx5/version.map | 1 + > drivers/net/mlx5/linux/mlx5_os.c | 37 ++++++++++++++++++++++ > drivers/net/mlx5/mlx5.c | 17 +++------- > drivers/net/mlx5/mlx5.h | 8 ++++- > drivers/net/mlx5/mlx5_devx.c | 47 ++++++++++++++++++++++++++-- > drivers/net/mlx5/mlx5_tx.h | 1 + > drivers/net/mlx5/mlx5_txpp.c | 4 +-- > 10 files changed, 174 insertions(+), 17 deletions(-) > Acked-by: Ray Kinsella