From: Eugene Syromiatnikov <esyr@redhat.com>
To: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org, Ursula Braun <ubraun@linux.ibm.com>,
Karsten Graul <kgraul@linux.ibm.com>
Subject: [PATCH net v2 3/3] uapi, net/smc: provide socket state constants in UAPI
Date: Fri, 20 Sep 2019 17:42:00 +0200 [thread overview]
Message-ID: <2be8f9cfd2e031a9217326ea89227e0517248f0f.1568993930.git.esyr@redhat.com> (raw)
In-Reply-To: <cover.1568993930.git.esyr@redhat.com>
As socket state itself is already exposed via sock_diag interface.
Fixes: ac7138746e14 ("smc: establish new socket family")
Fixes: b38d732477e4 ("smc: socket closing and linkgroup cleanup")
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
---
include/uapi/linux/smc_diag.h | 17 +++++++++++++++++
net/smc/smc.h | 18 +-----------------
2 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/include/uapi/linux/smc_diag.h b/include/uapi/linux/smc_diag.h
index 8cb3a6f..6798ec0 100644
--- a/include/uapi/linux/smc_diag.h
+++ b/include/uapi/linux/smc_diag.h
@@ -31,6 +31,23 @@ struct smc_diag_msg {
__aligned_u64 diag_inode;
};
+enum smc_state { /* possible states of an SMC socket */
+ SMC_ACTIVE = 1,
+ SMC_INIT = 2,
+ SMC_CLOSED = 7,
+ SMC_LISTEN = 10,
+ /* normal close */
+ SMC_PEERCLOSEWAIT1 = 20,
+ SMC_PEERCLOSEWAIT2 = 21,
+ SMC_APPFINCLOSEWAIT = 24,
+ SMC_APPCLOSEWAIT1 = 22,
+ SMC_APPCLOSEWAIT2 = 23,
+ SMC_PEERFINCLOSEWAIT = 25,
+ /* abnormal close */
+ SMC_PEERABORTWAIT = 26,
+ SMC_PROCESSABORT = 27,
+};
+
/* Mode of a connection */
enum {
SMC_DIAG_MODE_SMCR,
diff --git a/net/smc/smc.h b/net/smc/smc.h
index e60effc..7eaef72 100644
--- a/net/smc/smc.h
+++ b/net/smc/smc.h
@@ -16,6 +16,7 @@
#include <linux/compiler.h> /* __aligned */
#include <net/sock.h>
#include <linux/smc.h>
+#include <linux/smc_diag.h>
#include "smc_ib.h"
@@ -26,23 +27,6 @@ extern struct proto smc_proto6;
#define KERNEL_HAS_ATOMIC64
#endif
-enum smc_state { /* possible states of an SMC socket */
- SMC_ACTIVE = 1,
- SMC_INIT = 2,
- SMC_CLOSED = 7,
- SMC_LISTEN = 10,
- /* normal close */
- SMC_PEERCLOSEWAIT1 = 20,
- SMC_PEERCLOSEWAIT2 = 21,
- SMC_APPFINCLOSEWAIT = 24,
- SMC_APPCLOSEWAIT1 = 22,
- SMC_APPCLOSEWAIT2 = 23,
- SMC_PEERFINCLOSEWAIT = 25,
- /* abnormal close */
- SMC_PEERABORTWAIT = 26,
- SMC_PROCESSABORT = 27,
-};
-
struct smc_link_group;
struct smc_wr_rx_hdr { /* common prefix part of LLC and CDC to demultiplex */
--
2.1.4
next prev parent reply other threads:[~2019-09-20 15:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-20 15:41 [PATCH net v2 0/3] net/smc: move some definitions to UAPI Eugene Syromiatnikov
2019-09-20 15:41 ` [PATCH net v2 1/3] uapi, net/smc: move protocol constant " Eugene Syromiatnikov
2019-09-20 15:41 ` [PATCH net v2 2/3] uapi, net/smc: provide fallback diagnostic codes in UAPI Eugene Syromiatnikov
2019-09-20 15:42 ` Eugene Syromiatnikov [this message]
2019-09-23 15:27 ` [PATCH net v2 0/3] net/smc: move some definitions to UAPI Ursula Braun
2019-09-24 14:52 ` David Miller
2019-09-25 12:10 ` Ursula Braun
2019-09-25 14:16 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2be8f9cfd2e031a9217326ea89227e0517248f0f.1568993930.git.esyr@redhat.com \
--to=esyr@redhat.com \
--cc=davem@davemloft.net \
--cc=kgraul@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ubraun@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).