netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Chan" <mchan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH net-next 1/6] cnic: Finetune iSCSI connection set up.
Date: Wed, 24 Feb 2010 16:42:04 -0800	[thread overview]
Message-ID: <1267058529-18454-1-git-send-email-mchan@broadcom.com> (raw)

From: Eddie Wai <waie@broadcom.com>

Initialize IP ID and handle some additional connection errors.

Signed-off-by: Eddie Wai <waie@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
---
 drivers/net/cnic.c |   17 ++++++++++++++++-
 drivers/net/cnic.h |    2 +-
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
index 6aecef9..0fe8371 100644
--- a/drivers/net/cnic.c
+++ b/drivers/net/cnic.c
@@ -2507,7 +2507,7 @@ static int cnic_cm_offload_pg(struct cnic_sock *csk)
 	l4kwqe->sa5 = dev->mac_addr[5];
 
 	l4kwqe->etype = ETH_P_IP;
-	l4kwqe->ipid_count = DEF_IPID_COUNT;
+	l4kwqe->ipid_start = DEF_IPID_START;
 	l4kwqe->host_opaque = csk->l5_cid;
 
 	if (csk->vlan_id) {
@@ -3046,6 +3046,14 @@ static void cnic_cm_process_offld_pg(struct cnic_dev *dev, struct l4_kcq *kcqe)
 		clear_bit(SK_F_OFFLD_SCHED, &csk->flags);
 		goto done;
 	}
+	/* Possible PG kcqe status:  SUCCESS, OFFLOADED_PG, or CTX_ALLOC_FAIL */
+	if (kcqe->status == L4_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAIL) {
+		clear_bit(SK_F_OFFLD_SCHED, &csk->flags);
+		cnic_cm_upcall(cp, csk,
+			       L4_KCQE_OPCODE_VALUE_CONNECT_COMPLETE);
+		goto done;
+	}
+
 	csk->pg_cid = kcqe->pg_cid;
 	set_bit(SK_F_PG_OFFLD_COMPLETE, &csk->flags);
 	cnic_cm_conn_req(csk);
@@ -3083,6 +3091,13 @@ static void cnic_cm_process_kcqe(struct cnic_dev *dev, struct kcqe *kcqe)
 	}
 
 	switch (opcode) {
+	case L5CM_RAMROD_CMD_ID_TCP_CONNECT:
+		if (l4kcqe->status != 0) {
+			clear_bit(SK_F_OFFLD_SCHED, &csk->flags);
+			cnic_cm_upcall(cp, csk,
+				       L4_KCQE_OPCODE_VALUE_CONNECT_COMPLETE);
+		}
+		break;
 	case L4_KCQE_OPCODE_VALUE_CONNECT_COMPLETE:
 		if (l4kcqe->status == 0)
 			set_bit(SK_F_OFFLD_COMPLETE, &csk->flags);
diff --git a/drivers/net/cnic.h b/drivers/net/cnic.h
index 241d09a..1921597 100644
--- a/drivers/net/cnic.h
+++ b/drivers/net/cnic.h
@@ -101,7 +101,7 @@ struct cnic_redirect_entry {
 #define BNX2X_KWQ_DATA(cp, x)						\
 	&(cp)->kwq_16_data[BNX2X_KWQ_DATA_PG(cp, x)][BNX2X_KWQ_DATA_IDX(cp, x)]
 
-#define DEF_IPID_COUNT		0xc001
+#define DEF_IPID_START		0x8000
 
 #define DEF_KA_TIMEOUT		10000
 #define DEF_KA_INTERVAL		300000
-- 
1.6.4.GIT



             reply	other threads:[~2010-02-25  0:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-25  0:42 Michael Chan [this message]
2010-02-25  0:42 ` [PATCH net-next 2/6] cnic: Finetune iSCSI connection reset Michael Chan
2010-02-25  0:42   ` [PATCH net-next 3/6] cnic: Fix panic in cnic_iscsi_nl_msg_recv() when device is down Michael Chan
2010-02-25  0:42     ` [PATCH net-next 4/6] cnic: Simplify route checking during iSCSI connection Michael Chan
2010-02-25  0:42       ` [PATCH net-next 5/6] cnic: Use union for the status blocks of different devices Michael Chan
2010-02-25  0:42         ` [PATCH net-next 6/6] cnic: Update version to 2.1.1 Michael Chan
2010-02-26 10:11           ` David Miller
2010-02-26 10:11         ` [PATCH net-next 5/6] cnic: Use union for the status blocks of different devices David Miller
2010-02-26 10:11       ` [PATCH net-next 4/6] cnic: Simplify route checking during iSCSI connection David Miller
2010-02-26  0:51     ` [PATCH net-next 3/6] cnic: Fix panic in cnic_iscsi_nl_msg_recv() when device is down Simon Horman
2010-02-26  7:01       ` Michael Chan
2010-02-26 18:40         ` Paul E. McKenney
2010-02-26 19:11           ` Michael Chan
2010-02-26 19:33             ` Paul E. McKenney
2010-02-26 10:11     ` David Miller
2010-02-26 10:11   ` [PATCH net-next 2/6] cnic: Finetune iSCSI connection reset David Miller
2010-02-26 10:11 ` [PATCH net-next 1/6] cnic: Finetune iSCSI connection set up David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1267058529-18454-1-git-send-email-mchan@broadcom.com \
    --to=mchan@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).