Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752715AbdIERNm (ORCPT ); Tue, 5 Sep 2017 13:13:42 -0400 Received: from mail-bl2nam02on0056.outbound.protection.outlook.com ([104.47.38.56]:22992 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752157AbdIERNi (ORCPT ); Tue, 5 Sep 2017 13:13:38 -0400 From: "Kalderon, Michal" To: Arnd Bergmann , "Amrani, Ram" , "Elior, Ariel" , Doug Ledford , Sean Hefty , Hal Rosenstock CC: "David S. Miller" , "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] RDMA/qedr: fix build error without ipv6 Thread-Topic: [PATCH] RDMA/qedr: fix build error without ipv6 Thread-Index: AQHTJlehaSDHoZ6j5EWoqaCOIChhBqKmhzDg Date: Tue, 5 Sep 2017 17:13:33 +0000 Message-ID: References: <20170905145935.1578698-1-arnd@arndb.de> In-Reply-To: <20170905145935.1578698-1-arnd@arndb.de> 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=Michal.Kalderon@cavium.com; x-originating-ip: [31.168.140.228] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR0701MB1113;6:h1CoYqCxg51Oo8uz37bEgTVMyfKugVNoEzCR01xODDq//K9sU6np1upQziSG1fKSJzMUrhBduIAqN3t3O+ZTuBZTYZGllPWphNzR/z3pj4fIneWdnqQAyyErRKV44o78/H+2XSFUw24bM7m+T6j7Kre2rttwGEEQbEHz3YsGyHP0E21ZcatdHI1utPKRHULmwjJyZOuo6RNd7OyWpQs8RkSYK3lyiTlVuAeFheWcS7oZCdQMXYWQoyF6mThrAiLMi07O38+pjrvqh1SiehNlVaJeF+oQDQC7G9o4u7rF7uicCpFwFRrSpv6SXDu+zJd/cKXsjIgV4oyhvMr6Gq3m5Q==;5:cqoSexc5oyBlqKbd3pf3npbQICa61cAnQOAK2LnQsIHd2xEHnAhREIqmwY60SxN/RnDQYmr+NW62M8DfOLBQvvZdUwExDuWAdkFB/ijT4osDa06jZeWD4vZf2DcbLNrrPw5G305yBlLR06tCX/08EQ==;24:upomwqlq7LDVc4VApKr/JQDZQ2pDJDcqkuw4yTHwlfmwPyKQ63CTDp8faunLd+nkpwj9lHqiV5YD6BmOim8qaD1VIN3UR/eb6cDZhn+MqRI=;7:IBZOlr0sNuOQeEPcqB2yNi9Zay9XgzbEQIhK2iBZSer2gT7h2hNjaMtxQruIHNgbnniQRGCh06v6xrfh0uZriZklUUCd1BmPYeuWO1pVTaEhh0FFRnDo/jdhrYgyJguDsAbzvOMth9yygdKed7QKuggYfSBHdfUKvNGazVzXFRNgfVtIthvRQpUD/yOlKNGBwKtDUQicwgo+LWFJamhYX9RPXcspjZnlsCP10xBCy2A= x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10009020)(6009001)(377454003)(199003)(189002)(2900100001)(478600001)(7696004)(33656002)(74316002)(99286003)(53546010)(55016002)(66066001)(81166006)(54906002)(81156014)(39060400002)(2950100002)(102836003)(97736004)(189998001)(6116002)(5660300001)(3846002)(53936002)(25786009)(86362001)(3280700002)(575784001)(54356999)(3660700001)(2906002)(68736007)(50986999)(77096006)(4326008)(101416001)(8676002)(6246003)(6506006)(305945005)(229853002)(9686003)(72206003)(106356001)(6436002)(76176999)(7736002)(8936002)(105586002)(14454004);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0701MB1113;H:CY1PR0701MB2012.namprd07.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; x-ms-office365-filtering-correlation-id: 5ffd2df8-e088-4c35-3a6f-08d4f4817007 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY1PR0701MB1113; x-ms-traffictypediagnostic: CY1PR0701MB1113: x-exchange-antispam-report-test: UriScan:(9452136761055)(228905959029699); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(93001095)(6041248)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123558100)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR0701MB1113;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR0701MB1113; x-forefront-prvs: 0421BF7135 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Sep 2017 17:13:33.2156 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1113 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v85HDjSt017661 Content-Length: 3037 Lines: 78 > From: Arnd Bergmann [mailto:arnd@arndb.de] > Sent: Tuesday, September 05, 2017 5:59 PM > To: Amrani, Ram ; Kalderon, Michal > ; Elior, Ariel ; > Doug Ledford ; Sean Hefty > ; Hal Rosenstock > Cc: Arnd Bergmann ; David S. Miller > ; Mintz, Yuval ; linux- > rdma@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: [PATCH] RDMA/qedr: fix build error without ipv6 > > When CONFIG_IPV6 disabled, we run into a link error: > > drivers/infiniband/hw/qedr/qedr_iw_cm.o: In function > `qedr_addr6_resolve.isra.3': > qedr_iw_cm.c:(.text+0x4e0): undefined reference to > `ip6_route_output_flags' > > The ipv6 handling code is obviously not needed here, so this adds a compile- > time check for the Kconfig symbol in all three places in the code that decide > between ipv4 and ipv6. > > We don't have to worry about a link error wtih QEDR=y/IPV6=m, as that > configuration is already prohibited by CONFIG_INFINIBAND depending on "m > || IPV6 != m". > > Fixes: e411e0587e0d ("RDMA/qedr: Add iWARP connection management > functions") > Signed-off-by: Arnd Bergmann > --- > drivers/infiniband/hw/qedr/qedr_iw_cm.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/infiniband/hw/qedr/qedr_iw_cm.c > b/drivers/infiniband/hw/qedr/qedr_iw_cm.c > index fe9b2b6149b0..2950d3f6ecb8 100644 > --- a/drivers/infiniband/hw/qedr/qedr_iw_cm.c > +++ b/drivers/infiniband/hw/qedr/qedr_iw_cm.c > @@ -98,7 +98,8 @@ qedr_iw_mpa_request(void *context, struct > qed_iwarp_cm_event_params *params) > event.event = IW_CM_EVENT_CONNECT_REQUEST; > event.status = params->status; > > - if (params->cm_info->ip_version == QED_TCP_IPV4) > + if (!IS_ENABLED(CONFIG_IPV6) || > + params->cm_info->ip_version == QED_TCP_IPV4) > qedr_fill_sockaddr4(params->cm_info, &event); > else > qedr_fill_sockaddr6(params->cm_info, &event); @@ -522,7 > +523,8 @@ int qedr_iw_connect(struct iw_cm_id *cm_id, struct > iw_cm_conn_param *conn_param) > memset(cm_info->local_ip, 0, sizeof(cm_info->local_ip)); > memset(cm_info->remote_ip, 0, sizeof(cm_info->remote_ip)); > > - if (cm_id->remote_addr.ss_family == AF_INET) { > + if (!IS_ENABLED(CONFIG_IPV6) || > + cm_id->remote_addr.ss_family == AF_INET) { > cm_info->ip_version = QED_TCP_IPV4; > > cm_info->remote_ip[0] = ntohl(raddr->sin_addr.s_addr); > @@ -616,7 +618,8 @@ int qedr_iw_create_listen(struct iw_cm_id *cm_id, > int backlog) > iparams.event_cb = qedr_iw_event_handler; > iparams.max_backlog = backlog; > > - if (cm_id->local_addr.ss_family == AF_INET) { > + if (!IS_ENABLED(CONFIG_IPV6) || > + cm_id->local_addr.ss_family == AF_INET) { > iparams.ip_version = QED_TCP_IPV4; > memset(iparams.ip_addr, 0, sizeof(iparams.ip_addr)); > > -- > 2.9.0 Thanks! Acked-by: Michal Kalderon