netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Krishna Kumar <krkumar2@in.ibm.com>
Cc: jagana@us.ibm.com, Robert.Olsson@data.slu.se,
	peter.p.waskiewicz.jr@intel.com, herbert@gondor.apana.org.au,
	gaagaan@gmail.com, kumarkr@linux.ibm.com, rdreier@cisco.com,
	mcarlson@broadcom.com, kaber@trash.net, jeff@garzik.org,
	general@lists.openfabrics.org, netdev@vger.kernel.org,
	tgraf@suug.ch, hadi@cyberus.ca, davem@davemloft.net,
	mchan@broadcom.com, sri@us.ibm.com
Subject: [ofa-general] Re: [PATCH 11/12 -Rev2] IPoIB xmit API addition
Date: Mon, 23 Jul 2007 14:48:26 +0400	[thread overview]
Message-ID: <20070723104826.GD22877@2ka.mipt.ru> (raw)
In-Reply-To: <20070722090649.7787.47960.sendpatchset@K50wks273871wss.in.ibm.com>

On Sun, Jul 22, 2007 at 02:36:49PM +0530, Krishna Kumar (krkumar2@in.ibm.com) wrote:
> diff -ruNp org/drivers/infiniband/ulp/ipoib/ipoib_ib.c rev2/drivers/infiniband/ulp/ipoib/ipoib_ib.c
> --- org/drivers/infiniband/ulp/ipoib/ipoib_ib.c	2007-07-20 07:49:28.000000000 +0530
> +++ rev2/drivers/infiniband/ulp/ipoib/ipoib_ib.c	2007-07-22 00:08:37.000000000 +0530
> @@ -242,8 +242,9 @@ repost:
>  static void ipoib_ib_handle_tx_wc(struct net_device *dev, struct ib_wc *wc)
>  {
>  	struct ipoib_dev_priv *priv = netdev_priv(dev);
> +	int i = 0, num_completions;
> +	int tx_ring_index = priv->tx_tail & (ipoib_sendq_size - 1);
>  	unsigned int wr_id = wc->wr_id;
> -	struct ipoib_tx_buf *tx_req;
>  	unsigned long flags;
>  
>  	ipoib_dbg_data(priv, "send completion: id %d, status: %d\n",
> @@ -255,23 +256,57 @@ static void ipoib_ib_handle_tx_wc(struct
>  		return;
>  	}
>  
> -	tx_req = &priv->tx_ring[wr_id];
> +	num_completions = wr_id - tx_ring_index + 1;
> +	if (num_completions <= 0)
> +		num_completions += ipoib_sendq_size;

Can this still be less than zero?

-- 
	Evgeniy Polyakov

  parent reply	other threads:[~2007-07-23 10:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-22  9:04 [PATCH 00/12 -Rev2] Implement batching skb API Krishna Kumar
2007-07-22  9:05 ` [ofa-general] [PATCH 01/12 -Rev2] HOWTO documentation for Batching SKB Krishna Kumar
2007-07-22  9:05 ` [PATCH 02/12 -Rev2] Changes to netdevice.h Krishna Kumar
2007-07-22 17:06   ` [ofa-general] " Patrick McHardy
2007-07-23  2:57     ` Krishna Kumar2
2007-07-22  9:05 ` [ofa-general] [PATCH 03/12 -Rev2] dev.c changes Krishna Kumar
2007-07-23 10:44   ` [ofa-general] " Evgeniy Polyakov
2007-07-23 11:17     ` Krishna Kumar2
2007-07-22  9:05 ` [ofa-general] [PATCH 04/12 -Rev2] Ethtool changes Krishna Kumar
2007-07-22  9:05 ` [ofa-general] [PATCH 05/12 -Rev2] sysfs changes Krishna Kumar
2007-07-22  9:05 ` [ofa-general] [PATCH 06/12 -Rev2] rtnetlink changes Krishna Kumar
2007-07-22 17:10   ` Patrick McHardy
2007-07-23  2:54     ` [ofa-general] " Krishna Kumar2
2007-07-22  9:06 ` [ofa-general] [PATCH 07/12 -Rev2] Change qdisc_run & qdisc_restart API, callers Krishna Kumar
2007-07-22  9:06 ` [ofa-general] [PATCH 08/12 -Rev2] IPoIB include file changes Krishna Kumar
2007-07-22  9:06 ` [ofa-general] [PATCH 09/12 -Rev2] IPoIB verbs changes Krishna Kumar
2007-07-22  9:06 ` [ofa-general] [PATCH 10/12 -Rev2] IPoIB multicast, CM changes Krishna Kumar
2007-07-22  9:06 ` [ofa-general] [PATCH 11/12 -Rev2] IPoIB xmit API addition Krishna Kumar
2007-07-22  9:41   ` Michael S. Tsirkin
2007-07-23  2:53     ` [ofa-general] " Krishna Kumar2
2007-07-23 10:48   ` Evgeniy Polyakov [this message]
2007-07-23 11:17     ` Krishna Kumar2
2007-07-22  9:06 ` [ofa-general] [PATCH 12/12 -Rev2] IPoIB xmit internals changes (ipoib_ib.c) Krishna Kumar
2007-07-23  9:53 ` [PATCH 00/12 -Rev2] Implement batching skb API Krishna Kumar2

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=20070723104826.GD22877@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=Robert.Olsson@data.slu.se \
    --cc=davem@davemloft.net \
    --cc=gaagaan@gmail.com \
    --cc=general@lists.openfabrics.org \
    --cc=hadi@cyberus.ca \
    --cc=herbert@gondor.apana.org.au \
    --cc=jagana@us.ibm.com \
    --cc=jeff@garzik.org \
    --cc=kaber@trash.net \
    --cc=krkumar2@in.ibm.com \
    --cc=kumarkr@linux.ibm.com \
    --cc=mcarlson@broadcom.com \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=peter.p.waskiewicz.jr@intel.com \
    --cc=rdreier@cisco.com \
    --cc=sri@us.ibm.com \
    --cc=tgraf@suug.ch \
    /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).