Skip to contentSkip to conversation

cxgb3i - more transmit work-request checks

PATCH In review Karen Xie 2 participants 3 messages Feb 3, 2009 – Feb 5, 2009 SCSI

lore
Share & tools
lore

Karen Xie

author
#0 lore raw

PATCH 1/1 cxgb3i - more transmit work-request checks

[PATCH 2.6.29 1/1] cxgb3i - more transmit work-request checks

From: Karen Xie <[email protected]>

- added more checkings for transmit work-request.
- reserve one work-request for credit return.
- stop queueing up the outgoing pdus if transmit window is full.
- split the skb cb into tx and rx portion

---

 drivers/scsi/cxgb3i/cxgb3i_ddp.h     |    2 +
 drivers/scsi/cxgb3i/cxgb3i_offload.c |  132 ++++++++++++++++++++++++----------
 drivers/scsi/cxgb3i/cxgb3i_offload.h |   28 +++++--
 drivers/scsi/cxgb3i/cxgb3i_pdu.c     |    2 -
 4 files changed, 114 insertions(+), 50 deletions(-)
drivers/scsi/cxgb3i/cxgb3i_ddp.h +2 -0
index 5c7c4d9..f675807 100644
@@ -13,6 +13,8 @@
 #ifndef __CXGB3I_ULP2_DDP_H__
 #define __CXGB3I_ULP2_DDP_H__
 
+#include <linux/vmalloc.h>
+
 /**
  * struct cxgb3i_tag_format - cxgb3i ulp tag format for an iscsi entity
  *
drivers/scsi/cxgb3i/cxgb3i_offload.c +93 -39

280 lines not on this page · raw message

drivers/scsi/cxgb3i/cxgb3i_offload.h +18 -10
index d231569..df1eae0 100644
@@ -178,25 +178,33 @@ void cxgb3i_c3cn_release(struct s3_conn *);
  * @flag:	see C3CB_FLAG_* below
  * @ulp_mode:	ULP mode/submode of sk_buff
  * @seq:	tcp sequence number
- * @ddigest:	pdu data digest
- * @pdulen:	recovered pdu length
- * @wr_data:	scratch area for tx wr
  */
+struct cxgb3_skb_rx_cb {
+	__u32 ddigest;			/* data digest */
+	__u32 pdulen;			/* recovered pdu length */
+};
+
+struct cxgb3_skb_tx_cb {
+	struct sk_buff *wr_next;	/* next wr */
+};
+
 struct cxgb3_skb_cb {
 	__u8 flags;
 	__u8 ulp_mode;
 	__u32 seq;
-	__u32 ddigest;
-	__u32 pdulen;
-	struct sk_buff *wr_data;
+	union {
+		struct cxgb3_skb_rx_cb rx;
+		struct cxgb3_skb_tx_cb tx;
+	};
 };
 
 #define CXGB3_SKB_CB(skb)	((struct cxgb3_skb_cb *)&((skb)->cb[0]))
-
+#define skb_flags(skb)		(CXGB3_SKB_CB(skb)->flags)
 #define skb_ulp_mode(skb)	(CXGB3_SKB_CB(skb)->ulp_mode)
-#define skb_ulp_ddigest(skb)	(CXGB3_SKB_CB(skb)->ddigest)
-#define skb_ulp_pdulen(skb)	(CXGB3_SKB_CB(skb)->pdulen)
-#define skb_wr_data(skb)	(CXGB3_SKB_CB(skb)->wr_data)
+#define skb_tcp_seq(skb)	(CXGB3_SKB_CB(skb)->seq)
+#define skb_rx_ddigest(skb)	(CXGB3_SKB_CB(skb)->rx.ddigest)
+#define skb_rx_pdulen(skb)	(CXGB3_SKB_CB(skb)->rx.pdulen)
+#define skb_tx_wr_next(skb)	(CXGB3_SKB_CB(skb)->tx.wr_next)
 
 enum c3cb_flags {
 	C3CB_FLAG_NEED_HDR = 1 << 0,	/* packet needs a TX_DATA_WR header */
drivers/scsi/cxgb3i/cxgb3i_pdu.c +1 -1
index ce7ce8c..eac7813 100644
@@ -366,7 +366,7 @@ void cxgb3i_conn_pdu_ready(struct s3_conn *c3cn)
 	skb = skb_peek(&c3cn->receive_queue);
 	while (!err && skb) {
 		__skb_unlink(skb, &c3cn->receive_queue);
-		read += skb_ulp_pdulen(skb);
+		read += skb_rx_pdulen(skb);
 		err = cxgb3i_conn_read_pdu_skb(conn, skb);
 		__kfree_skb(skb);
 		skb = skb_peek(&c3cn->receive_queue);
#1 lore raw
Quoted 9 lines · Karen Xie

[PATCH 2.6.29 1/1] cxgb3i - more transmit work-request checks

From: Karen Xie <[email protected]>

- added more checkings for transmit work-request.
- reserve one work-request for credit return.
- stop queueing up the outgoing pdus if transmit window is full.
- split the skb cb into tx and rx portion

What kernel was this made against? I think the patch might include some changes that already went upstream. You might want to rebase the patch against scsi-rc-fixes.

author
#2 lore raw

Thanks, Mike,

I will re-submit the patch against scsi-rc-fixes. This one was based on scsi-misc-2.6/linux-2.6-iscsi.

Karen

-----Original Message-----
From: Mike Christie [mailto:[email protected]]
Sent: Thursday, February 05, 2009 1:43 PM
To: Karen Xie
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 2.6.29 1/1] cxgb3i - more transmit work-request checks

Quoted 9 lines · Karen Xie

[PATCH 2.6.29 1/1] cxgb3i - more transmit work-request checks

From: Karen Xie <[email protected]>

- added more checkings for transmit work-request.
- reserve one work-request for credit return.
- stop queueing up the outgoing pdus if transmit window is full.
- split the skb cb into tx and rx portion

What kernel was this made against? I think the patch might include some changes that already went upstream. You might want to rebase the patch against scsi-rc-fixes.