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 BA28BA0525; Fri, 21 Feb 2020 09:25:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 907164C98; Fri, 21 Feb 2020 09:25:44 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2046.outbound.protection.outlook.com [40.107.20.46]) by dpdk.org (Postfix) with ESMTP id 4F8774C81; Fri, 21 Feb 2020 09:25:43 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W/7ROAu4AZTGKB5faRXphKOKBUk52/9xR2lKJdxZ6SXtVI7j4b/1ve/XpwrTGzRhOEnaSA/HyGp0py55zE+y0iwtT6U7aV+D8IuwvHb4fAYaVZMybBlN52j6qf3SG9fE/pbHmTj/twCH8A4g4TfF7XkQC5XHibC9wA5m8jOxq2IiDuRO86fvvnWKYVbpCovHKysDBvM56W/ndu8spiCAqsXqFq7x3RkyYHGa/pvQCAtlIAHq4pS/+j4PvZzRJr/1RDJ5dJfiJS/TV+KwsPvoqaQIl2HVQAvRUX6EmJxbuCyyg1O6vW+jlFXmgI8xvA4L3z9DiaPsGkK2Y/c/1QRYVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ph1dvwwcqk6t713uGqRyDSFeIWR3Paz7+wgesc3H1RA=; b=UpgkHu85LaBxMEYIDaKeRulI6TwLeKnV2UAj3JgVXmkGqkzioPshHpo/jdqdZwt5pJ3Kn02HjcTXYZt1nepl9Wf3AJihqRctd+GPQvgdaaRtPuQZWhuJkzaYTp5nmFseY7mgK1ziTAIn9tsJVzw1VbuJuwi4whK4bkb4gb7hr0MO79ZjLhOGT9ufUV5jXZlJszkLtGahjXo5LeNcZlH4WP09J+nCtli1RpH14upPOJLyrPHGRqPHzsDSDx01I4S7pVQ/2lUO10IZiiXhKcpKNqtzORH2/EFXi/q8W1MyL0Wf2i9Z174orpWkMinvhjF7oRrpK8xV1ipI8ibWVxp0PA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none 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:X-MS-Exchange-SenderADCheck; bh=Ph1dvwwcqk6t713uGqRyDSFeIWR3Paz7+wgesc3H1RA=; b=Si2HpxbHd5m9fo7aNDMBQuKHspf4bkpgn8Gn6e5QcCDIbH1nNGcmqmKi5AM38LK7y+hut8t/kpJtdCZiQC8iYqv6BwL9nLswCyqaDVrIRzZB4EwysZwd0buXO4PMMunUXrtDGjFz86aodImiXWcTVYqJOsWNsEF0Lymp2dEwagQ= Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com (52.133.39.139) by AM0PR0502MB3921.eurprd05.prod.outlook.com (52.133.43.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.24; Fri, 21 Feb 2020 08:25:40 +0000 Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::e495:9258:db09:1de8]) by AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::e495:9258:db09:1de8%7]) with mapi id 15.20.2729.032; Fri, 21 Feb 2020 08:25:40 +0000 From: Matan Azrad To: Slava Ovsiienko , "dev@dpdk.org" CC: Raslan Darawsheh , Thomas Monjalon , "ferruh.yigit@intel.com" , "stable@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix last completed built descriptor Thread-Index: AQHV6DNcy101HLdVB0KszVfF7/wtz6glUGxQ Date: Fri, 21 Feb 2020 08:25:40 +0000 Message-ID: References: <1582233467-3123-1-git-send-email-viacheslavo@mellanox.com> In-Reply-To: <1582233467-3123-1-git-send-email-viacheslavo@mellanox.com> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-originating-ip: [77.124.105.116] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 47d532b0-7ef8-4761-f359-08d7b6a7a318 x-ms-traffictypediagnostic: AM0PR0502MB3921:|AM0PR0502MB3921: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr,ExtFwd x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 0320B28BE1 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(346002)(136003)(376002)(396003)(39860400002)(189003)(199004)(66556008)(66476007)(71200400001)(6506007)(66446008)(53546011)(64756008)(8676002)(52536014)(26005)(4326008)(66946007)(110136005)(76116006)(316002)(86362001)(7696005)(478600001)(186003)(54906003)(81166006)(9686003)(33656002)(2906002)(5660300002)(81156014)(8936002)(55016002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3921; H:AM0PR0502MB4019.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jx1/gaAa/tuUnY61seehliYwhgBZYK9xt8spl9EoG6enDpk25mB+XcL5YrOfSDIr6FDKN/qpwsACE+HZOdlfZ6T37cv5S776FPW0n+HQvyTu2xf7zg9j3PGM2y1+3toEPstfbpzR4L/PR/GJOfHiKEY7Ku8mH0lpa3m+P0eBJkrG5xLXW/cdEYGqJ7RR/BMBrGXiQDy0oSqKR85jM4QyCGFHgYKe+an6VwaADr4QBb9nRyEfldPl/yvI2kc6zC8+SXbmwJo6rxm4xjE1J4DDeQ6olN8o2fAbg/cjY7EO0vKEP6ItuzVaqqMr+Ojvju9Xd7UvV1qAC5wE+i0lSWF5oUnbppot7XaldMgW+THVMn8nVv41+m+ezMLBYlnQpObp+UMTDu8DQk9MZq2RNV2aRZQyCOR8GchyRKlGY2z7tMvoT5XuXAGy2X5q5RrhfDkV x-ms-exchange-antispam-messagedata: MnB3dEb/+ZjqEdZFKtEPwPhSe/7m81eilIEkSy3rl2ClauLRRHXMvdWqFH4kaj5w35IN6Zfe4e0NI3/SpDZkEOs1gg9RjDg0YZ5MYeNi3SZ+SzyrOlEcZ52O+TPXhiAd6A+UXl4sWlRJC2y0sh75Ig== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 47d532b0-7ef8-4761-f359-08d7b6a7a318 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Feb 2020 08:25:40.6800 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: HmdZcYITwjzLJE17vb2Ui4qMzxfJV9v/t3o5CmY8Z9BvpUfABS1EynHgUnYD+7NDn+j7kth2Y6DarL7NFgYwiw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3921 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix last completed built descriptor 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" From: Viacheslav Ovsiienko > Sent: Thursday, February 20, 2020 11:18 PM > To: dev@dpdk.org > Cc: Matan Azrad ; Raslan Darawsheh > ; Thomas Monjalon ; > ferruh.yigit@intel.com; stable@dpdk.org > Subject: [PATCH] net/mlx5: fix last completed built descriptor >=20 > The routine sending packets with Multi-Packet Write method assigns the > wqe_last variable with transmit descriptor (WQE - work queue entry) being > built. If send queue is close to full state, the WQE has no data yet (try= ing to > put the first packet) and there is no enough space in descriptor for the = next > packet the WQE is discarded and the stored wqe_last value becomes invalid= - > points to the discarded WQE. >=20 > The mlx5_tx_burst_request_completion() routine might set the completion > request flags in the WQE pointed by wqe_last, it is safe, but the next > mlx5_tx_burst call uses the WQE as the first free one and request > completion flags might be overwritten and completion request will be lost > causing the transmit datapath malfunction. >=20 > Fixes: 8b581c690a54 ("net/mlx5: move Tx complete request routine") > Cc: stable@dpdk.org >=20 > Signed-off-by: Viacheslav Ovsiienko Acked-by: Matan Azrad