netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: frank.blaschka@de.ibm.com
To: netdev@vger.kernel.org, linux-s390@vger.kernel.org
Subject: [patch 01/11] [PATCH] iucv: introduce loadable iucv interface
Date: Wed, 27 Jul 2011 18:12:43 +0200	[thread overview]
Message-ID: <20110727161338.451476486@de.ibm.com> (raw)
In-Reply-To: 20110727161242.018577444@de.ibm.com

[-- Attachment #1: net1117-iucv-introduce-loadable-iucv-interface.patch --]
[-- Type: text/plain, Size: 3456 bytes --]

From: Frank Blaschka <frank.blaschka@de.ibm.com>

This patch adds a symbol to dynamically load iucv functions.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
 include/net/iucv/iucv.h |   36 +++++++++++++++++++++++++++++++++++-
 net/iucv/iucv.c         |   23 +++++++++++++++++++++++
 2 files changed, 58 insertions(+), 1 deletion(-)

--- a/include/net/iucv/iucv.h
+++ b/include/net/iucv/iucv.h
@@ -120,7 +120,7 @@ struct iucv_message {
 	u32 reply_size;
 	u8  rmmsg[8];
 	u8  flags;
-};
+} __packed;
 
 /*
  * struct iucv_handler
@@ -459,3 +459,37 @@ int __iucv_message_send(struct iucv_path
 int iucv_message_send2way(struct iucv_path *path, struct iucv_message *msg,
 			  u8 flags, u32 srccls, void *buffer, size_t size,
 			  void *answer, size_t asize, size_t *residual);
+
+struct iucv_interface {
+	int (*message_receive)(struct iucv_path *path, struct iucv_message *msg,
+		u8 flags, void *buffer, size_t size, size_t *residual);
+	int (*__message_receive)(struct iucv_path *path,
+		struct iucv_message *msg, u8 flags, void *buffer, size_t size,
+		size_t *residual);
+	int (*message_reply)(struct iucv_path *path, struct iucv_message *msg,
+		u8 flags, void *reply, size_t size);
+	int (*message_reject)(struct iucv_path *path, struct iucv_message *msg);
+	int (*message_send)(struct iucv_path *path, struct iucv_message *msg,
+		u8 flags, u32 srccls, void *buffer, size_t size);
+	int (*__message_send)(struct iucv_path *path, struct iucv_message *msg,
+		u8 flags, u32 srccls, void *buffer, size_t size);
+	int (*message_send2way)(struct iucv_path *path,
+		struct iucv_message *msg, u8 flags, u32 srccls, void *buffer,
+		size_t size, void *answer, size_t asize, size_t *residual);
+	int (*message_purge)(struct iucv_path *path, struct iucv_message *msg,
+		u32 srccls);
+	int (*path_accept)(struct iucv_path *path, struct iucv_handler *handler,
+		u8 userdata[16], void *private);
+	int (*path_connect)(struct iucv_path *path,
+		struct iucv_handler *handler,
+		u8 userid[8], u8 system[8], u8 userdata[16], void *private);
+	int (*path_quiesce)(struct iucv_path *path, u8 userdata[16]);
+	int (*path_resume)(struct iucv_path *path, u8 userdata[16]);
+	int (*path_sever)(struct iucv_path *path, u8 userdata[16]);
+	int (*iucv_register)(struct iucv_handler *handler, int smp);
+	void (*iucv_unregister)(struct iucv_handler *handler, int smp);
+	struct bus_type *bus;
+	struct device *root;
+};
+
+extern struct iucv_interface iucv_if;
--- a/net/iucv/iucv.c
+++ b/net/iucv/iucv.c
@@ -1974,6 +1974,27 @@ out:
 	return rc;
 }
 
+struct iucv_interface iucv_if = {
+	.message_receive = iucv_message_receive,
+	.__message_receive = __iucv_message_receive,
+	.message_reply = iucv_message_reply,
+	.message_reject = iucv_message_reject,
+	.message_send = iucv_message_send,
+	.__message_send = __iucv_message_send,
+	.message_send2way = iucv_message_send2way,
+	.message_purge = iucv_message_purge,
+	.path_accept = iucv_path_accept,
+	.path_connect = iucv_path_connect,
+	.path_quiesce = iucv_path_quiesce,
+	.path_resume = iucv_path_resume,
+	.path_sever = iucv_path_sever,
+	.iucv_register = iucv_register,
+	.iucv_unregister = iucv_unregister,
+	.bus = NULL,
+	.root = NULL,
+};
+EXPORT_SYMBOL(iucv_if);
+
 /**
  * iucv_init
  *
@@ -2037,6 +2058,8 @@ static int __init iucv_init(void)
 	rc = bus_register(&iucv_bus);
 	if (rc)
 		goto out_reboot;
+	iucv_if.root = iucv_root;
+	iucv_if.bus = &iucv_bus;
 	return 0;
 
 out_reboot:


  reply	other threads:[~2011-07-27 16:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-27 16:12 [patch 00/11] [RFC] s390: af_iucv traffic over HiperSockets transport frank.blaschka
2011-07-27 16:12 ` frank.blaschka [this message]
2011-07-27 23:29   ` [patch 01/11] [PATCH] iucv: introduce loadable iucv interface David Miller
2011-07-28  4:13     ` Frank Blaschka
2011-07-28  5:10       ` David Miller
2011-07-27 16:12 ` [patch 02/11] [PATCH] iucv: kernel option for z/VM IUCV and HiperSockets frank.blaschka
2011-07-27 16:12 ` [patch 03/11] [PATCH] af_iucv: use loadable iucv interface frank.blaschka
2011-07-27 16:12 ` [patch 04/11] [PATCH] af_iucv: cleanup - use iucv_sk(sk) early frank.blaschka
2011-07-27 16:12 ` [patch 05/11] [PATCH] if_ether: add new Ethernet Protocol ID for af_iucv frank.blaschka
2011-07-27 16:12 ` [patch 06/11] [PATCH] af_iucv: add HiperSockets transport frank.blaschka
2011-07-27 16:12 ` [patch 07/11] [PATCH] qdio: support asynchronous delivery of storage blocks frank.blaschka
2011-07-27 16:12 ` [patch 08/11] [PATCH] qdio: support forced signal adapter indications frank.blaschka
2011-07-27 16:12 ` [patch 09/11] [PATCH] qeth: " frank.blaschka
2011-07-27 16:12 ` [patch 10/11] [PATCH] qeth: exploit asynchronous delivery of storage blocks frank.blaschka
2011-07-27 16:12 ` [patch 11/11] [PATCH] qeth: add support for af_iucv HiperSockets transport frank.blaschka

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=20110727161338.451476486@de.ibm.com \
    --to=frank.blaschka@de.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).