From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0053.outbound.protection.outlook.com [104.47.1.53]) by dpdk.org (Postfix) with ESMTP id B41AD7CB6; Thu, 14 Sep 2017 21:21:59 +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=wM+jelTn0A+MfrTmLLUUD2zgQ+R9GSMJZclu13SA0K4=; b=fDWVSEZTVS7zNe+21sXuSXdIkspAcWygemyJiVqVUX1TFjJtZmgeFjNjqh1Oj+h+Tvrc184DuWj1imwUifP/OA7T+mL2PN+n54P3cGRPZQwQAo5OjJkcR3vM0yJLjU5tbQThcQ46GBdU1rM50bxFRJ/r0y6qAYGtMGxWsLbBS4Q= Received: from VI1PR0501MB2045.eurprd05.prod.outlook.com (10.167.195.147) by VI1PR0501MB2831.eurprd05.prod.outlook.com (10.172.11.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12; Thu, 14 Sep 2017 19:21:57 +0000 Received: from VI1PR0501MB2045.eurprd05.prod.outlook.com ([fe80::7921:ae50:9b96:93ba]) by VI1PR0501MB2045.eurprd05.prod.outlook.com ([fe80::7921:ae50:9b96:93ba%14]) with mapi id 15.20.0056.010; Thu, 14 Sep 2017 19:21:57 +0000 From: Yongseok Koh To: Shahaf Shuler CC: =?iso-8859-1?Q?N=E9lio_Laranjeiro?= , "Adrien Mazarguil" , "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH v5 4/4] net/mlx5: enforce Tx num of segments limitation Thread-Index: AQHTLUdU5tkcTU/AIE++jphBEkQJyKK0wuYA Date: Thu, 14 Sep 2017 19:21:57 +0000 Message-ID: References: <5046c30c96938a590412ce03dcad1434824cd952.1505385989.git.shahafs@mellanox.com> In-Reply-To: <5046c30c96938a590412ce03dcad1434824cd952.1505385989.git.shahafs@mellanox.com> 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=yskoh@mellanox.com; x-originating-ip: [209.116.155.178] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0501MB2831; 6:Mp4SuLRXwqef1UAuC2/GyQS91yjlY7ffGpP1rSnAlJt9LcKA6pqmrKTStLCtejRjbwuRfnr7EAXxz2godezpQSMMm0Hh4/zoNbZyh+rbftMkGue3Rh0OUYL5qOsed7UcXSAGpoQLJUhnhhBKYj+LygR+r6k9KTUK9SVEroqcGoXswClR3cvuMJxiDxl+rTSnmvcivKoWiRRXJ0BUwkRGQ7Ddswo6LHTZhgwJdhUWIJGMz8AsE7qUje7WsfHD30ZgMzICLsV2z+G4t11qpabzdAq2/WLCyCTFU1zQT5UDmYZXntQyQKefHX+djUUpaqx1xNMZgqQheX3CBcljPj5yEA==; 5:ojBH0WG+LvmHcA5COz5i2w5jx7EYVRJYzWh27DT4FYrgB6XQui/YDGxpt/u/FtVDcFRVt0kRr1AsfQXClLq6b8XiPesahsJOH5XLQeCSQh88Fu3JIJTbNlSbdpkvfkSfCaecp9LegyfYZHyi9ji8LA==; 24:XWPU/QR6+bNS6kyq9DKln4n5MLGSx8IjYZoj5sqS9PJewd6UNREfeFTfvEzsB0QvLoT8szJDl4RxlKLhwG4RnzzRnHkKM3b5wQOUG9QxYx8=; 7:g9rNcGXPjW0v55GSPmafBbA1IQPRbwWcCAaCfh74GQCwHrGkEtl+IWhMqUDnSyUmyw0WokuO1bCFQaCie+2npUea8m1PmYeM4euSUFKvKZffGE0tjejFA+F/+Zgg/mP6BY0/GXuO+E3Ho1foM+nd6pwNkVlinumyUwuVA2g+7IrmGn2LOeoTyGjBxbWJeoVxdIxSloU324c48+BeoA2vnoFLgyU4lP4YHj82mrgdeSs= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-ms-office365-filtering-correlation-id: 662de5b8-6254-49a8-518b-08d4fba5dd8f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:VI1PR0501MB2831; x-ms-traffictypediagnostic: VI1PR0501MB2831: x-exchange-antispam-report-test: UriScan:; x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR0501MB2831; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR0501MB2831; x-forefront-prvs: 0430FA5CB7 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(376002)(346002)(377454003)(24454002)(189002)(199003)(53546010)(97736004)(6636002)(6436002)(229853002)(54356999)(6486002)(101416001)(86362001)(82746002)(76176999)(14454004)(6506006)(5250100002)(50986999)(106356001)(105586002)(53936002)(305945005)(8676002)(7736002)(54906002)(8936002)(81166006)(81156014)(5660300001)(6246003)(66066001)(2950100002)(2900100001)(99286003)(6512007)(6862004)(4326008)(110136004)(68736007)(189998001)(33656002)(478600001)(102836003)(6116002)(2906002)(3660700001)(36756003)(3280700002)(316002)(25786009)(3846002)(83716003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2831; H:VI1PR0501MB2045.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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-ID: <3DDAE171AA65D64A8A5251A4E8B58D18@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Sep 2017 19:21:57.0321 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2831 Subject: Re: [dpdk-stable] [PATCH v5 4/4] net/mlx5: enforce Tx num of segments limitation 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: , X-List-Received-Date: Thu, 14 Sep 2017 19:21:59 -0000 > On Sep 14, 2017, at 3:50 AM, Shahaf Shuler wrote: >=20 > Mellanox NICs has a limitation on the number of mbuf segments a multi > segment mbuf can have. The max number depends on the Tx offloads requeste= d. >=20 > The current code not enforce such limitation, which might cause > malformed work requests to be written to the device. >=20 > This commit adds verification for the number of mbuf segments posted > to the device. In case of overflow the packet will not be sent. >=20 > In addition update the nic documentation with the limitation. > Considering device limitation is 63 data segments in a work request, the > maximum number of segment in mbuf was calculated taking TSO as the worst > case: >=20 > max_nb_segs =3D 63 - (control_segment + ethernet segment + > TSO headers inline + inline segment + > extra inline to align to cacheline) >=20 > Cc: stable@dpdk.org >=20 > Signed-off-by: Shahaf Shuler > --- Acked-by: Yongseok Koh -- Thanks, Yongseok