From patchwork Thu Jan 24 14:47:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Haakon Bugge X-Patchwork-Id: 10779143 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B0AE31515 for ; Thu, 24 Jan 2019 14:47:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F5D42FBF8 for ; Thu, 24 Jan 2019 14:47:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93A1930A5A; Thu, 24 Jan 2019 14:47:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37C352FBF8 for ; Thu, 24 Jan 2019 14:47:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727919AbfAXOr6 (ORCPT ); Thu, 24 Jan 2019 09:47:58 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:54550 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727649AbfAXOr6 (ORCPT ); Thu, 24 Jan 2019 09:47:58 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id x0OEcUut006983; Thu, 24 Jan 2019 14:47:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=xDLOjhg5LOn+hUSu/M7cJC5A01vDgCnFn1irCckJlkI=; b=zrEu3hnDFjh+sDa+Z8W5NBtsM3SHLcIlu+RGJN5TDzcY2l9LtU2V7D0Vzm+VmZkEu8db gX3lcPj2yrGPzYlhI5yyYUgNHQFksXw1nroDFbNhJNmhD3hJOTzI3Jl2Fdafw92S/eRA qrkVMsMnULO3QIl+021jsmGHtcLCeKWeMpmx8otIQlBESyFU88XJonvqG9qFBObal0zD FKylcdxiiifvp8DWnQJHnD8aoEfO1a8rRQcWGuhcAot+hWD8Yh5gUCkRW8ilkqh9MGms TArxFI/POPbV6GyRofLdnbq33FsYyPotRWJZcoRd8shdBzmHZou+FAxIKPrRnWwP2RMv vA== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2q3sdercaf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Jan 2019 14:47:50 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x0OElnwm008998 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Jan 2019 14:47:49 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x0OEllp1001363; Thu, 24 Jan 2019 14:47:48 GMT Received: from lab02.no.oracle.com (/10.172.144.56) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 24 Jan 2019 06:47:47 -0800 From: =?utf-8?q?H=C3=A5kon_Bugge?= To: jgg@mellanox.com Cc: dledford@redhat.com, hal@dev.mellanox.co.il, sean.hefty@intel.com, leon@kernel.org, linux-rdma@vger.kernel.org, ira.weiny@intel.com, aron.silverton@oracle.com, mark.haywood@oracle.com Subject: [PATCH 0/4] ibacm: Replace ioctl with netlink and fix inablity to resurrect an interface Date: Thu, 24 Jan 2019 15:47:34 +0100 Message-Id: <20190124144738.7961-1-haakon.bugge@oracle.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9145 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=511 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901240104 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The first commit in this series re-factors the code which iterates through the system interfaces. The code used the ioctl SIOCGIFCONF, which only returns "running" interfaces. Restricting the enumeration to only "running" interfaces poses several problems. The problems are not solved by the first commit, but the third commit, "ibacm: Unable to resurrect an interface". As such, the first commit does not alter any functionality. The second commit is small fix in a debug print. The third commit is the new implementation of https://patchwork.kernel.org/patch/10748357, which was NAKed. This commit is now based on the netlink re-factoring from commit one. The forth commit aligns the use of interface names vs. interface aliases (label) with how the ip utility works. HÃ¥kon Bugge (4): ibacm: Replace ioctl with netlink ibacm: Print correct pkey ibacm: Unable to resurrect an interface ibacm: Use alias name when possible ibacm/CMakeLists.txt | 2 + ibacm/src/acm.c | 9 +- ibacm/src/acm_util.c | 262 ++++++++++++++++++++++++------------------- ibacm/src/acm_util.h | 5 +- 4 files changed, 161 insertions(+), 117 deletions(-) --- 2.20.1