netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan-Bernd Themann <ossthema@de.ibm.com>
To: Roel Kluin <12o3l@tiscali.nl>
Cc: netdev@vger.kernel.org, themann@de.ibm.com
Subject: Re: cqe, cqe_skb: return when both or when either NULL?
Date: Mon, 26 Nov 2007 09:29:22 +0100	[thread overview]
Message-ID: <200711260929.22888.ossthema@de.ibm.com> (raw)
In-Reply-To: <47474C09.1020107@tiscali.nl>

Hi

On Friday 23 November 2007 22:54, Roel Kluin wrote:
> In function ehea_poll() drivers/net/ehea/ehea_main.c:667, in a loop cqe and
> cqe_skb - both struct ehea_cqe pointers - are assigned:
> --
> cqe = ehea_poll_rq1(pr->qp, &wqe_index);
> cqe_skb = ehea_poll_cq(pr->send_cq);
> 
> if (!cqe && !cqe_skb)
> 	return rx;
> --
> Is it intended that only when both are NULL there is a return, or should there
> be returned when either is NULL (and the && replaced with ||).

The AND is intended. We can only return if cqe==NULL. If cqe!=NULL and we
return anyway, more packets are in the receive queue and the stack won't call poll again
until the next interrupt occurs. Received packets might stay unprocessed for quite
some time in the queue.
In case there are more resources (SKBs) from send side
to be freed we'll do an extra round.

Regards,
Jan-Bernd

      reply	other threads:[~2007-11-26  8:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-23 21:54 cqe, cqe_skb: return when both or when either NULL? Roel Kluin
2007-11-26  8:29 ` Jan-Bernd Themann [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=200711260929.22888.ossthema@de.ibm.com \
    --to=ossthema@de.ibm.com \
    --cc=12o3l@tiscali.nl \
    --cc=netdev@vger.kernel.org \
    --cc=themann@de.ibm.com \
    /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).