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 3E8C4A04FD; Tue, 17 Dec 2019 13:13:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6C0F01BEB2; Tue, 17 Dec 2019 13:13:44 +0100 (CET) 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 A547D1BE9D; Tue, 17 Dec 2019 13:13:42 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C/O/Zz6AKR2LkTWGdJYFc1TPQsQ3gLYMMhCa4u0X+OJc2bsSo2HtMqizTToGPdoSKkar3lQ95Kp9TWoZCBwgfVU/w7qyWtyZRYf9YdjWDfG56eIJm8xCpcjIxP+eIEYeWpxAjpzr9HxO729vDUTpXr3fP6/WJ2vveVZ9BkfIWUo2Ehy4C78VYHS4r41rNYiOwFOHfxhKigC28KZOi+hnqaANrMaiPFPDM0P+ngT+L2vMuhYNuT+imTM89pl1LAXwALe+CO3Tp7US2ucbSkjymwxDmaq6ApJF11ZzXcdpp2rXZUMrSEE7elyXZtGhVTEfCZlVhN6jaKQeTGMtlHB/dw== 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=t8EA0EFgwIqtynCni1yALuHaSXQxRcQ7+R1DenUh0zQ=; b=PO2lpgeNn0bBAUpiHScMwOWgc2uRm52G3uTRybKLQ5YEgZPEahh/8IOA4UpQ2tG6butn7phO7agjIoOYn+hfeCZYaIg9GBLRneX1UUxLKtR+XfF+nXOlXfX4nBMK6JF1irnvvT539Ax+kV7Wt7RsRl1iDqn272Vrt36rOjn4IpaVixNcVrTZ13PaOWUyCP7xJb+1V8QK8cW7JpDl+SoxU7wmatRttJfiiG/8fd3XySLYwiX4nOkbdzA6u8pjWspq6j1aD1d+Z2KQVv5Kn/nx/zvbx2QzrAtbyIDgBdHDxAupQWpj4EGoDy1Lh88BFaykrkiMknGgqsbMrsKt6co7cA== 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=t8EA0EFgwIqtynCni1yALuHaSXQxRcQ7+R1DenUh0zQ=; b=GEMQUCZoTOGnSYixXm7D+p6KXbYtJloFGErCvw1Hc0++kAWGnjCMnDEigU+D2tBrFwL9QXGxfrFKn3utCQy8M3Wx25wcj+77cvmlC8floyba+v7NHGbC8/8ZczgQhbEGlyziHc4g786PbKre2zhQ7paQTScDy47cDjGAk6W5aSI= Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com (52.134.65.161) by DB3PR0502MB4012.eurprd05.prod.outlook.com (52.134.68.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.14; Tue, 17 Dec 2019 12:13:41 +0000 Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::2151:27c7:b8ec:3da9]) by DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::2151:27c7:b8ec:3da9%6]) with mapi id 15.20.2538.019; Tue, 17 Dec 2019 12:13:40 +0000 From: Raslan Darawsheh To: Jack Min , Ori Kam , Matan Azrad , Shahaf Shuler , Slava Ovsiienko CC: "dev@dpdk.org" , "stable@dpdk.org" , Zhike Wang Thread-Topic: [dpdk-dev] [PATCH] net/mlx5: fix multiple flow table hash list Thread-Index: AQHVs/MwzE6kB8+lvU2UbjrDKCG7zKe+PtlQ Date: Tue, 17 Dec 2019 12:13:40 +0000 Message-ID: References: <748a95b9f9030c78c55ddda4642915283de3f13b.1576487133.git.jackmin@mellanox.com> In-Reply-To: <748a95b9f9030c78c55ddda4642915283de3f13b.1576487133.git.jackmin@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=rasland@mellanox.com; x-originating-ip: [212.29.221.74] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 8d33fcbd-bace-4289-c1d3-08d782ea8d8a x-ms-traffictypediagnostic: DB3PR0502MB4012:|DB3PR0502MB4012: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1079; x-forefront-prvs: 02543CD7CD x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(366004)(346002)(136003)(396003)(39860400002)(13464003)(189003)(199004)(2906002)(52536014)(110136005)(4326008)(6506007)(7696005)(53546011)(186003)(81166006)(81156014)(26005)(9686003)(71200400001)(64756008)(66556008)(55016002)(86362001)(6636002)(5660300002)(66946007)(8676002)(33656002)(478600001)(316002)(76116006)(8936002)(66476007)(66446008)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB4012; H:DB3PR0502MB3964.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: SsqifQsVDaPQotXbSS+f0+hm0qzXmBerLYNLPmHwgKqXOAVulSNRvlQPluge6EhEKnHoXK2fjNM/kF2xbs56mNjj1/H6stUlyQvYva/V+lJ/S2CHvXEpnZgiuStU53VQ6sOSZnuDCaCfelQYumhDXOr1iUD3+M3OxRZjdB+A/L4W2A887kEUd75kkDWsB7/kLWHOYUUegJjNpS3d35vm+T7Hst4laDph3tVuJyu/D21kWUzKHAr+PmbronCyde/7bdYG82oeO36uXGwWdOITM8cVvKNBK3zsgpxkj8xj+tp5sTc+lLuRsKfJf/IwJudTF3YYbyAGRE7KAFxA1NVk2ioAfz+lZGGoxZoHALNL3WPZKOWN3ITyXXENSMqJ1IPG3p1fvU0snuFZyrIC5OUOdc7QyZI1dji587xSJwOiu787WuO9aCSU3KOjIOegA/fzUIaPL4SIdw2V54HT/8w3cROgKFScZulZzbNt8F1NQnQqEuTb9ZLutXiGE3nMPOz4 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: 8d33fcbd-bace-4289-c1d3-08d782ea8d8a X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Dec 2019 12:13:40.3474 (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: AVuRpURZqR4Os/PtOQiNA35FWdReGmnMUx/1NfE/wpIqKPS1yUXAWzizYh8L3LfvCyoSfVbvJ8YM2HcBzimBgg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB4012 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix multiple flow table hash list 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" Hi, > -----Original Message----- > From: dev On Behalf Of Xiaoyu Min > Sent: Monday, December 16, 2019 11:28 AM > To: Ori Kam ; Matan Azrad ; > Shahaf Shuler ; Slava Ovsiienko > > Cc: dev@dpdk.org; stable@dpdk.org; Zhike Wang > Subject: [dpdk-dev] [PATCH] net/mlx5: fix multiple flow table hash list >=20 > The eth devices which share one ibv device only need one hash list of flo= w > table. >=20 > Currently, flow table hash list is created per each eth device whatever > whether they share one ibv device or not. >=20 > If the devices share one ibv device, the previously created hash list wil= l > become dangle because the pointer point to (sh->flow_tbls) is overwritten > by the later created hast list. >=20 > To fix this, just don't create hash list if it is already created. >=20 > Fixes: 54534725d2f3 ("net/mlx5: fix flow table hash list conversion") > Cc: stable@dpdk.org >=20 > Reported-by: Zhike Wang > Signed-off-by: Xiaoyu Min > --- > drivers/net/mlx5/mlx5.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index > d84a6f91b4..50960c91ce 100644 > --- a/drivers/net/mlx5/mlx5.c > +++ b/drivers/net/mlx5/mlx5.c > @@ -868,8 +868,13 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv) { > struct mlx5_ibv_shared *sh =3D priv->sh; > char s[MLX5_HLIST_NAMESIZE]; > - int err =3D mlx5_alloc_table_hash_list(priv); > + int err =3D 0; >=20 > + if (!sh->flow_tbls) > + err =3D mlx5_alloc_table_hash_list(priv); > + else > + DRV_LOG(DEBUG, "sh->flow_tbls[%p] already created, > reuse\n", > + (void *)sh->flow_tbls); > if (err) > return err; > /* Create tags hash list table. */ > -- > 2.24.0 Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh