From owner-svn-src-all@FreeBSD.ORG Sat Jan 26 03:01:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 81CF36B; Sat, 26 Jan 2013 03:01:53 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 74E7DA8B; Sat, 26 Jan 2013 03:01:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0Q31r8K027470; Sat, 26 Jan 2013 03:01:53 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0Q31q1p027460; Sat, 26 Jan 2013 03:01:52 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201301260301.r0Q31q1p027460@svn.freebsd.org> From: Navdeep Parhar Date: Sat, 26 Jan 2013 03:01:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245935 - in head/sys/dev/cxgbe: common tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jan 2013 03:01:53 -0000 Author: np Date: Sat Jan 26 03:01:51 2013 New Revision: 245935 URL: http://svnweb.freebsd.org/changeset/base/245935 Log: Add a couple of missing error codes. Treat CPL_ERR_KEEPALV_NEG_ADVICE as negative advice and not a fatal error. MFC after: 3 days Modified: head/sys/dev/cxgbe/common/t4_msg.h head/sys/dev/cxgbe/tom/t4_connect.c head/sys/dev/cxgbe/tom/t4_cpl_io.c head/sys/dev/cxgbe/tom/t4_listen.c head/sys/dev/cxgbe/tom/t4_tom.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/common/t4_msg.h ============================================================================== --- head/sys/dev/cxgbe/common/t4_msg.h Sat Jan 26 01:41:42 2013 (r245934) +++ head/sys/dev/cxgbe/common/t4_msg.h Sat Jan 26 03:01:51 2013 (r245935) @@ -159,6 +159,8 @@ enum CPL_error { CPL_ERR_KEEPALIVE_TIMEDOUT = 34, CPL_ERR_RTX_NEG_ADVICE = 35, CPL_ERR_PERSIST_NEG_ADVICE = 36, + CPL_ERR_KEEPALV_NEG_ADVICE = 37, + CPL_ERR_WAIT_ARP_RPL = 41, CPL_ERR_ABORT_FAILED = 42, CPL_ERR_IWARP_FLM = 50, }; Modified: head/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_connect.c Sat Jan 26 01:41:42 2013 (r245934) +++ head/sys/dev/cxgbe/tom/t4_connect.c Sat Jan 26 03:01:51 2013 (r245935) @@ -196,7 +196,7 @@ do_act_open_rpl(struct sge_iq *iq, const CTR3(KTR_CXGBE, "%s: atid %u, status %u ", __func__, atid, status); /* Ignore negative advice */ - if (status == CPL_ERR_RTX_NEG_ADVICE) + if (negative_advice(status)) return (0); free_atid(sc, atid); Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Sat Jan 26 01:41:42 2013 (r245934) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Sat Jan 26 03:01:51 2013 (r245935) @@ -1018,8 +1018,7 @@ do_abort_req(struct sge_iq *iq, const st KASSERT(toep->tid == tid, ("%s: toep tid mismatch", __func__)); - if (cpl->status == CPL_ERR_RTX_NEG_ADVICE || - cpl->status == CPL_ERR_PERSIST_NEG_ADVICE) { + if (negative_advice(cpl->status)) { CTR4(KTR_CXGBE, "%s: negative advice %d for tid %d (0x%x)", __func__, cpl->status, tid, toep->flags); return (0); /* Ignore negative advice */ Modified: head/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_listen.c Sat Jan 26 01:41:42 2013 (r245934) +++ head/sys/dev/cxgbe/tom/t4_listen.c Sat Jan 26 03:01:51 2013 (r245935) @@ -835,8 +835,7 @@ do_abort_req_synqe(struct sge_iq *iq, co CTR6(KTR_CXGBE, "%s: tid %u, synqe %p (0x%x), lctx %p, status %d", __func__, tid, synqe, synqe->flags, synqe->lctx, cpl->status); - if (cpl->status == CPL_ERR_RTX_NEG_ADVICE || - cpl->status == CPL_ERR_PERSIST_NEG_ADVICE) + if (negative_advice(cpl->status)) return (0); /* Ignore negative advice */ INP_WLOCK(inp); Modified: head/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.c Sat Jan 26 01:41:42 2013 (r245934) +++ head/sys/dev/cxgbe/tom/t4_tom.c Sat Jan 26 03:01:51 2013 (r245935) @@ -547,6 +547,15 @@ set_tcpddp_ulp_mode(struct toepcb *toep) toep->ddp_score = DDP_LOW_SCORE; } +int +negative_advice(int status) +{ + + return (status == CPL_ERR_RTX_NEG_ADVICE || + status == CPL_ERR_PERSIST_NEG_ADVICE || + status == CPL_ERR_KEEPALV_NEG_ADVICE); +} + static int alloc_tid_tabs(struct tid_info *t) { Modified: head/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.h Sat Jan 26 01:41:42 2013 (r245934) +++ head/sys/dev/cxgbe/tom/t4_tom.h Sat Jan 26 03:01:51 2013 (r245935) @@ -236,6 +236,7 @@ uint64_t calc_opt0(struct socket *, stru int, int, int, int); uint32_t select_ntuple(struct port_info *, struct l2t_entry *, uint32_t); void set_tcpddp_ulp_mode(struct toepcb *); +int negative_advice(int); struct clip_entry *hold_lip(struct tom_data *, struct in6_addr *); void release_lip(struct tom_data *, struct clip_entry *);