All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: kxie@chelsio.com, linux-scsi@vger.kernel.org, netdev@vger.kernel.org
Cc: hariprasad@chelsio.com, anish@chelsio.com, hch@infradead.org,
	James.Bottomley@HansenPartnership.com, michaelc@cs.wisc.edu,
	davem@davemloft.net
Subject: Re: [PATCH net v2 3/5] cxgb4i: handle non-pdu-aligned rx and additional types of negative advice
Date: Mon, 08 Dec 2014 14:36:39 +0300	[thread overview]
Message-ID: <54858D47.3080005@cogentembedded.com> (raw)
In-Reply-To: <201412080958.sB89wEsj005499@localhost6.localdomain6>

Hello.

On 12/8/2014 12:58 PM, kxie@chelsio.com wrote:

> [PATCH net v2 3/5] cxgb4i: handle non-pdu-aligned rx data and additional types of negative advice

    The patch summary shouldn't be duplicated in the change log, at least not 
like this...

> From: Karen Xie <kxie@chelsio.com>

> - abort the connection upon receiving of cpl_rx_data, which means the pdu cannot be recovered from the tcp stream. This could be due to pdu header corruption.
> - handle additional types of negative advice returned by h/w.

> Signed-off-by: Karen Xie <kxie@chelsio.com>
> ---
>   drivers/scsi/cxgbi/cxgb4i/cxgb4i.c |   34 +++++++++++++++++++++++++++++++---
>   1 files changed, 31 insertions(+), 3 deletions(-)

> diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
> index b834bde..051adab 100644
> --- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
> +++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
> @@ -845,6 +845,13 @@ static void csk_act_open_retry_timer(unsigned long data)
>
>   }
>
> +static inline int is_neg_adv(unsigned int status)

    'bool' fits better.

> +{
> +	return status == CPL_ERR_RTX_NEG_ADVICE ||
> +		status == CPL_ERR_KEEPALV_NEG_ADVICE ||
> +		status == CPL_ERR_PERSIST_NEG_ADVICE;
> +}
> +
[...]
> @@ -1027,6 +1033,27 @@ rel_skb:
>   	__kfree_skb(skb);
>   }
>
> +static void do_rx_data(struct cxgbi_device *cdev, struct sk_buff *skb)
> +{
> +	struct cxgbi_sock *csk;
> +	struct cpl_rx_data *cpl = (struct cpl_rx_data *)skb->data;
> +	unsigned int tid = GET_TID(cpl);
> +	struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev);
> +	struct tid_info *t = lldi->tids;
> +
> +	csk = lookup_tid(t, tid);
> +	if (!csk) {
> +		pr_err("can't find connection for tid %u.\n", tid);
> +	} else {
> +		/* not expecting this, reset the connection. */
> +		pr_err("csk 0x%p, tid %u, rcv cpl_rx_data.\n", csk, tid);

    Both situations considered an error?

> +		spin_lock_bh(&csk->lock);
> +		send_abort_req(csk);
> +		spin_unlock_bh(&csk->lock);
> +	}
> +	__kfree_skb(skb);
> +}
> +
>   static void do_rx_iscsi_hdr(struct cxgbi_device *cdev, struct sk_buff *skb)
>   {
>   	struct cxgbi_sock *csk;
[...]

WBR, Sergei


      reply	other threads:[~2014-12-08 11:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-08  9:58 [PATCH net v2 3/5] cxgb4i: handle non-pdu-aligned rx and additional types of negative advice kxie
2014-12-08 11:36 ` Sergei Shtylyov [this message]

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=54858D47.3080005@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=anish@chelsio.com \
    --cc=davem@davemloft.net \
    --cc=hariprasad@chelsio.com \
    --cc=hch@infradead.org \
    --cc=kxie@chelsio.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.