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 375B2A0A0E; Tue, 11 May 2021 11:23:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D975340140; Tue, 11 May 2021 11:23:57 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2081.outbound.protection.outlook.com [40.107.244.81]) by mails.dpdk.org (Postfix) with ESMTP id 4920E4003E for ; Tue, 11 May 2021 11:23:56 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FVIE09BjcUHc1XOAbxOUj3JvpGzItx5wHkrsH1PslbKgO7eyJ/ndbgr2R1AWEN+vGVUthoB0zf4q07x2h7itxo31NCplhl+dJuvHurbV2NmFUwJXThrcKyAUKzESjX3/PWoWFesA/nhdllTHvQ4nuuPpPhgOxQ+tUjrbdCZLZaJSUijWmBtCJJOjSNwCqETgDtHF3Ks5LHaGg7pgeFnCkvbMdj9gZa/hi3RZ4v/Lh3dYEiR6LBB1aapdtoKCQ6IPAL4rIRDBv7yJwdFSlRMyHyFdsMKkO37Zsy4BIwVIRGZGbHvYPbNFmYxspnJZcGHkg9oNULD9zNmV3xW3GjFNoQ== 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=6SrjJOFfjI5N2SJk6KqxRCcGP7bro44eb11UnCGPyFA=; b=GVj+Kc98/iu0vvsiVE/ODoa0uQqjbBt5m5OK9elcmi4nu6q3HPgtbDmFB5x0xia85gOMMG2ocmukT4UMIak1RTvVwYIryapWQZsUk1vfQHSoe8KCEnUIV9KLzH3I6ZwX3fFmbualO986fVM2DucSnelgGMc0I+XpZzeolcWi0RkUaUNj6e68B852nmv40avHYGbluRm9+cf5/ZscrYQCG7EZXkZbilwKUOdsvUfMhx60P4KHb4GkuKbQk6JwqRl/z6vEdNNEuQTGy7miMovqem7IhTWtw5QI0Hrvnyitlqkd3A/dbFUhTDuui7eTFVkeygAsWMySvsYQECx6o6RFzw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6SrjJOFfjI5N2SJk6KqxRCcGP7bro44eb11UnCGPyFA=; b=WpN94jB8sBODi0b0W9DKU/24r8mggCv+UKF5YYofzSTATF4cLie5PhSNQaoFOM0+7qW3O8AaqBQRPg/o2aLUSnlrF3PiKVzrqvt0mIPAx+b38jcjwv+xy66qXlhXkkCRBIp7reDvCtax4NWrjZ2KBNRkg4DvObBsgyQt9giWZEIC2dvRxu0LUHQlI1xnLCf7mpO1sM/CWIK7vngEMcZBidmO3yGVjeOEl8GuEOkAQ1xdaw8zs74WSwVdPKlPXJEEQUz44Dxt7h6HdA2Dz0kD6U+E5gU59cSriL/ni0sJCoUXoWsFvNbIy1EeJELhMeHXF2JwxyH1eEQ2A7EoEkRlWw== Received: from DM6PR12MB3753.namprd12.prod.outlook.com (2603:10b6:5:1c7::18) by DM6PR12MB3755.namprd12.prod.outlook.com (2603:10b6:5:1c2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.29; Tue, 11 May 2021 09:23:54 +0000 Received: from DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::c595:e3bc:686c:16a4]) by DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::c595:e3bc:686c:16a4%5]) with mapi id 15.20.4108.031; Tue, 11 May 2021 09:23:54 +0000 From: Slava Ovsiienko To: Chengwen Feng , NBU-Contact-Thomas Monjalon , "ferruh.yigit@intel.com" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/2] net/mlx4: fix memory barrier incorrectly placed Thread-Index: AQHXRZVTeDbsYErPx02yZ81RhoVV9qreAu7A Date: Tue, 11 May 2021 09:23:54 +0000 Message-ID: References: <1620648363-31769-1-git-send-email-fengchengwen@huawei.com> <1620648363-31769-2-git-send-email-fengchengwen@huawei.com> In-Reply-To: <1620648363-31769-2-git-send-email-fengchengwen@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [188.163.75.124] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 65141494-2c78-49d1-6745-08d9145e7f32 x-ms-traffictypediagnostic: DM6PR12MB3755: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: /VeJEgbMYxUC8lG3mn5tTovJ6MeFh3Smhd5kyQUKr6V3vPAu94EWWdhGhKBzCyB4FWUwxgJBr7ieUmrUFQTyjqupLzJz4PhyYoudTibjH02iKQkGfidlzx54uIVExEbKUbZH/2Uokl+Gmny+z/xv/mgM+dUrHQaK9J55r3xl5tkdjSBRA7Vw605Z15d5+xxTaWwL4xz9tVuZdUKTKQxfF93b5rsdaMb5PrQmSz/fdEviwHwibL3S/usdd2q/+ycBnnPP3332atXh82MJuqsScqY5vlzXhSr867kWPR0oGzEsOE8Up5Xap/3sBQcdK7dM5Wm9jiznUBx3x+/hX4IiC14mzesyNACqL4ku64JwNy4pAaWTOcb94RCAmNY0Sxcof1aqYRXjmkHbNJE8TW9vLSz0qS5lZT2LdcR01+AnsmDaxR8LvkmJi8IaKvNOKeoIA2i1+8CWUID9bcNX0bOKQgpj48T6gLMFG20HvcE0rCbRPL1vpKykKjUkX052zl4S1p2pbQPs05fNMSLSLm0eiq4/yDOweC/cqYsFBtYsdEoNfSs1S0vEYPQ8cDETd80TJ8hAOt19Xyg4OtQigA9kxvKuEsONppNmzQtyBLJ2BeQ= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB3753.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(376002)(396003)(136003)(39860400002)(366004)(478600001)(4326008)(7696005)(55016002)(64756008)(66556008)(66946007)(6506007)(110136005)(38100700002)(76116006)(186003)(53546011)(26005)(2906002)(5660300002)(8676002)(52536014)(83380400001)(122000001)(66476007)(9686003)(86362001)(316002)(55236004)(33656002)(66446008)(71200400001)(8936002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?Mc2/VTKw/RgNu9E2f2jFjIu3T6WJCi7Krrk05wDo321KwPNm+rScwE5KwHTe?= =?us-ascii?Q?IumQ8vkFY6EpK1vqAQK0V1OUYikbcA94fw8QRfAwW074/7aKQtLTjqsclOEa?= =?us-ascii?Q?cSQAFQhpfMWkhJn19bbdpAxM5kjvTnSURozdH4XY4rdY79MxLnKifCHqE5q+?= =?us-ascii?Q?j+Uai3v6zW2SKhLtWGR6lhsuDkLSqaTv7jbWoAE1XEKMuHSrmlc345aCReYs?= =?us-ascii?Q?jVn0Jt/1QOhesMBg/F1gy1EqDHGVBBWCdO1pS76YaMhaT0WGnbofoMmKDhRk?= =?us-ascii?Q?d/AHRO/RKLG3L02trhRHn+8Vs9diVecDsd5eP5Rb4uUyJ+s8DmjA+Acwe7it?= =?us-ascii?Q?MmcBI2oU6Eca5FMBtt2sadN52FT2WhwfyeHiNtuuGhekfNhqpQrv+JZeROlU?= =?us-ascii?Q?rEqegNj0iRgPOB+6lm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us-ascii?Q?iDOe4yDzkAEx7k9eheG2iYXf?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3753.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65141494-2c78-49d1-6745-08d9145e7f32 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 May 2021 09:23:54.2197 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ctimlHZdUSIgyRhqE//jwRc2Mm4ucyfsj8ibN7RVM42YHdTDcD2yAyND6vRUMrQ5zuOiirbkBhUGw53x+YRPzw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3755 Subject: Re: [dpdk-dev] [PATCH 1/2] net/mlx4: fix memory barrier incorrectly placed 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" > -----Original Message----- > From: dev On Behalf Of Chengwen Feng > Sent: Monday, May 10, 2021 15:06 > To: NBU-Contact-Thomas Monjalon ; > ferruh.yigit@intel.com > Cc: dev@dpdk.org > Subject: [dpdk-dev] [PATCH 1/2] net/mlx4: fix memory barrier incorrectly > placed >=20 > The memory barrier is used to ensure that the response is returned only > after the Tx/Rx function is set, it should place after the Rx/Tx function= is set. >=20 > Fixes: 0203d33a1059 ("net/mlx4: support secondary process") > Cc: stable@dpdk.org >=20 > Signed-off-by: Chengwen Feng Acked-by: Viacheslav Ovsiienko Hi, Chengwen Nice catch, thank you for the patches. Just out of curiosity - did we meet the real issue with this ineffective ba= rrier? With best regards, Slava > --- > drivers/net/mlx4/mlx4_mp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/net/mlx4/mlx4_mp.c b/drivers/net/mlx4/mlx4_mp.c > index ddf7bdb..8fcfb54 100644 > --- a/drivers/net/mlx4/mlx4_mp.c > +++ b/drivers/net/mlx4/mlx4_mp.c > @@ -126,7 +126,6 @@ mp_secondary_handle(const struct rte_mp_msg > *mp_msg, const void *peer) > switch (param->type) { > case MLX4_MP_REQ_START_RXTX: > INFO("port %u starting datapath", dev->data->port_id); > - rte_mb(); > dev->tx_pkt_burst =3D mlx4_tx_burst; > dev->rx_pkt_burst =3D mlx4_rx_burst; > #ifdef HAVE_IBV_MLX4_UAR_MMAP_OFFSET > @@ -144,6 +143,7 @@ mp_secondary_handle(const struct rte_mp_msg > *mp_msg, const void *peer) > } > } > #endif > + rte_mb(); > mp_init_msg(dev, &mp_res, param->type); > res->result =3D 0; > ret =3D rte_mp_reply(&mp_res, peer); > -- > 2.8.1