From patchwork Fri Feb 1 18:50:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Haakon Bugge X-Patchwork-Id: 10793517 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 8F9DE13B5 for ; Fri, 1 Feb 2019 18:51:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8265032CE5 for ; Fri, 1 Feb 2019 18:51:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 76E9F32D08; Fri, 1 Feb 2019 18:51:29 +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 5F53F32CA9 for ; Fri, 1 Feb 2019 18:51:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728681AbfBASv2 (ORCPT ); Fri, 1 Feb 2019 13:51:28 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:34350 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730290AbfBASv1 (ORCPT ); Fri, 1 Feb 2019 13:51:27 -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 x11Ihq58159602; Fri, 1 Feb 2019 18:51:19 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=Ow3RhhQZzxV0ZitHcCrpy2ZcaaYOe+L5S6tdliPs06M=; b=wY/ILOoqIS1iB1yTfytfbm86/C93VqNf610sS+zJR/OngMsFja/+Ceq3ffNTnOkEIs5n A8xGiyha3khhzB4Ma+9XvL/MX+EVIun1r/vgrnv70SW/gDhQGDaOR4DC80wjRBk+sdeX YeEsinXzxwQVLbXJkjwjtu4B6DU8IXy1RH1NCfXbiGOFCTbnnulyLKe90JSwNhLrge6M KWe3P3FXbezwNWT+Tr/wy5zgfrOY0dXAP12mQ58ZsB9msRcFZlJ/Ga6hMtPpi8b0l3W+ ubYN3V97BlfofZveNj2kEpoqj6e3Vc+1rvohS6z1TdAwI8Hv1feESKIRmTSKQgQegowq Fg== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2130.oracle.com with ESMTP id 2q8d2ergsf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 01 Feb 2019 18:51:18 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x11IpC4N020623 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 1 Feb 2019 18:51:12 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x11IpCMM023243; Fri, 1 Feb 2019 18:51:12 GMT Received: from lab02.no.oracle.com (/10.172.144.56) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 01 Feb 2019 10:51:11 -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 v4 0/4] ibacm: Replace ioctl with netlink and fix inablity to resurrect an interface Date: Fri, 1 Feb 2019 19:50:45 +0100 Message-Id: <20190201185049.239177-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=722 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902010138 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 v3 -> v4: * Fixed CMake checks for netlink (Jason) 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 CMakeLists.txt | 5 +- ibacm/CMakeLists.txt | 2 + ibacm/src/acm.c | 9 +- ibacm/src/acm_util.c | 244 +++++++++++++++++++++++-------------------- ibacm/src/acm_util.h | 5 +- 5 files changed, 151 insertions(+), 114 deletions(-) --- 2.20.1