[ofa-general] [PATCH v2 6/6] Fixed reference accounting
Amir Vadai
amirv at mellanox.co.il
Thu Jul 10 00:48:53 PDT 2008
Signed-off-by: Amir Vadai <amirv at mellanox.co.il>
---
drivers/infiniband/ulp/sdp/sdp.h | 63 +++++++++++-
drivers/infiniband/ulp/sdp/sdp_bcopy.c | 56 ++++--------
drivers/infiniband/ulp/sdp/sdp_cma.c | 22 ++++-
drivers/infiniband/ulp/sdp/sdp_main.c | 98 ++++++++++----------
.../2.6.16/sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../2.6.16_sles10/sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../2.6.17/sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../2.6.18-EL5.1/sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../2.6.18-EL5.2/sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../2.6.18/sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../2.6.18_FC6/sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../2.6.19/sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../2.6.20/sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../2.6.21/sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../2.6.22/sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../2.6.23/sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../2.6.24/sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../2.6.9_U4/sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../backport/2.6.9_U4/sdp_7277_to_2_6_11.patch | 18 ++--
.../2.6.9_U5/sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../backport/2.6.9_U5/sdp_7277_to_2_6_11.patch | 18 ++--
.../2.6.9_U6/sdp_0090_revert_to_2_6_24.patch | 72 ++++++++-------
.../backport/2.6.9_U6/sdp_7277_to_2_6_11.patch | 18 ++--
27 files changed, 928 insertions(+), 805 deletions(-)
diff --git a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
index 3b2dffb..ffe2182 100644
--- a/drivers/infiniband/ulp/sdp/sdp.h
+++ b/drivers/infiniband/ulp/sdp/sdp.h
@@ -110,7 +110,7 @@ struct sdp_sock {
struct work_struct work;
wait_queue_head_t wq;
- struct delayed_work time_wait_work;
+ struct delayed_work fin_wait_work;
struct work_struct destroy_work;
/* Like tcp_sock */
@@ -129,10 +129,13 @@ struct sdp_sock {
unsigned keepalive_time;
+ spinlock_t lock;
+
/* tx_head/rx_head when keepalive timer started */
unsigned keepalive_tx_head;
unsigned keepalive_rx_head;
+ int destructed_already;
int sdp_disconnect;
/* Data below will be reset on error */
@@ -220,21 +223,69 @@ static inline struct sdp_sock *sdp_sk(const struct sock *sk)
return (struct sdp_sock *)sk;
}
-static inline void sdp_set_state(struct sock *sk, int state)
+static inline char *sdp_state_str(int state)
{
+ static char *state_str[] = {
+ [TCP_ESTABLISHED] = "TCP_ESTABLISHED",
+ [TCP_SYN_SENT] = "TCP_SYN_SENT",
+ [TCP_SYN_RECV] = "TCP_SYN_RECV",
+ [TCP_FIN_WAIT1] = "TCP_FIN_WAIT1",
+ [TCP_FIN_WAIT2] = "TCP_FIN_WAIT2",
+ [TCP_TIME_WAIT] = "TCP_TIME_WAIT",
+ [TCP_CLOSE] = "TCP_CLOSE",
+ [TCP_CLOSE_WAIT] = "TCP_CLOSE_WAIT",
+ [TCP_LAST_ACK] = "TCP_LAST_ACK",
+ [TCP_LISTEN] = "TCP_LISTEN",
+ [TCP_CLOSING] = "TCP_CLOSING",
+ };
+
+ if (state < 0 || state >= TCP_MAX_STATES)
+ return "unknown";
+
+ return state_str[state];
+}
+
+static inline int _sdp_exch_state(const char *func, int line, struct sock *sk,
+ int state)
+{
+ unsigned long flags;
+ int old;
+
+ sdp_dbg(sk, "%s:%d - set state: %s -> %s 0x%x\n", __func__, __LINE__,
+ sdp_state_str(old_state), sdp_state_str(state), orig_states);
+
+ if ((1 << old_state) & ~(orig_states)) {
+ sdp_warn(sk, "trying to exchange state from unexpected state "
+ "%s to state %s. expected states: 0x%x\n",
+ sdp_state_str(old_state), sdp_state_str(state),
+ orig_states);
+ dump_stack();
+ }
+
+ spin_lock_irqsave(&sdp_sk(sk)->lock, flags);
+
+ old = sk->sk_state;
sk->sk_state = state;
+
+ spin_unlock_irqrestore(&sdp_sk(sk)->lock, flags);
+
+ return old;
}
+#define sdp_exch_state(sk, orig_states, state) \
+ _sdp_exch_state(__func__, __LINE__, sk, state);
static inline void sdp_set_error(struct sock *sk, int err)
{
+ unsigned char ib_teardown_states = TCPF_FIN_WAIT1 | TCPF_CLOSE_WAIT
+ | TCPF_LAST_ACK;
sk->sk_err = -err;
if (sk->sk_socket)
sk->sk_socket->state = SS_DISCONNECTING;
- if (sk->sk_state == TCP_SYN_SENT)
- sdp_set_state(sk, TCP_CLOSE);
+ if ((1 << sk->sk_state) & ib_teardown_states)
+ sdp_exch_state(sk, ib_teardown_states);
else
- sdp_set_state(sk, TCP_TIME_WAIT);
+ sdp_exch_state(sk, ~0, TCP_CLOSE);
sk->sk_error_report(sk);
}
@@ -254,7 +305,7 @@ void sdp_post_sends(struct sdp_sock *ssk, int nonagle);
void sdp_destroy_work(struct work_struct *work);
void sdp_cancel_fin_wait_timeout(struct sdp_sock *ssk);
void sdp_fin_work(struct work_struct *work);
-void sdp_time_wait_work(struct work_struct *work);
+void sdp_fin_wait_work(struct work_struct *work);
struct sk_buff *sdp_recv_completion(struct sdp_sock *ssk, int id);
struct sk_buff *sdp_send_completion(struct sdp_sock *ssk, int mseq);
void sdp_urg(struct sdp_sock *ssk, struct sk_buff *skb);
diff --git a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
index d3f50b5..77f2d99 100644
--- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
@@ -107,22 +107,15 @@ static void sdp_fin(struct sock *sk)
switch (sk->sk_state) {
case TCP_SYN_RECV:
case TCP_ESTABLISHED:
- sdp_set_state(sk, TCP_CLOSE_WAIT);
+ sdp_exch_state(sk, TCPF_SYN_RECV | TCPF_ESTABLISHED,
+ TCP_CLOSE_WAIT);
break;
case TCP_FIN_WAIT1:
- /* This case occurs when a simultaneous close
- * happens, we must ack the received FIN and
- * enter the CLOSING state.
- */
- sdp_set_state(sk, TCP_CLOSING);
- break;
-
- case TCP_FIN_WAIT2:
/* Received a reply FIN - start Infiniband tear down */
- sdp_set_state(sk, TCP_TIME_WAIT);
sdp_dbg(sk, "%s: Starting Infiniband tear down sending DREQ\n",
__func__);
+ sdp_exch_state(sk, TCPF_FIN_WAIT1, TCP_TIME_WAIT);
if (sdp_sk(sk)->id) {
rdma_disconnect(sdp_sk(sk)->id);
@@ -132,7 +125,8 @@ static void sdp_fin(struct sock *sk)
}
break;
case TCP_TIME_WAIT:
- case TCP_CLOSE:
+ /* This is a mutual close situation and we've got the DREQ from
+ the peer before the SDP_MID_DISCONNECT */
break;
default:
sdp_warn(sk, "%s: FIN in unexpected state. sk->sk_state=%d\n",
@@ -425,7 +419,7 @@ static inline struct sk_buff *sdp_sock_queue_rcv_skb(struct sock *sk,
{
int skb_len;
struct sdp_sock *ssk = sdp_sk(sk);
- struct sk_buff *tail;
+ struct sk_buff *tail = NULL;
/* not needed since sk_rmem_alloc is not currently used
* TODO - remove this?
@@ -562,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk, int nonagle)
likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
skb = sdp_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
@@ -698,10 +692,10 @@ static int sdp_handle_recv_comp(struct sdp_sock *ssk, struct ib_wc *wc)
if (unlikely(sk->sk_shutdown & RCV_SHUTDOWN)) {
/* got data in RCV_SHUTDOWN */
- if ((1 << sk->sk_state) &
- (TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2)) {
+ if (sk->sk_state == TCP_FIN_WAIT1) {
/* go into abortive close */
- sdp_set_state(sk, TCP_TIME_WAIT);
+ sdp_exch_state(sk, TCPF_FIN_WAIT1,
+ TCP_TIME_WAIT);
sk->sk_prot->disconnect(sk, 0);
}
@@ -749,10 +743,13 @@ static int sdp_handle_send_comp(struct sdp_sock *ssk, struct ib_wc *wc)
if (unlikely(wc->status)) {
if (wc->status != IB_WC_WR_FLUSH_ERR) {
- sdp_dbg(&ssk->isk.sk, "Send completion with error. "
- "Status %d\n", wc->status);
- sdp_set_error(&ssk->isk.sk, -ECONNRESET);
+ struct sock *sk = &ssk->isk.sk;
+ sdp_dbg(sk, "Send completion with error. "
+ "Status %d\n", wc->status);
+ sdp_set_error(sk, -ECONNRESET);
wake_up(&ssk->wq);
+
+ queue_work(sdp_workqueue, &ssk->destroy_work);
}
goto out;
}
@@ -762,26 +759,7 @@ static int sdp_handle_send_comp(struct sdp_sock *ssk, struct ib_wc *wc)
if (likely(h->mid != SDP_MID_DISCONN))
goto out;
- switch (ssk->isk.sk.sk_state) {
- case TCP_FIN_WAIT1:
- /* sdp_set_state(&ssk->isk.sk,
- TCP_FIN_WAIT2); */
- break;
- case TCP_CLOSING:
- case TCP_LAST_ACK:
- sdp_set_state(&ssk->isk.sk, TCP_TIME_WAIT);
-
- sdp_dbg(&ssk->isk.sk,
- "%s: waiting for Infiniband tear down\n", __func__);
-
- /* We will not issue a DREQ here - because DREQ is sent on
- the CM QP - and could reach the peer before the
- SDP_MID_DISCONNECT This will put the peer in abortive close
- state - without any real reason.
- TODO: maybe a timeout whould be used here - what if the
- peer won't send a DREQ? */
- break;
- default:
+ if ((1 << ssk->isk.sk.sk_state) & ~(TCPF_FIN_WAIT1 | TCPF_LAST_ACK)) {
sdp_dbg(&ssk->isk.sk,
"%s: sent DISCONNECT from unexpected state %d\n",
__func__, ssk->isk.sk.sk_state);
diff --git a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
index 8759bac..768c862 100644
--- a/drivers/infiniband/ulp/sdp/sdp_cma.c
+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -220,7 +220,7 @@ int sdp_connect_handler(struct sock *sk, struct rdma_cm_id *id,
sdp_add_sock(sdp_sk(child));
INIT_LIST_HEAD(&sdp_sk(child)->accept_queue);
INIT_LIST_HEAD(&sdp_sk(child)->backlog_queue);
- INIT_DELAYED_WORK(&sdp_sk(child)->time_wait_work, sdp_time_wait_work);
+ INIT_DELAYED_WORK(&sdp_sk(child)->fin_wait_work, sdp_fin_wait_work);
INIT_WORK(&sdp_sk(child)->destroy_work, sdp_destroy_work);
dst_addr = (struct sockaddr_in *)&id->route.addr.dst_addr;
@@ -256,7 +256,7 @@ int sdp_connect_handler(struct sock *sk, struct rdma_cm_id *id,
list_add_tail(&sdp_sk(child)->backlog_queue, &sdp_sk(sk)->backlog_queue);
sdp_sk(child)->parent = sk;
- sdp_set_state(child, TCP_SYN_RECV);
+ sdp_exch_state(child, TCPF_LISTEN | TCPF_CLOSE, TCP_SYN_RECV);
/* child->sk_write_space(child); */
/* child->sk_data_ready(child, 0); */
@@ -272,7 +272,7 @@ static int sdp_response_handler(struct sock *sk, struct rdma_cm_id *id,
struct sockaddr_in *dst_addr;
sdp_dbg(sk, "%s\n", __func__);
- sdp_set_state(sk, TCP_ESTABLISHED);
+ sdp_exch_state(sk, TCPF_SYN_SENT, TCP_ESTABLISHED);
if (sock_flag(sk, SOCK_KEEPOPEN))
sdp_start_keepalive_timer(sk);
@@ -316,7 +316,7 @@ int sdp_connected_handler(struct sock *sk, struct rdma_cm_event *event)
parent = sdp_sk(sk)->parent;
BUG_ON(!parent);
- sdp_set_state(sk, TCP_ESTABLISHED);
+ sdp_exch_state(sk, TCPF_SYN_RECV, TCP_ESTABLISHED);
if (sock_flag(sk, SOCK_KEEPOPEN))
sdp_start_keepalive_timer(sk);
@@ -500,6 +500,14 @@ int sdp_cma_handler(struct rdma_cm_id *id, struct rdma_cm_event *event)
break;
case RDMA_CM_EVENT_DISCONNECTED: /* This means DREQ/DREP received */
sdp_dbg(sk, "RDMA_CM_EVENT_DISCONNECTED\n");
+
+ if (sk->sk_state == TCP_LAST_ACK) {
+ sdp_exch_state(sk, TCPF_LAST_ACK, TCP_TIME_WAIT);
+
+ sdp_dbg(sk, "%s: waiting for Infiniband tear down\n",
+ __func__);
+ }
+
rdma_disconnect(id);
if (sk->sk_state != TCP_TIME_WAIT) {
@@ -525,6 +533,12 @@ int sdp_cma_handler(struct rdma_cm_id *id, struct rdma_cm_event *event)
sdp_dbg(sk, "%s event %d handled\n", __func__, event->event);
if (rc && sdp_sk(sk)->id == id) {
+ if (sk->sk_state == TCP_SYN_RECV) {
+ /* sdp_close() will not be called therefore we need
+ to take a refernce till infiniband teardown is
+ finished */
+ sock_hold(sk);
+ }
child = sk;
sdp_sk(sk)->id = NULL;
id->qp = NULL;
diff --git a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
index 960ec90..4cfc4af 100644
--- a/drivers/infiniband/ulp/sdp/sdp_main.c
+++ b/drivers/infiniband/ulp/sdp/sdp_main.c
@@ -342,10 +342,10 @@ void sdp_reset_sk(struct sock *sk, int rc)
memset((void *)&ssk->id, 0, sizeof(*ssk) - offsetof(typeof(*ssk), id));
- queue_work(sdp_workqueue, &ssk->destroy_work);
-
sk->sk_state_change(sk);
+ queue_work(sdp_workqueue, &ssk->destroy_work);
+
read_unlock(&device_removal_lock);
}
@@ -414,6 +414,12 @@ static void sdp_destruct(struct sock *sk)
struct sdp_sock *s, *t;
sdp_dbg(sk, "%s\n", __func__);
+ if (ssk->destructed_already) {
+ sdp_warn(sk, "redestructing sk!");
+ return;
+ }
+
+ ssk->destructed_already = 1;
sdp_remove_sock(ssk);
@@ -441,7 +447,7 @@ static void sdp_send_disconnect(struct sock *sk)
/*
* State processing on a close.
- * TCP_ESTABLISHED -> TCP_FIN_WAIT1 -> TCP_FIN_WAIT2 -> TCP_CLOSE
+ * TCP_ESTABLISHED -> TCP_FIN_WAIT1 -> TCP_CLOSE
*/
static int sdp_close_state(struct sock *sk)
@@ -450,9 +456,9 @@ static int sdp_close_state(struct sock *sk)
return 0;
if (sk->sk_state == TCP_ESTABLISHED)
- sdp_set_state(sk, TCP_FIN_WAIT2);/* should be TCP_FIN_WAIT1 */
+ sdp_exch_state(sk, TCPF_ESTABLISHED, TCP_FIN_WAIT1);
else if (sk->sk_state == TCP_CLOSE_WAIT)
- sdp_set_state(sk, TCP_LAST_ACK);
+ sdp_exch_state(sk, TCPF_CLOSE_WAIT, TCP_LAST_ACK);
else
return 0;
return 1;
@@ -464,27 +470,30 @@ static void sdp_close(struct sock *sk, long timeout)
struct sk_buff *skb;
int data_was_unread = 0;
- if ((1 << sk->sk_state) & (TCPF_TIME_WAIT | TCPF_CLOSE)) {
- sock_put(sk);
- return;
- }
-
lock_sock(sk);
- sock_hold(sk);
sdp_dbg(sk, "%s\n", __func__);
sdp_delete_keepalive_timer(sk);
sk->sk_shutdown = SHUTDOWN_MASK;
+
+ if ((1 << sk->sk_state) & (TCPF_TIME_WAIT | TCPF_CLOSE)) {
+ /* this could happen if socket was closed by a CM teardown
+ and after that the user called close() */
+ goto out;
+ }
+
if (sk->sk_state == TCP_LISTEN || sk->sk_state == TCP_SYN_SENT) {
- sdp_set_state(sk, TCP_CLOSE);
+ sdp_exch_state(sk, TCPF_LISTEN | TCPF_SYN_SENT, TCP_CLOSE);
/* Special case: stop listening.
This is done by sdp_destruct. */
goto adjudge_to_death;
}
+ sock_hold(sk);
+
/* We need to flush the recv. buffs. We do this only on the
* descriptor close, not protocol-sourced closes, because the
* reader process may not have drained the data yet!
@@ -505,17 +514,12 @@ static void sdp_close(struct sock *sk, long timeout)
* the FTP client, wheee... Note: timeout is always zero
* in such a case.
*/
- if (data_was_unread) {
+ if (data_was_unread ||
+ (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime)) {
/* Unread data was tossed, zap the connection. */
NET_INC_STATS_USER(LINUX_MIB_TCPABORTONCLOSE);
- sdp_set_state(sk, TCP_TIME_WAIT);
-
- /* Go into abortive close */
- sk->sk_prot->disconnect(sk, 0);
- } else if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime) {
- /* Check zero linger _after_ checking for unread data. */
- NET_INC_STATS_USER(LINUX_MIB_TCPABORTONDATA);
- sdp_set_state(sk, TCP_TIME_WAIT);
+ sdp_exch_state(sk, TCPF_CLOSE_WAIT | TCPF_ESTABLISHED,
+ TCP_TIME_WAIT);
/* Go into abortive close */
sk->sk_prot->disconnect(sk, 0);
@@ -530,7 +534,8 @@ static void sdp_close(struct sock *sk, long timeout)
/* TODO: state should move to CLOSE or CLOSE_WAIT etc on disconnect.
Since it currently doesn't, do it here to avoid blocking below. */
if (!sdp_sk(sk)->id)
- sdp_set_state(sk, TCP_CLOSE);
+ sdp_exch_state(sk, TCPF_FIN_WAIT1 | TCPF_LAST_ACK |
+ TCPF_CLOSE_WAIT, TCP_CLOSE);
sk_stream_wait_close(sk, timeout);
@@ -557,7 +562,7 @@ adjudge_to_death:
* consume significant resources. Let's do it with special
* linger2 option. --ANK
*/
- if ((1 << sk->sk_state) & (TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2)) {
+ if (sk->sk_state == TCP_FIN_WAIT1) {
sdp_sk(sk)->fin_wait_timeout = 1;
/* TODO: liger2 unimplemented.
We should wait 3.5 * rto. How do I know rto? */
@@ -565,22 +570,16 @@ adjudge_to_death:
sdp_dbg(sk, "%s: entering time wait refcnt %d\n", __func__,
atomic_read(&sk->sk_refcnt));
atomic_inc(sk->sk_prot->orphan_count);
- queue_delayed_work(sdp_workqueue, &sdp_sk(sk)->time_wait_work,
+ queue_delayed_work(sdp_workqueue, &sdp_sk(sk)->fin_wait_work,
TCP_FIN_TIMEOUT);
}
/* TODO: limit number of orphaned sockets.
TCP has sysctl_tcp_mem and sysctl_tcp_max_orphans */
- if (sk->sk_state != TCP_CLOSE) {
- sdp_dbg(sk, "Hold socket till end of Infiniband tear-down\n");
- /* Hold socket till end of Infiniband tear-down */
- sock_hold(sk);
- }
-
+out:
release_sock(sk);
- sock_put(sk);
sk_common_release(sk);
}
@@ -625,7 +624,7 @@ static int sdp_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
return rc;
}
- sdp_set_state(sk, TCP_SYN_SENT);
+ sdp_exch_state(sk, TCPF_CLOSE, TCP_SYN_SENT);
return 0;
}
@@ -646,7 +645,7 @@ static int sdp_disconnect(struct sock *sk, int flags)
return rc;
}
- sdp_set_state(sk, TCP_CLOSE);
+ sdp_exch_state(sk, TCPF_LISTEN, TCP_CLOSE);
id = ssk->id;
ssk->id = NULL;
release_sock(sk); /* release socket since locking semantics is parent
@@ -835,7 +834,7 @@ static int sdp_ioctl(struct sock *sk, int cmd, unsigned long arg)
void sdp_cancel_fin_wait_timeout(struct sdp_sock *ssk)
{
ssk->fin_wait_timeout = 0;
- cancel_delayed_work(&ssk->time_wait_work);
+ cancel_delayed_work(&ssk->fin_wait_work);
atomic_dec(ssk->isk.sk.sk_prot->orphan_count);
}
@@ -848,14 +847,19 @@ void sdp_destroy_work(struct work_struct *work)
if (ssk->fin_wait_timeout)
sdp_cancel_fin_wait_timeout(ssk);
- sdp_set_state(sk, TCP_CLOSE);
+ if (sk->sk_state == TCP_TIME_WAIT)
+ sock_put(sk);
- sock_put(sk);
+ /* In normal close current state is TCP_TIME_WAIT or TCP_CLOSE
+ but if a CM connection is dropped below our legs state could
+ be any state */
+ sdp_exch_state(sk, ~0, TCP_CLOSE);
}
-void sdp_time_wait_work(struct work_struct *work)
+void sdp_fin_wait_work(struct work_struct *work)
{
- struct sdp_sock *ssk = container_of(work, struct sdp_sock, time_wait_work.work);
+ struct sdp_sock *ssk =
+ container_of(work, struct sdp_sock, fin_wait_work.work);
struct sock *sk = &ssk->isk.sk;
lock_sock(sk);
sdp_dbg(sk, "%s\n", __func__);
@@ -868,6 +872,7 @@ void sdp_time_wait_work(struct work_struct *work)
sdp_dbg(sk, "%s: refcnt %d\n", __func__, atomic_read(&sk->sk_refcnt));
sdp_sk(sk)->fin_wait_timeout = 0;
+ sdp_exch_state(sk, TCPF_FIN_WAIT1, TCP_TIME_WAIT);
release_sock(sk);
atomic_dec(sk->sk_prot->orphan_count);
@@ -884,12 +889,14 @@ static int sdp_init_sock(struct sock *sk)
INIT_LIST_HEAD(&ssk->accept_queue);
INIT_LIST_HEAD(&ssk->backlog_queue);
- INIT_DELAYED_WORK(&ssk->time_wait_work, sdp_time_wait_work);
+ INIT_DELAYED_WORK(&ssk->fin_wait_work, sdp_fin_wait_work);
INIT_WORK(&ssk->destroy_work, sdp_destroy_work);
sk->sk_route_caps |= NETIF_F_SG | NETIF_F_NO_CSUM;
ssk->sdp_disconnect = 0;
+ ssk->destructed_already = 0;
+ spin_lock_init(&ssk->lock);
return 0;
}
@@ -902,15 +909,8 @@ static void sdp_shutdown(struct sock *sk, int how)
if (!(how & SEND_SHUTDOWN))
return;
- if ((1 << sk->sk_state) & ~(TCPF_ESTABLISHED | TCPF_CLOSE_WAIT))
- return;
-
- if (sk->sk_state == TCP_ESTABLISHED)
- sdp_set_state(sk, TCP_FIN_WAIT2);/* should be TCP_FIN_WAIT1 */
- else if (sk->sk_state == TCP_CLOSE_WAIT)
- sdp_set_state(sk, TCP_LAST_ACK);
- else
- return;
+ if (!sdp_close_state(sk))
+ return;
/*
* Just turn off CORK here.
@@ -2002,7 +2002,7 @@ static int sdp_listen(struct sock *sk, int backlog)
sdp_warn(sk, "rdma_listen failed: %d\n", rc);
sdp_set_error(sk, rc);
} else
- sdp_set_state(sk, TCP_LISTEN);
+ sdp_exch_state(sk, TCPF_CLOSE, TCP_LISTEN);
return rc;
}
diff --git a/kernel_patches/backport/2.6.16/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.16/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.16/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.16/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.16_sles10/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.16_sles10/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.16_sles10/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.16_sles10/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.16_sles10_sp1/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.16_sles10_sp1/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.16_sles10_sp1/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.16_sles10_sp1/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.16_sles10_sp2/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.16_sles10_sp2/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.16_sles10_sp2/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.16_sles10_sp2/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.17/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.17/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.17/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.17/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.18-EL5.1/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.18-EL5.1/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.18-EL5.1/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.18-EL5.1/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.18-EL5.2/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.18-EL5.2/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.18-EL5.2/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.18-EL5.2/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.18/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.18/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.18/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.18/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.18_FC6/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.18_FC6/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.18_FC6/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.18_FC6/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.18_suse10_2/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.18_suse10_2/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.18_suse10_2/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.18_suse10_2/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.19/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.19/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.19/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.19/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.20/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.20/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.20/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.20/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.21/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.21/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.21/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.21/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.22/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.22/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.22/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.22/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.22_suse10_3/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.22_suse10_3/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.22_suse10_3/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.22_suse10_3/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.23/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.23/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.23/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.23/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.24/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.24/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.24/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.24/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.9_U4/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.9_U4/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.9_U4/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.9_U4/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.9_U4/sdp_7277_to_2_6_11.patch b/kernel_patches/backport/2.6.9_U4/sdp_7277_to_2_6_11.patch
index a9d65a7..dccc9b6 100644
--- a/kernel_patches/backport/2.6.9_U4/sdp_7277_to_2_6_11.patch
+++ b/kernel_patches/backport/2.6.9_U4/sdp_7277_to_2_6_11.patch
@@ -2,31 +2,31 @@ Index: ofed_kernel-2.6.9_U4/drivers/infiniband/ulp/sdp/sdp_main.c
===================================================================
--- ofed_kernel-2.6.9_U4.orig/drivers/infiniband/ulp/sdp/sdp_main.c
+++ ofed_kernel-2.6.9_U4/drivers/infiniband/ulp/sdp/sdp_main.c
-@@ -564,7 +564,6 @@ adjudge_to_death:
+@@ -566,7 +566,6 @@ adjudge_to_death:
/* TODO: tcp_fin_time to get timeout */
sdp_dbg(sk, "%s: entering time wait refcnt %d\n", __func__,
atomic_read(&sk->sk_refcnt));
- atomic_inc(sk->sk_prot->orphan_count);
- queue_delayed_work(sdp_workqueue, &sdp_sk(sk)->time_wait_work,
+ queue_delayed_work(sdp_workqueue, &sdp_sk(sk)->fin_wait_work,
TCP_FIN_TIMEOUT);
}
-@@ -836,7 +835,6 @@ void sdp_cancel_fin_wait_timeout(struct
+@@ -832,7 +831,6 @@ void sdp_cancel_fin_wait_timeout(struct
{
ssk->fin_wait_timeout = 0;
- cancel_delayed_work(&ssk->time_wait_work);
+ cancel_delayed_work(&ssk->fin_wait_work);
- atomic_dec(ssk->isk.sk.sk_prot->orphan_count);
}
void sdp_destroy_work(struct work_struct *work)
-@@ -870,7 +868,6 @@ void sdp_time_wait_work(struct work_stru
- sdp_sk(sk)->fin_wait_timeout = 0;
+@@ -874,7 +872,6 @@ void sdp_fin_wait_work(struct work_struc
+ sdp_exch_state(sk, TCPF_FIN_WAIT1, TCP_TIME_WAIT);
release_sock(sk);
- atomic_dec(sk->sk_prot->orphan_count);
if (sdp_sk(sk)->id)
rdma_disconnect(sdp_sk(sk)->id);
-@@ -2101,7 +2098,6 @@ void sdp_urg(struct sdp_sock *ssk, struc
+@@ -2099,7 +2096,6 @@ void sdp_urg(struct sdp_sock *ssk, struc
static atomic_t sockets_allocated;
static atomic_t memory_allocated;
@@ -34,7 +34,7 @@ Index: ofed_kernel-2.6.9_U4/drivers/infiniband/ulp/sdp/sdp_main.c
static int memory_pressure;
struct proto sdp_proto = {
.close = sdp_close,
-@@ -2122,13 +2118,11 @@ struct proto sdp_proto = {
+@@ -2120,13 +2116,11 @@ struct proto sdp_proto = {
.sockets_allocated = &sockets_allocated,
.memory_allocated = &memory_allocated,
.memory_pressure = &memory_pressure,
@@ -50,7 +50,7 @@ Index: ofed_kernel-2.6.9_U4/drivers/infiniband/ulp/sdp/sdp_main.c
.name = "SDP",
};
-@@ -2490,9 +2484,6 @@ static void __exit sdp_exit(void)
+@@ -2488,9 +2482,6 @@ static void __exit sdp_exit(void)
sock_unregister(PF_INET_SDP);
proto_unregister(&sdp_proto);
diff --git a/kernel_patches/backport/2.6.9_U5/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.9_U5/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.9_U5/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.9_U5/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.9_U5/sdp_7277_to_2_6_11.patch b/kernel_patches/backport/2.6.9_U5/sdp_7277_to_2_6_11.patch
index a9d65a7..dccc9b6 100644
--- a/kernel_patches/backport/2.6.9_U5/sdp_7277_to_2_6_11.patch
+++ b/kernel_patches/backport/2.6.9_U5/sdp_7277_to_2_6_11.patch
@@ -2,31 +2,31 @@ Index: ofed_kernel-2.6.9_U4/drivers/infiniband/ulp/sdp/sdp_main.c
===================================================================
--- ofed_kernel-2.6.9_U4.orig/drivers/infiniband/ulp/sdp/sdp_main.c
+++ ofed_kernel-2.6.9_U4/drivers/infiniband/ulp/sdp/sdp_main.c
-@@ -564,7 +564,6 @@ adjudge_to_death:
+@@ -566,7 +566,6 @@ adjudge_to_death:
/* TODO: tcp_fin_time to get timeout */
sdp_dbg(sk, "%s: entering time wait refcnt %d\n", __func__,
atomic_read(&sk->sk_refcnt));
- atomic_inc(sk->sk_prot->orphan_count);
- queue_delayed_work(sdp_workqueue, &sdp_sk(sk)->time_wait_work,
+ queue_delayed_work(sdp_workqueue, &sdp_sk(sk)->fin_wait_work,
TCP_FIN_TIMEOUT);
}
-@@ -836,7 +835,6 @@ void sdp_cancel_fin_wait_timeout(struct
+@@ -832,7 +831,6 @@ void sdp_cancel_fin_wait_timeout(struct
{
ssk->fin_wait_timeout = 0;
- cancel_delayed_work(&ssk->time_wait_work);
+ cancel_delayed_work(&ssk->fin_wait_work);
- atomic_dec(ssk->isk.sk.sk_prot->orphan_count);
}
void sdp_destroy_work(struct work_struct *work)
-@@ -870,7 +868,6 @@ void sdp_time_wait_work(struct work_stru
- sdp_sk(sk)->fin_wait_timeout = 0;
+@@ -874,7 +872,6 @@ void sdp_fin_wait_work(struct work_struc
+ sdp_exch_state(sk, TCPF_FIN_WAIT1, TCP_TIME_WAIT);
release_sock(sk);
- atomic_dec(sk->sk_prot->orphan_count);
if (sdp_sk(sk)->id)
rdma_disconnect(sdp_sk(sk)->id);
-@@ -2101,7 +2098,6 @@ void sdp_urg(struct sdp_sock *ssk, struc
+@@ -2099,7 +2096,6 @@ void sdp_urg(struct sdp_sock *ssk, struc
static atomic_t sockets_allocated;
static atomic_t memory_allocated;
@@ -34,7 +34,7 @@ Index: ofed_kernel-2.6.9_U4/drivers/infiniband/ulp/sdp/sdp_main.c
static int memory_pressure;
struct proto sdp_proto = {
.close = sdp_close,
-@@ -2122,13 +2118,11 @@ struct proto sdp_proto = {
+@@ -2120,13 +2116,11 @@ struct proto sdp_proto = {
.sockets_allocated = &sockets_allocated,
.memory_allocated = &memory_allocated,
.memory_pressure = &memory_pressure,
@@ -50,7 +50,7 @@ Index: ofed_kernel-2.6.9_U4/drivers/infiniband/ulp/sdp/sdp_main.c
.name = "SDP",
};
-@@ -2490,9 +2484,6 @@ static void __exit sdp_exit(void)
+@@ -2488,9 +2482,6 @@ static void __exit sdp_exit(void)
sock_unregister(PF_INET_SDP);
proto_unregister(&sdp_proto);
diff --git a/kernel_patches/backport/2.6.9_U6/sdp_0090_revert_to_2_6_24.patch b/kernel_patches/backport/2.6.9_U6/sdp_0090_revert_to_2_6_24.patch
index 8e4b929..22141d2 100644
--- a/kernel_patches/backport/2.6.9_U6/sdp_0090_revert_to_2_6_24.patch
+++ b/kernel_patches/backport/2.6.9_U6/sdp_0090_revert_to_2_6_24.patch
@@ -1,7 +1,8 @@
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
---- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c 2008-06-22 15:02:31.000000000 +0300
-@@ -141,7 +141,7 @@ static void sdp_fin(struct sock *sk)
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_bcopy.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+@@ -134,7 +134,7 @@ static void sdp_fin(struct sock *sk)
}
@@ -10,7 +11,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk);
-@@ -192,7 +192,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -185,7 +185,7 @@ void sdp_post_send(struct sdp_sock *ssk,
struct ib_send_wr *bad_wr;
h->mid = mid;
@@ -19,7 +20,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
h->flags = SDP_OOB_PRES | SDP_OOB_PEND;
else
h->flags = 0;
-@@ -236,7 +236,7 @@ void sdp_post_send(struct sdp_sock *ssk,
+@@ -229,7 +229,7 @@ void sdp_post_send(struct sdp_sock *ssk,
ssk->tx_wr.num_sge = frags + 1;
ssk->tx_wr.opcode = IB_WR_SEND;
ssk->tx_wr.send_flags = IB_SEND_SIGNALED;
@@ -28,7 +29,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
ssk->tx_wr.send_flags |= IB_SEND_SOLICITED;
rc = ib_post_send(ssk->qp, &ssk->tx_wr, &bad_wr);
++ssk->tx_head;
-@@ -306,11 +306,11 @@ static void sdp_post_recv(struct sdp_soc
+@@ -299,11 +299,11 @@ static void sdp_post_recv(struct sdp_soc
/* TODO: allocate from cache */
if (unlikely(ssk->isk.sk.sk_allocation)) {
@@ -42,7 +43,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
GFP_KERNEL);
gfp_page = GFP_HIGHUSER;
}
-@@ -478,7 +478,7 @@ int sdp_post_credits(struct sdp_sock *ss
+@@ -471,7 +471,7 @@ int sdp_post_credits(struct sdp_sock *ss
if (likely(ssk->bufs > 1) &&
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE)) {
struct sk_buff *skb;
@@ -51,7 +52,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
GFP_KERNEL);
if (!skb)
-@@ -516,7 +516,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -509,7 +509,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *resp_size;
ssk->recv_request = 0;
@@ -60,7 +61,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*resp_size),
gfp_page);
-@@ -541,7 +541,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -534,7 +534,7 @@ void sdp_post_sends(struct sdp_sock *ssk
ssk->tx_head > ssk->sent_request_head + SDP_RESIZE_WAIT &&
ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) {
struct sdp_chrecvbuf *req_size;
@@ -69,16 +70,16 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh) +
sizeof(*req_size),
gfp_page);
-@@ -563,7 +563,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -556,7 +556,7 @@ void sdp_post_sends(struct sdp_sock *ssk
likely(ssk->tx_head - ssk->tx_tail < SDP_TX_SIZE) &&
likely((1 << ssk->isk.sk.sk_state) &
- (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
+ (TCPF_ESTABLISHED | TCPF_FIN_WAIT1))) {
- skb = sdp_stream_alloc_skb(&ssk->isk.sk,
+ skb = sk_stream_alloc_skb(&ssk->isk.sk,
sizeof(struct sdp_bsdh),
GFP_KERNEL);
/* FIXME */
-@@ -575,7 +575,7 @@ void sdp_post_sends(struct sdp_sock *ssk
+@@ -568,7 +568,7 @@ void sdp_post_sends(struct sdp_sock *ssk
!ssk->isk.sk.sk_send_head &&
ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) {
ssk->sdp_disconnect = 0;
@@ -87,7 +88,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
sizeof(struct sdp_bsdh),
gfp_page);
/* FIXME */
-@@ -788,7 +788,7 @@ static int sdp_handle_send_comp(struct s
+@@ -765,7 +765,7 @@ static int sdp_handle_send_comp(struct s
}
out:
@@ -96,7 +97,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
return 0;
}
-@@ -874,7 +874,7 @@ void sdp_work(struct work_struct *work)
+@@ -851,7 +851,7 @@ void sdp_work(struct work_struct *work)
sdp_poll_cq(ssk, cq);
release_sock(sk);
@@ -105,9 +106,10 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp
lock_sock(sk);
cq = ssk->cq;
if (unlikely(!cq))
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c
---- a/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_cma.c 2008-06-22 15:02:31.000000000 +0300
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_cma.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_cma.c
@@ -162,8 +162,6 @@ int sdp_init_qp(struct sock *sk, struct
goto err_cq;
}
@@ -117,10 +119,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/s
qp_init_attr.send_cq = qp_init_attr.recv_cq = cq;
rc = rdma_create_qp(id, pd, &qp_init_attr);
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
---- a/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp.h 2008-06-22 15:02:31.000000000 +0300
-@@ -266,30 +266,4 @@ void sdp_post_keepalive(struct sdp_sock
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp.h
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp.h
+@@ -319,30 +319,4 @@ void sdp_post_keepalive(struct sdp_sock
void sdp_start_keepalive_timer(struct sock *sk);
void sdp_bzcopy_write_space(struct sdp_sock *ssk);
@@ -151,10 +154,11 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp.h b/drivers/infiniband/ulp/sdp/sdp.h
-
-
#endif
-diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
---- a/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:25.000000000 +0300
-+++ b/drivers/infiniband/ulp/sdp/sdp_main.c 2008-06-22 15:02:31.000000000 +0300
-@@ -494,7 +494,7 @@ static void sdp_close(struct sock *sk, l
+Index: linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+===================================================================
+--- linux_2.6.orig/drivers/infiniband/ulp/sdp/sdp_main.c
++++ linux_2.6/drivers/infiniband/ulp/sdp/sdp_main.c
+@@ -501,7 +501,7 @@ static void sdp_close(struct sock *sk, l
__kfree_skb(skb);
}
@@ -163,7 +167,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
/* As outlined in draft-ietf-tcpimpl-prob-03.txt, section
* 3.10, we send a RST here because data was lost. To
-@@ -1197,7 +1197,7 @@ static inline void sdp_mark_urg(struct s
+@@ -1195,7 +1195,7 @@ static inline void sdp_mark_urg(struct s
{
if (unlikely(flags & MSG_OOB)) {
struct sk_buff *skb = sk->sk_write_queue.prev;
@@ -172,7 +176,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
}
-@@ -1214,8 +1214,7 @@ static inline void skb_entail(struct soc
+@@ -1212,8 +1212,7 @@ static inline void skb_entail(struct soc
{
skb_header_release(skb);
__skb_queue_tail(&sk->sk_write_queue, skb);
@@ -182,7 +186,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!sk->sk_send_head)
sk->sk_send_head = skb;
if (ssk->nonagle & TCP_NAGLE_PUSH)
-@@ -1379,7 +1378,7 @@ static inline int sdp_bcopy_get(struct s
+@@ -1377,7 +1376,7 @@ static inline int sdp_bcopy_get(struct s
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;
@@ -191,7 +195,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
if (!page) {
-@@ -1451,7 +1450,7 @@ static inline int sdp_bzcopy_get(struct
+@@ -1449,7 +1448,7 @@ static inline int sdp_bzcopy_get(struct
if (left <= this_page)
this_page = left;
@@ -200,7 +204,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
return SDP_DO_WAIT_MEM;
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
-@@ -1659,8 +1658,8 @@ new_segment:
+@@ -1657,8 +1656,8 @@ new_segment:
goto wait_for_sndbuf;
}
@@ -211,7 +215,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
if (!skb)
goto wait_for_memory;
-@@ -1684,7 +1683,7 @@ new_segment:
+@@ -1682,7 +1681,7 @@ new_segment:
/* OOB data byte should be the last byte of
the data payload */
@@ -220,7 +224,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
!(flags & MSG_OOB)) {
sdp_mark_push(ssk, skb);
goto new_segment;
-@@ -1760,7 +1759,7 @@ do_fault:
+@@ -1758,7 +1757,7 @@ do_fault:
if (sk->sk_send_head == skb)
sk->sk_send_head = NULL;
__skb_unlink(skb, &sk->sk_write_queue);
@@ -229,7 +233,7 @@ diff -Naup a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/
}
do_error:
-@@ -2365,6 +2364,10 @@ static int __init sdp_proc_init(void)
+@@ -2363,6 +2362,10 @@ static int __init sdp_proc_init(void)
sdp_seq_afinfo.seq_fops);
if (p)
p->data = &sdp_seq_afinfo;
diff --git a/kernel_patches/backport/2.6.9_U6/sdp_7277_to_2_6_11.patch b/kernel_patches/backport/2.6.9_U6/sdp_7277_to_2_6_11.patch
index a9d65a7..dccc9b6 100644
--- a/kernel_patches/backport/2.6.9_U6/sdp_7277_to_2_6_11.patch
+++ b/kernel_patches/backport/2.6.9_U6/sdp_7277_to_2_6_11.patch
@@ -2,31 +2,31 @@ Index: ofed_kernel-2.6.9_U4/drivers/infiniband/ulp/sdp/sdp_main.c
===================================================================
--- ofed_kernel-2.6.9_U4.orig/drivers/infiniband/ulp/sdp/sdp_main.c
+++ ofed_kernel-2.6.9_U4/drivers/infiniband/ulp/sdp/sdp_main.c
-@@ -564,7 +564,6 @@ adjudge_to_death:
+@@ -566,7 +566,6 @@ adjudge_to_death:
/* TODO: tcp_fin_time to get timeout */
sdp_dbg(sk, "%s: entering time wait refcnt %d\n", __func__,
atomic_read(&sk->sk_refcnt));
- atomic_inc(sk->sk_prot->orphan_count);
- queue_delayed_work(sdp_workqueue, &sdp_sk(sk)->time_wait_work,
+ queue_delayed_work(sdp_workqueue, &sdp_sk(sk)->fin_wait_work,
TCP_FIN_TIMEOUT);
}
-@@ -836,7 +835,6 @@ void sdp_cancel_fin_wait_timeout(struct
+@@ -832,7 +831,6 @@ void sdp_cancel_fin_wait_timeout(struct
{
ssk->fin_wait_timeout = 0;
- cancel_delayed_work(&ssk->time_wait_work);
+ cancel_delayed_work(&ssk->fin_wait_work);
- atomic_dec(ssk->isk.sk.sk_prot->orphan_count);
}
void sdp_destroy_work(struct work_struct *work)
-@@ -870,7 +868,6 @@ void sdp_time_wait_work(struct work_stru
- sdp_sk(sk)->fin_wait_timeout = 0;
+@@ -874,7 +872,6 @@ void sdp_fin_wait_work(struct work_struc
+ sdp_exch_state(sk, TCPF_FIN_WAIT1, TCP_TIME_WAIT);
release_sock(sk);
- atomic_dec(sk->sk_prot->orphan_count);
if (sdp_sk(sk)->id)
rdma_disconnect(sdp_sk(sk)->id);
-@@ -2101,7 +2098,6 @@ void sdp_urg(struct sdp_sock *ssk, struc
+@@ -2099,7 +2096,6 @@ void sdp_urg(struct sdp_sock *ssk, struc
static atomic_t sockets_allocated;
static atomic_t memory_allocated;
@@ -34,7 +34,7 @@ Index: ofed_kernel-2.6.9_U4/drivers/infiniband/ulp/sdp/sdp_main.c
static int memory_pressure;
struct proto sdp_proto = {
.close = sdp_close,
-@@ -2122,13 +2118,11 @@ struct proto sdp_proto = {
+@@ -2120,13 +2116,11 @@ struct proto sdp_proto = {
.sockets_allocated = &sockets_allocated,
.memory_allocated = &memory_allocated,
.memory_pressure = &memory_pressure,
@@ -50,7 +50,7 @@ Index: ofed_kernel-2.6.9_U4/drivers/infiniband/ulp/sdp/sdp_main.c
.name = "SDP",
};
-@@ -2490,9 +2484,6 @@ static void __exit sdp_exit(void)
+@@ -2488,9 +2482,6 @@ static void __exit sdp_exit(void)
sock_unregister(PF_INET_SDP);
proto_unregister(&sdp_proto);
--
1.5.3
More information about the general
mailing list