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 97D69A046B for ; Mon, 22 Jul 2019 10:43:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6C08C1B9C9; Mon, 22 Jul 2019 10:43:32 +0200 (CEST) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50076.outbound.protection.outlook.com [40.107.5.76]) by dpdk.org (Postfix) with ESMTP id 397E41B9BA for ; Mon, 22 Jul 2019 10:43:31 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bypUXZtcI5xGbewg57N0cF1ZBj/9+PPEc+392s+NHdo0Me2vjy/hCBfg/cee7daGPOf3hSQkXiSbUzLZ6GHS4haqstOWjxplSV2hz6UtnJQlWUs0BuDq31qi39KoLZBGj5eSpVDzYsVmodWTcerwxP1grNtWLlxNK6rpkTOK6il7DVxBJ8YrplW619iE8MsJKctX78FoUL8ayTeiEZunhCwB8pMb2eYQ02Rf1TXuxs6qjnoUl6YNV75uEjoRqhh/YmJnW/ZERC4lrHbNtna7CPOAvfBsyxXyb/20Gwvp6RY31sMHA7rZu+hab1/oQYD5hg5lwRmcsrGm+or2EOvTtA== 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=ncUTCxY5+VTgacRd0Zi5huKbAbhYPJQSIY9ikbWFs98=; b=lqyai/7/+GoCbUokw3xXWmK79h/orv4N39JWZth/I+cdGOacfi3RfF3m0X5XIvYURyGRkLnVuquItxJIaDN7p99zWRgu4NtZHz/iHkKzy2NubuuksXZ6CSqTUA8TjlGBJouBPwqj6PBLxxkoESAHOxKGSQRp9D+vUY9YPAwQC9SeGe4G7Uu/qUCm96McAh3Ru3d2fJo7x2sAvXpBARtAIB/r6T9KcVooHr+9BQxH/ig8NvuDZusWjPxhRn4BB8Y/+C2WISKjG9lrtXJYm1lgRnWw9+nSOYO97hpvb38BIauMkBSMYDiL0BN7R3RIc1ap8bcLBsfBVhnRCHqNEzy4ug== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ncUTCxY5+VTgacRd0Zi5huKbAbhYPJQSIY9ikbWFs98=; b=mjnlEY2C8ScMxkYD4CrIFRzcuAxMYHIUPzlymvrAZ2RWFeDvZohqU7R2RN1Y0cMC835845Od23SA/rHHIAKmM8nFUH+mncYhzs6OKyUwZb0iRfWudmVVxOFNQ8FaDXlyHLP2jhkkJMyTp9YxYdZvvQ1Y0aOyJ/qmgIz9lW0xbSo= Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com (52.134.65.161) by DB3PR0502MB4060.eurprd05.prod.outlook.com (52.134.72.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.14; Mon, 22 Jul 2019 08:43:29 +0000 Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::bcc1:5331:1dca:7360]) by DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::bcc1:5331:1dca:7360%7]) with mapi id 15.20.2094.013; Mon, 22 Jul 2019 08:43:29 +0000 From: Raslan Darawsheh To: Slava Ovsiienko , "dev@dpdk.org" CC: Yongseok Koh , Shahaf Shuler , "stephen@networkplumber.org" Thread-Topic: [dpdk-dev] [PATCH v2 0/2] net/mlx5: cache the associated network device ifindex Thread-Index: AQHVP9SQGi9NPYk7k02GJ8Gx5I+yZKbWU0DA Date: Mon, 22 Jul 2019 08:43:29 +0000 Message-ID: References: <1563514305-27405-1-git-send-email-viacheslavo@mellanox.com> <1563721001-3730-1-git-send-email-viacheslavo@mellanox.com> In-Reply-To: <1563721001-3730-1-git-send-email-viacheslavo@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-correlation-id: 70b73fb0-2701-429b-1f44-08d70e80abd6 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:DB3PR0502MB4060; x-ms-traffictypediagnostic: DB3PR0502MB4060: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 01068D0A20 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(39860400002)(346002)(376002)(136003)(366004)(13464003)(199004)(189003)(74316002)(4326008)(6116002)(76176011)(3846002)(305945005)(6436002)(53936002)(66066001)(6506007)(446003)(9686003)(11346002)(6246003)(55016002)(6306002)(229853002)(316002)(26005)(53546011)(186003)(110136005)(8936002)(7736002)(54906003)(7696005)(86362001)(99286004)(102836004)(25786009)(2501003)(81156014)(81166006)(33656002)(66476007)(64756008)(66446008)(76116006)(14454004)(45080400002)(66556008)(5660300002)(68736007)(966005)(478600001)(2906002)(66946007)(14444005)(256004)(486006)(476003)(52536014)(71190400001)(71200400001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB4060; H:DB3PR0502MB3964.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 5TLNRJfglDr5xk6pdO3UvVhu97KGFlB7hedwBzqehcBvLr7ig3pwMw6QGT1RQqUgprNxxEfCizN2vfb+Gz0IK5jDLxVdaDItPfQwhoEsn+sUTWgVgCnPnyC7ERc0XLvsbc9T3jGa59TuDogp0EsVEwZkOf2u9yZMg0GPR/dQXE+nHFSc19azDQXISS+4v5S3wDDgYNCAfdN3KJahNlv+c7F9A5rJv9w/tHfRdg/yV0VwZ//SylsB1lTrF2Hlcko1O8wdKwNRlzkGn/gPIiIOHkYIIfaH2J50mpUCEfXbddd1VoN876YzbNi7nG6c6ya6gcMHFqYJueztjdzSVO6ihy7u6ZG+ZKpOCSYsrVYIcWvPlBnyYeVsxCVAaLsbrVDvWo+S1opdd1/Ka/OcF6POx5okv833dKB9b2+0htxvNEM= 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: 70b73fb0-2701-429b-1f44-08d70e80abd6 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jul 2019 08:43:29.5615 (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: rasland@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB4060 Subject: Re: [dpdk-dev] [PATCH v2 0/2] net/mlx5: cache the associated network device ifindex 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 Viacheslav Ovsiienko > Sent: Sunday, July 21, 2019 5:57 PM > To: dev@dpdk.org > Cc: Yongseok Koh ; Shahaf Shuler > ; stephen@networkplumber.org > Subject: [dpdk-dev] [PATCH v2 0/2] net/mlx5: cache the associated network > device ifindex >=20 > In mlx5 PMD the associated device index is retrieved via Netlink request = to > underlying Infiniband device driver. This network device index is permane= nt > throughout the lifetime of device. We do not spawn the rte_eth_dev ports > without associated network device, and if network device is being unbound > we get the remove notification event message and rte_eth_dev port is also > detached. So, we may store the ifindex in mlx5_device_spawn() routine at > rte_eth_dev port creation and initialization time and use the cached > value further instead of doing actual Netlink request. >=20 > This approach allows the query API routines like mlx5_link_update to be > thread-safe due to Netlink request elimination. mlx5_link_update() may > be called in asynchronous event handler concurrently and it may cause > application hang. >=20 > This patch extends and updates the [1]. >=20 > [1] > https://eur03.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fpatch > es.dpdk.org%2Fpatch%2F56417%2F&data=3D02%7C01%7Crasland%40mell > anox.com%7C3c155fb435384529783608d70debb168%7Ca652971c7d2e4d9ba6 > a4d149256f461b%7C0%7C0%7C636993178256642102&sdata=3DGNj8%2B79 > %2FoBQzu7esmy4wN4e6WC7RHREDbV4OZTq6SOA%3D&reserved=3D0 >=20 > Reported-by: Stephen Hemminger > Signed-off-by: Viacheslav Ovsiienko >=20 > --- Series applied to next-net-mlx Kindest regards, Raslan Darawsheh