Skip to contentSkip to conversation

fixes for net-2.6.24 - cleanup resend

PATCH In review Ursula Braun 2 participants 4 messages Oct 8, 2007

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover fixes for net-2.6.24 - cleanup resend

Signature · 3 lines
Dave,

this is the resend of my patches from last week built against net-2.6.24.
Quoted 3 lines

the following 2 patches are intended for 2.6.24 and contain:
- removal of static declarations in af_iucv header file
- postpone receival of inbound packets in af_iucv

Regards, Ursula

#1 lore raw

PATCH 1/2 af_iucv: remove static declarations from header file.

From: Heiko Carstens <[email protected]>

---

 include/net/iucv/af_iucv.h |   20 --------------------
 net/iucv/af_iucv.c         |    3 +++
 2 files changed, 3 insertions(+), 20 deletions(-)
include/net/iucv/af_iucv.h +0 -20
Index: net-2.6.24-uschi/include/net/iucv/af_iucv.h
===================================================================
@@ -74,28 +74,8 @@ struct iucv_sock_list {
 	atomic_t	  autobind_name;
 };
 
-static void iucv_sock_destruct(struct sock *sk);
-static void iucv_sock_cleanup_listen(struct sock *parent);
-static void iucv_sock_kill(struct sock *sk);
-static void iucv_sock_close(struct sock *sk);
-static int  iucv_sock_bind(struct socket *sock, struct sockaddr *addr,
-			int addr_len);
-static int  iucv_sock_connect(struct socket *sock, struct sockaddr *addr,
-			      int alen, int flags);
-static int  iucv_sock_listen(struct socket *sock, int backlog);
-static int  iucv_sock_accept(struct socket *sock, struct socket *newsock,
-			     int flags);
-static int  iucv_sock_getname(struct socket *sock, struct sockaddr *addr,
-			      int *len, int peer);
-static int  iucv_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
-			      struct msghdr *msg, size_t len);
-static int  iucv_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
-			      struct msghdr *msg, size_t len, int flags);
 unsigned int iucv_sock_poll(struct file *file, struct socket *sock,
 			    poll_table *wait);
-static int iucv_sock_release(struct socket *sock);
-static int iucv_sock_shutdown(struct socket *sock, int how);
-
 void iucv_sock_link(struct iucv_sock_list *l, struct sock *s);
 void iucv_sock_unlink(struct iucv_sock_list *l, struct sock *s);
 int  iucv_sock_wait_state(struct sock *sk, int state, int state2,
net/iucv/af_iucv.c +3 -0
Index: net-2.6.24-uschi/net/iucv/af_iucv.c
===================================================================
@@ -41,6 +41,9 @@ static struct proto iucv_proto = {
 	.obj_size	= sizeof(struct iucv_sock),
 };
 
+static void iucv_sock_kill(struct sock *sk);
+static void iucv_sock_close(struct sock *sk);
+
 /* Call Back functions */
 static void iucv_callback_rx(struct iucv_path *, struct iucv_message *);
 static void iucv_callback_txdone(struct iucv_path *, struct iucv_message *);
#2 lore raw

PATCH 2/2 af_iucv: postpone receival of iucv-packets

In reply to Ursula Braun

From: Ursula Braun <[email protected]>

AF_IUCV socket programs may waste Linux storage, because af_iucv allocates an skb whenever posted by the receive callback routine and receives the message immediately.
Message receival is now postponed if data from previous callbacks has not yet been transferred to the receiving socket program. Instead a message handle is saved in a message queue as a reminder. Once messages could be given to the receiving socket program, there is an additional checking for entries in the message queue, followed by skb allocation and message receival if applicable.

---

 include/net/iucv/af_iucv.h |    7 +
 net/iucv/af_iucv.c         |  215 ++++++++++++++++++++++++++-------------------
 2 files changed, 134 insertions(+), 88 deletions(-)
include/net/iucv/af_iucv.h +7 -0
Index: net-2.6.24-uschi/include/net/iucv/af_iucv.h
===================================================================
@@ -50,6 +50,12 @@ struct sockaddr_iucv {
 
 
 /* Common socket structures and functions */
+struct sock_msg_q {
+	struct iucv_path	*path;
+	struct iucv_message	msg;
+	struct list_head	list;
+	spinlock_t		lock;
+};
 
 #define iucv_sk(__sk) ((struct iucv_sock *) __sk)
 
@@ -65,6 +71,7 @@ struct iucv_sock {
 	struct iucv_path	*path;
 	struct sk_buff_head	send_skb_q;
 	struct sk_buff_head	backlog_skb_q;
+	struct sock_msg_q	message_q;
 	unsigned int		send_tag;
 };
 
net/iucv/af_iucv.c +127 -88

262 lines not on this page · raw message

maintainer
#3 lore raw
In reply to Ursula Braun

From: Ursula Braun <[email protected]>
Date: Mon, 08 Oct 2007 10:51:19 +0200

Quoted 8 lines
Signature · 3 lines
Dave,

this is the resend of my patches from last week built against net-2.6.24.
Quoted 3 lines

the following 2 patches are intended for 2.6.24 and contain:
- removal of static declarations in af_iucv header file
- postpone receival of inbound packets in af_iucv

All applied, thanks!