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 1FFCCA04B3; Sun, 15 Dec 2019 10:02:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6A5DD1BFAD; Sun, 15 Dec 2019 10:02:49 +0100 (CET) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40057.outbound.protection.outlook.com [40.107.4.57]) by dpdk.org (Postfix) with ESMTP id 7B8221BFAB for ; Sun, 15 Dec 2019 10:02:48 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a1mmrIDH9nLmQQsuhFlqODB4mGTzZ98hUkMlFbJqu+dT6Wzm5h1bgLWbm3fy7uJTPCabHSAlC1eGa42JAITv+JtZRxMV1U9OCMXGYSeMgQFYbbn1hkdL8Ye/l40kP41BnHtfSkNy+H5Q2hDuCdl1S8LSN8A+/LdB70GtwsClNrhSUXgg2GhjllsKa3ySJPZOqhvXxQq5ckTp3VQoh8DyrjRMHQ7U066OFbsZ9vd1vUu0y6Ah3Ne+cABuaBGrOQm7Y8d93CNDaOB0DcU1oq42HGxijGGr8BH/yp4vie/0YjMDqzSfFq1phHTB+UBzeMo+ao9Tes7y5rH8gewS0w7cEQ== 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=9kYB7Zo6s44KJQdQcXrBNMdT2rylINWkEYxA3mK6pYg=; b=Be5x7xjSgdwIif8bHHNaV0s0OWuiXB7V5mecyhe+ziXF9012a/zfavb8igHQKH482aJ6Xy9YV3rGWc1N3JdD4KAm3IcWGC4J0bE7ahgR7hRwp+g3jSxo9mCesyLte75cPrn2E8PW9hUq7CepSsGMzxG8zgfGM8CsiIRrHDLO4tCQrgMNn6yU/AVEttyGFDyDr7j9MBgaF7mLvMg10IKdVY0D33ylPQkAA2EadJiCnnR1LR1JFIj1a8iYZo/2x79FtbifZ3CK6cU0Ru827YE8IRs0Rhga5TPrGMMwOnbc5hJ9kNzg52YuE00d+Jhk9LsW4V48vRcItcxefJ46WFwVjw== 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=9kYB7Zo6s44KJQdQcXrBNMdT2rylINWkEYxA3mK6pYg=; b=oZSyYEH1w3Fenf2wjTA/NPN/qv1aYEVXezyvpF8/YGqbwInbQ7A8JtYMzD6TzE87g10UNyKQRJZyb0re4WX/RwpV4pM96ruBO2+vSxXVHJvz53E8JiAnPEen9fuyRv2BDCRDn8AJ1uhat1nNfbGVY/2iNcMvnbS0ymExTlcP6hg= Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com (52.134.65.161) by DB3PR0502MB3961.eurprd05.prod.outlook.com (52.134.70.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.17; Sun, 15 Dec 2019 09:02:47 +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; Sun, 15 Dec 2019 09:02:47 +0000 From: Raslan Darawsheh To: Raslan Darawsheh , "xiangxia.m.yue@gmail.com" , "dev@dpdk.org" CC: Ori Kam Thread-Topic: [dpdk-dev] [PATCH dpdk-dev 1/3] net/mlx5: avoid crash when setting hairpin queues Thread-Index: AQHVpS2fA2l+Inzr40Ow9Wuj4qx21qe7ACYggAAB/QA= Date: Sun, 15 Dec 2019 09:02:47 +0000 Message-ID: References: <1574864323-85580-1-git-send-email-xiangxia.m.yue@gmail.com> In-Reply-To: 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: f680a68a-0f63-4b6b-04a8-08d7813d8e4a x-ms-traffictypediagnostic: DB3PR0502MB3961:|DB3PR0502MB3961: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3826; x-forefront-prvs: 02524402D6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(136003)(396003)(39850400004)(346002)(376002)(13464003)(189003)(199004)(9686003)(64756008)(66446008)(66946007)(33656002)(66556008)(2940100002)(66476007)(76116006)(55016002)(316002)(110136005)(71200400001)(81166006)(7696005)(6506007)(86362001)(5660300002)(52536014)(53546011)(186003)(107886003)(81156014)(478600001)(26005)(2906002)(8936002)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB3961; 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: dJbKof7amk4iQr8Z2DKAlaLu0skWvwdC0H435sBf2kYE3N7IxFa0/NL8hc/ft/+Ej+9FBVIDxx4vxf4L329oaj3JRtw3GcIatMKW+T2tmqVpjUhWEkhQoPpU5lMJ1rFI5/nm+OAM5bhdqS3+YetJQbS7Ai6LECwn2yX6IqOpnSw3CCPxsmifo/2HBblP9cUStUyUQC6A92T8jwzQ+9Rgfs9IZKAy9bDC95pTQzRqgicqThm7HLsylYINRLjh1gmBiLO5TQLhiHgUpOD4YJW/RJaWMv1ziVEEWK5Bd8uyZZ/PF0TZKvH72n7n4norXGLCu60EwRuDH+S/FkwwTSwXg9Pae8EhGSLytq4/bx1zKJgcpJrDmg3ka4Mx+wknhYy1qWUG6PDI7L2iOoffN8o0GPZyFddvrtvwDmBpX3NHjOJdfErnVffIjVyYRNARxgE3l8o5DwcyZHQp1c+YEMI5PPOVjncoH0Usx5Rov59mogu6ENZh7tTSxwMZhgYuxyty 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: f680a68a-0f63-4b6b-04a8-08d7813d8e4a X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Dec 2019 09:02:47.4439 (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: YQiGYur14nu5QfPJRtG6RWaMRU4pPSQOP8ZwdfmiVZ+8c5su8kl8XK2pbGsioJSBa2w6yEeVbxA1E/j4qRrcZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB3961 Subject: Re: [dpdk-dev] [PATCH dpdk-dev 1/3] net/mlx5: avoid crash when setting hairpin queues 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" Please be noted that only the first two patches where applied from this ser= ies, The last patch is not needed anymore. Also Added Cc: stable@dpdk.org to the commits. =20 Kindest regards, Raslan Darawsheh > -----Original Message----- > From: dev On Behalf Of Raslan Darawsheh > Sent: Sunday, December 15, 2019 10:55 AM > To: xiangxia.m.yue@gmail.com; dev@dpdk.org > Cc: Ori Kam > Subject: Re: [dpdk-dev] [PATCH dpdk-dev 1/3] net/mlx5: avoid crash when > setting hairpin queues >=20 > Hi, >=20 > > -----Original Message----- > > From: dev On Behalf Of > > xiangxia.m.yue@gmail.com > > Sent: Wednesday, November 27, 2019 4:19 PM > > To: dev@dpdk.org > > Cc: Tonghao Zhang ; Ori Kam > > > > Subject: [dpdk-dev] [PATCH dpdk-dev 1/3] net/mlx5: avoid crash when > > setting hairpin queues > > > > From: Tonghao Zhang > > > > If configuring the number of tx/rx queue with rte_eth_dev_configure > > to nr_queues + hairpin_nr_queues, and setting tx/rx queues to > > nr_queues with rte_eth_tx/rx_queue_setup. But not configuring the > > hairpin queues via rte_eth_tx/rx_hairpin_queue_setup. > > > > When starting the netdev, there is a crash because of NULL accessing. > > > > Fixes: cf5516696d77 ("ethdev: add hairpin queue") > > Cc: Ori Kam > > Signed-off-by: Tonghao Zhang > > --- > > drivers/net/mlx5/mlx5_ethdev.c | 2 +- > > drivers/net/mlx5/mlx5_trigger.c | 5 ++++- > > 2 files changed, 5 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/net/mlx5/mlx5_ethdev.c > > b/drivers/net/mlx5/mlx5_ethdev.c > > index 1d6c084119ec..0076d05b00cc 100644 > > --- a/drivers/net/mlx5/mlx5_ethdev.c > > +++ b/drivers/net/mlx5/mlx5_ethdev.c > > @@ -476,7 +476,7 @@ mlx5_dev_configure_rss_reta(struct rte_eth_dev > > *dev) > > > > rxq_data =3D (*priv->rxqs)[i]; > > rxq_ctrl =3D container_of(rxq_data, struct mlx5_rxq_ctrl, rxq); > > - if (rxq_ctrl->type =3D=3D MLX5_RXQ_TYPE_STANDARD) > > + if (rxq_ctrl && rxq_ctrl->type =3D=3D > > MLX5_RXQ_TYPE_STANDARD) > > rss_queue_arr[j++] =3D i; > > } > > rss_queue_n =3D j; > > diff --git a/drivers/net/mlx5/mlx5_trigger.c > > b/drivers/net/mlx5/mlx5_trigger.c > > index cafab25c67e7..ab6937ab10d1 100644 > > --- a/drivers/net/mlx5/mlx5_trigger.c > > +++ b/drivers/net/mlx5/mlx5_trigger.c > > @@ -106,9 +106,12 @@ mlx5_rxq_start(struct rte_eth_dev *dev) > > unsigned int i; > > int ret =3D 0; > > enum mlx5_rxq_obj_type obj_type =3D MLX5_RXQ_OBJ_TYPE_IBV; > > + struct mlx5_rxq_data *rxq =3D NULL; > > > > for (i =3D 0; i < priv->rxqs_n; ++i) { > > - if ((*priv->rxqs)[i]->lro) { > > + rxq =3D (*priv->rxqs)[i]; > > + > > + if (rxq && rxq->lro) { > > obj_type =3D MLX5_RXQ_OBJ_TYPE_DEVX_RQ; > > break; > > } > > -- > > 2.23.0 >=20 > Patch applied to next-net-mlx, >=20 > Kindest regards, > Raslan Darawsheh