Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp2127294ybj; Sun, 22 Sep 2019 20:40:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqwco8RxfLTdNv+mtGJII56u1nQ3YsFId2e1F7AWpw+XnTYJdHClm+zSMHSL+CwMeUcLi7iz X-Received: by 2002:a50:c052:: with SMTP id u18mr34694177edd.88.1569210027810; Sun, 22 Sep 2019 20:40:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569210027; cv=none; d=google.com; s=arc-20160816; b=zTYK6jjCV22VlU4cgKJ9JddNsDrVcW1bB7SsC5tlXpdyzmvej+QdmEMwZ9LxKWw+Bn xZ++VTX1FkmNezMsqauMrkTP0lZuYvMYvOA70amqWIQTM/XZstfaDv/QBMrd4p5VXy5I NEy7fQ9ODziAYzEHX4HmmpPviPZjV5Dv75vsO4CobOTqqqZ1P7vE7b344q1+4Q8yUUYJ gSzzfw1nwwTXpOnv79EgPuk42sh5sZoNCW0JBdGwU7eOutzVKPQEAD53yWIQCcjqxTJ8 Gi0Nvy/1oCAPM8z4oK5T0uonFjg7BOIATinzbKpIduLYHGt4d49UJlDpoQMHdnkofag/ qbDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=XEA3BCG9D0nRkSbU+vv6wQxDSDDpfcVOSJqCJrDqEq8=; b=JqpVOHQRT4CsUfsgwl0Ew0xJUh0EUI7NqPFYKWDc1XKFXDt9gP8icib59To1NLmhdu JvZv+gs8AqaVFHne1HMBhppotxwBmDqUd0jKATTVx4mG67a1Zgidmt5vD7pVubLQno0h OMC9+PhRnxU6LaH+SVF9ZfOQhg/bjhRYBGqO6AYgN2YlwCGOZacyCiu7K80ALKrQrjKu W8Z1+MMe6eNsahetwggbwdMFhLq8zbioJvQFdLWMpl5bnumrr0HMtTYfhWDNyTENq7Vo 9+mhbw9CDPYXGGCU9P9y+YKlQfDlTQGdiWvA4tBDgutraGH8gqlaz7ifk9pdF9CPjN4Q pynQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3si6063326edc.109.2019.09.22.20.39.32; Sun, 22 Sep 2019 20:40:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393600AbfITPmW (ORCPT + 99 others); Fri, 20 Sep 2019 11:42:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45126 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393522AbfITPmU (ORCPT ); Fri, 20 Sep 2019 11:42:20 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 02BC081DE3; Fri, 20 Sep 2019 15:42:20 +0000 (UTC) Received: from asgard.redhat.com (ovpn-112-68.ams2.redhat.com [10.36.112.68]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 69CEB60461; Fri, 20 Sep 2019 15:42:18 +0000 (UTC) Date: Fri, 20 Sep 2019 17:41:55 +0200 From: Eugene Syromiatnikov To: netdev@vger.kernel.org Cc: "David S. Miller" , linux-kernel@vger.kernel.org, Ursula Braun , Karsten Graul Subject: [PATCH net v2 2/3] uapi, net/smc: provide fallback diagnostic codes in UAPI Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 20 Sep 2019 15:42:20 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since the values to which these codes are corresponding to are already exposed via sock_diag interface. Signed-off-by: Eugene Syromiatnikov --- include/uapi/linux/smc.h | 25 +++++++++++++++++++++++++ net/smc/smc_clc.h | 22 ---------------------- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/include/uapi/linux/smc.h b/include/uapi/linux/smc.h index 10561f8..9fbf365 100644 --- a/include/uapi/linux/smc.h +++ b/include/uapi/linux/smc.h @@ -17,6 +17,31 @@ #define SMCPROTO_SMC 0 /* SMC protocol, IPv4 */ #define SMCPROTO_SMC6 1 /* SMC protocol, IPv6 */ +/* Diagnostic codes */ +#define SMC_CLC_DECL_MEM 0x01010000 /* insufficient memory resources */ +#define SMC_CLC_DECL_TIMEOUT_CL 0x02010000 /* timeout w4 QP confirm link */ +#define SMC_CLC_DECL_TIMEOUT_AL 0x02020000 /* timeout w4 QP add link */ +#define SMC_CLC_DECL_CNFERR 0x03000000 /* configuration error */ +#define SMC_CLC_DECL_PEERNOSMC 0x03010000 /* peer did not indicate SMC */ +#define SMC_CLC_DECL_IPSEC 0x03020000 /* IPsec usage */ +#define SMC_CLC_DECL_NOSMCDEV 0x03030000 /* no SMC device found (R or D) */ +#define SMC_CLC_DECL_NOSMCDDEV 0x03030001 /* no SMC-D device found */ +#define SMC_CLC_DECL_NOSMCRDEV 0x03030002 /* no SMC-R device found */ +#define SMC_CLC_DECL_SMCDNOTALK 0x03030003 /* SMC-D dev can't talk to peer */ +#define SMC_CLC_DECL_MODEUNSUPP 0x03040000 /* smc modes do not match (R or D)*/ +#define SMC_CLC_DECL_RMBE_EC 0x03050000 /* peer has eyecatcher in RMBE */ +#define SMC_CLC_DECL_OPTUNSUPP 0x03060000 /* fastopen sockopt not supported */ +#define SMC_CLC_DECL_DIFFPREFIX 0x03070000 /* IP prefix / subnet mismatch */ +#define SMC_CLC_DECL_GETVLANERR 0x03080000 /* err to get vlan id of ip device*/ +#define SMC_CLC_DECL_ISMVLANERR 0x03090000 /* err to reg vlan id on ism dev */ +#define SMC_CLC_DECL_SYNCERR 0x04000000 /* synchronization error */ +#define SMC_CLC_DECL_PEERDECL 0x05000000 /* peer declined during handshake */ +#define SMC_CLC_DECL_INTERR 0x09990000 /* internal error */ +#define SMC_CLC_DECL_ERR_RTOK 0x09990001 /* rtoken handling failed */ +#define SMC_CLC_DECL_ERR_RDYLNK 0x09990002 /* ib ready link failed */ +#define SMC_CLC_DECL_ERR_REGRMB 0x09990003 /* reg rmb failed */ + + /* Netlink SMC_PNETID attributes */ enum { SMC_PNETID_UNSPEC, diff --git a/net/smc/smc_clc.h b/net/smc/smc_clc.h index ca20927..db6a78f 100644 --- a/net/smc/smc_clc.h +++ b/net/smc/smc_clc.h @@ -28,28 +28,6 @@ #define SMC_TYPE_B 3 /* SMC-R and SMC-D */ #define CLC_WAIT_TIME (6 * HZ) /* max. wait time on clcsock */ #define CLC_WAIT_TIME_SHORT HZ /* short wait time on clcsock */ -#define SMC_CLC_DECL_MEM 0x01010000 /* insufficient memory resources */ -#define SMC_CLC_DECL_TIMEOUT_CL 0x02010000 /* timeout w4 QP confirm link */ -#define SMC_CLC_DECL_TIMEOUT_AL 0x02020000 /* timeout w4 QP add link */ -#define SMC_CLC_DECL_CNFERR 0x03000000 /* configuration error */ -#define SMC_CLC_DECL_PEERNOSMC 0x03010000 /* peer did not indicate SMC */ -#define SMC_CLC_DECL_IPSEC 0x03020000 /* IPsec usage */ -#define SMC_CLC_DECL_NOSMCDEV 0x03030000 /* no SMC device found (R or D) */ -#define SMC_CLC_DECL_NOSMCDDEV 0x03030001 /* no SMC-D device found */ -#define SMC_CLC_DECL_NOSMCRDEV 0x03030002 /* no SMC-R device found */ -#define SMC_CLC_DECL_SMCDNOTALK 0x03030003 /* SMC-D dev can't talk to peer */ -#define SMC_CLC_DECL_MODEUNSUPP 0x03040000 /* smc modes do not match (R or D)*/ -#define SMC_CLC_DECL_RMBE_EC 0x03050000 /* peer has eyecatcher in RMBE */ -#define SMC_CLC_DECL_OPTUNSUPP 0x03060000 /* fastopen sockopt not supported */ -#define SMC_CLC_DECL_DIFFPREFIX 0x03070000 /* IP prefix / subnet mismatch */ -#define SMC_CLC_DECL_GETVLANERR 0x03080000 /* err to get vlan id of ip device*/ -#define SMC_CLC_DECL_ISMVLANERR 0x03090000 /* err to reg vlan id on ism dev */ -#define SMC_CLC_DECL_SYNCERR 0x04000000 /* synchronization error */ -#define SMC_CLC_DECL_PEERDECL 0x05000000 /* peer declined during handshake */ -#define SMC_CLC_DECL_INTERR 0x09990000 /* internal error */ -#define SMC_CLC_DECL_ERR_RTOK 0x09990001 /* rtoken handling failed */ -#define SMC_CLC_DECL_ERR_RDYLNK 0x09990002 /* ib ready link failed */ -#define SMC_CLC_DECL_ERR_REGRMB 0x09990003 /* reg rmb failed */ struct smc_clc_msg_hdr { /* header1 of clc messages */ u8 eyecatcher[4]; /* eye catcher */ -- 2.1.4