From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ophirmu@mellanox.com>
Received: from EUR03-AM5-obe.outbound.protection.outlook.com
 (mail-eopbgr30078.outbound.protection.outlook.com [40.107.3.78])
 by dpdk.org (Postfix) with ESMTP id D280E1B7F7
 for <dev@dpdk.org>; Tue, 24 Oct 2017 22:36:54 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com;
 s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;
 bh=xzq7L0BVzRQYZOOb92FKBmoaMkEgaS3L0grfDMIslpY=;
 b=wRXfs20h0XvP7FFt54/gP7fjkpBCm3kD6l3nvxYlK+iHQajmUIHBB9TKsmXlAmkIX8etnaVBZKgfjUBedsYf+4MxY/TzUO7Ne+3oqEP/wIy4d5Xo5iTTJHe8liwkfiLDagzePmfQ5FcnDxhYGHDunIEwkxJmWprf83w34eK72pw=
Received: from DB5PR05MB1254.eurprd05.prod.outlook.com (10.162.157.140) by
 DB5PR05MB1256.eurprd05.prod.outlook.com (10.162.157.142) with Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id
 15.20.156.4; Tue, 24 Oct 2017 20:36:52 +0000
Received: from DB5PR05MB1254.eurprd05.prod.outlook.com
 ([fe80::69a8:7948:e0cb:c16e]) by DB5PR05MB1254.eurprd05.prod.outlook.com
 ([fe80::69a8:7948:e0cb:c16e%13]) with mapi id 15.20.0156.007; Tue, 24 Oct
 2017 20:36:52 +0000
From: Ophir Munk <ophirmu@mellanox.com>
To: =?iso-8859-1?Q?N=E9lio_Laranjeiro?= <nelio.laranjeiro@6wind.com>
CC: Adrien Mazarguil <adrien.mazarguil@6wind.com>, "dev@dpdk.org"
 <dev@dpdk.org>, Thomas Monjalon <thomas@monjalon.net>, Olga Shern
 <olgas@mellanox.com>, Matan Azrad <matan@mellanox.com>
Thread-Topic: [dpdk-dev] [PATCH v2 4/7] net/mlx4: merge Tx path functions
Thread-Index: AQHTTApw+/fUqMGF4EysJ6xZ/EctD6LzBmWAgABt3FA=
Date: Tue, 24 Oct 2017 20:36:52 +0000
Message-ID: <DB5PR05MB1254D9B4C27C02D4512D56E3D1470@DB5PR05MB1254.eurprd05.prod.outlook.com>
References: <1508752838-30408-1-git-send-email-ophirmu@mellanox.com>
 <1508768520-4810-1-git-send-email-ophirmu@mellanox.com>
 <1508768520-4810-5-git-send-email-ophirmu@mellanox.com>
 <20171024135149.fyg4nzcbygo2amtz@laranjeiro-vm>
In-Reply-To: <20171024135149.fyg4nzcbygo2amtz@laranjeiro-vm>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: spf=none (sender IP is )
 smtp.mailfrom=ophirmu@mellanox.com; 
x-originating-ip: [93.173.17.154]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; DB5PR05MB1256;
 6:Epc1pTNXHCDSte8gcym+53H541nAxul5hUWp7lD14q3x2+DDm+4MugWlItvjNZXu8NKLu0ADEVB7DTz5XIovaJinPFNGJ+wANwYQfdF9C8pHf0iVgaQwqzJrMm4kmPpuYwKV2VM5PxN3L1+/I5aV1z5D2c/FYoi1yYezWXQnefe9nCe7sw+g33yZUmHNTB6HziF63cAWl/psTbaic6CmSHeQ7GOF8WHE4i34ghThSzxt9hAqGhUSeyTaAACqgCcFDK7ACwb8pZM9VkMUpcxBUYaGeeJPpxAqPPtxc+XQh6mg3XJ0uSdfnJwK1F/TtyHUgz/fwPW7jSHC6aHlpENnDg==;
 5:CI9RsAw4FBdms4FYB4USJkrEd0vNQ1EoafwSU09liEQInID7xfZAgAQeHQ45m0YujtIs7exPOkBu6UW4+/YF5GCmDqFQsZgLXB2XH5qkoDJx2f4c6uczsbtukns4aYMSWgHfueTVo7jjdo5D5iZ3EA==;
 24:XfedUUJ0PxNsqDYFBah4uiT24gOrGhtcdD58CHD0NR8tjfVdXHJlJlTU0Rigx7YBLy27umE0uaDiChlM+QMnjetFAw/3aBs+GAHPsBYRE+0=;
 7:l1d6RsKnqHMei53cezkiUM82+Dms3hCTUpoVbfAKM0CiVrzPGpUkhvf7mgcnZT4d5KnCrhLbVYw2CUmsjr0J6bLj/4EIlPWxSPMyL/sVgTN/+Ki8nIoZa79gXOQj7WfOlPikE7KLmDLzX4Hrx0OXgOe6x33AZECAHf4Nn6hiLB5Cgu4ZetbZOm9H29SwatNkVaiXdBxIiMZw3ECb0+S1slpVkDa2Cp2ZxqgIQ5ugsyM=
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-correlation-id: ca24ad14-76e5-4b0f-06f6-08d51b1ef55d
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0;
 RULEID:(22001)(48565401081)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603199);
 SRVR:DB5PR05MB1256; 
