From patchwork Fri Feb 1 16:45:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Haakon Bugge X-Patchwork-Id: 10793275 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 6901313B5 for ; Fri, 1 Feb 2019 16:46:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56CBD3237F for ; Fri, 1 Feb 2019 16:46:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 494CE324D3; Fri, 1 Feb 2019 16:46:26 +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 E41FD3237F for ; Fri, 1 Feb 2019 16:46:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729419AbfBAQqZ (ORCPT ); Fri, 1 Feb 2019 11:46:25 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:51094 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726486AbfBAQqZ (ORCPT ); Fri, 1 Feb 2019 11:46:25 -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 x11GXwUf052092; Fri, 1 Feb 2019 16:46:17 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=DcAahCzOF1wVkAV1eNN7ELOGS1sDf86DrcLYY38mQ1Y=; b=q5JrskN/0UHNaPq0n7NuShcBibL9xccBcOYyc43TAU0ssUL+tAc1Enl0U7LNADNRn9mR 73BOu6MRPxJ9cLAl3DC9X0Z0kknkRzHu/PEktQ7kpcQCa1tAbtdyYOkjVQr/33aG/ZYC w4TKKYsW1IG8cIpmkqKV0DfJIC5Soueirh79SgN8vf9ULo8XxrqzLJmrtiYFIat15lFp Ju2OoZu47Dawse3BQ+E2S49nRt+atf6fqDMivS6mZIjcjZwGamk6u8GcnP8Ieqcc5ape cNjtDcweVvYfSPmuuFgOXWhJvZKyzWjTaUnSq23R1PUFY6OixzIFfw9OwnLFqp97+nFT eQ== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2q8d2eqwef-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 01 Feb 2019 16:46:16 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x11GkAQK023862 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 1 Feb 2019 16:46:11 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x11Gk9l4022045; Fri, 1 Feb 2019 16:46:09 GMT Received: from lab02.no.oracle.com (/10.172.144.56) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 01 Feb 2019 08:46:09 -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 v3 0/4] ibacm: Replace ioctl with netlink and fix inablity to resurrect an interface Date: Fri, 1 Feb 2019 17:45:53 +0100 Message-Id: <20190201164557.234039-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=9154 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=759 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902010122 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. v1 -> v2: * Added r-b for 2nd and 4th commit * Incorporated review comments from Jason and Ira * Minor nits fixed by the author v2 -> v3: * Added Ira's r-b 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 | 4 + ibacm/src/acm.c | 9 +- ibacm/src/acm_util.c | 244 +++++++++++++++++++++++-------------------- ibacm/src/acm_util.h | 5 +- 4 files changed, 149 insertions(+), 113 deletions(-) --- 2.20.1