x-ms-traffictypediagnostic: DB5PR05MB1256:
x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr
x-exchange-antispam-report-test: UriScan:;
x-microsoft-antispam-prvs: <DB5PR05MB1256226E7D2B5F768158317BD1470@DB5PR05MB1256.eurprd05.prod.outlook.com>
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0;
 RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3231020)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3002001)(6055026)(6041248)(20161123555025)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);
 SRVR:DB5PR05MB1256; BCL:0; PCL:0;
 RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);
 SRVR:DB5PR05MB1256; 
x-forefront-prvs: 047001DADA
x-forefront-antispam-report: SFV:NSPM;
 SFS:(10009020)(6009001)(39860400002)(376002)(346002)(199003)(189002)(24454002)(102836003)(6116002)(53546010)(68736007)(316002)(3846002)(189998001)(54906003)(93886005)(5250100002)(81166006)(3660700001)(8676002)(478600001)(97736004)(14454004)(81156014)(86362001)(66066001)(107886003)(55016002)(99286003)(6246003)(33656002)(6916009)(2906002)(229853002)(2950100002)(6506006)(2900100001)(8936002)(25786009)(3280700002)(76176999)(50986999)(5660300001)(4326008)(105586002)(54356999)(106356001)(7736002)(74316002)(305945005)(9686003)(53936002)(101416001)(6436002)(7696004);
 DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR05MB1256;
 H:DB5PR05MB1254.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords;
 A:1; MX:1; LANG:en; 
received-spf: None (protection.outlook.com: mellanox.com does not designate
 permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: Mellanox.com
X-MS-Exchange-CrossTenant-Network-Message-Id: ca24ad14-76e5-4b0f-06f6-08d51b1ef55d
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Oct 2017 20:36:52.0245 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR05MB1256
Subject: Re: [dpdk-dev] [PATCH v2 4/7] net/mlx4: merge Tx path functions
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 24 Oct 2017 20:36:55 -0000

Hi,

On Tuesday, October 24, 2017 4:52 PM, N=E9lio Laranjeiro wrote:
>=20
> On Mon, Oct 23, 2017 at 02:21:57PM +0000, Ophir Munk wrote:
> > From: Matan Azrad <matan@mellanox.com>
> >
> > Merge tx_burst and mlx4_post_send functions to prevent double asking
> > about WQ remain space.
> >
> > This should improve performance.
> >
> > Signed-off-by: Matan Azrad <matan@mellanox.com>
> > ---
> >  drivers/net/mlx4/mlx4_rxtx.c | 353
> > +++++++++++++++++++++----------------------
> >  1 file changed, 170 insertions(+), 183 deletions(-)
>=20
> What are the real expectation you have on the remaining patches of the
> series?
>=20
> According to the comment of this commit log "This should improve
> performance" there are too many barriers at each packet/segment level to
> improve something.
>=20
> The point is, mlx4_burst_tx() should write all the WQE without any barrie=
r as
> it is processing a burst of packets (whereas Verbs functions which may on=
ly
> process a single packet). =20

> The lonely barrier which should be present is the
> one to ensure that all the host memory is flushed before triggering the T=
x
> doorbell.
>=20

There is a known ConnectX-3 HW limitation: the first 4 bytes of every TXWBB=
 (64 bytes chunks) should be=20
written in a reversed order (from last TXWBB to first TXWBB).=20
The last 60 bytes of any TXWBB can be written in any order (before writing =
the first 4 bytes).
Is your last statement (using lonely barrier) is in accordance with this li=
mitation? Please explain.

> There is also too many cases handled which are useless in bursts situatio=
n,
> this function needs to be re-written to its minimal use case i.e.  proces=
sing a
> valid burst of packets/segments and triggering at the end of the burst th=
e Tx
> doorbell.
>=20
> Regards,
>=20
> --
> N=E9lio Laranjeiro
> 6WIND