netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Jarek Poplawski <jarkao2@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: [PATCH 3/6] pkt_sched: sch_generic: Add generic	qdisc->ops->peek() implementation.
Date: Thu, 16 Oct 2008 14:45:54 +0200	[thread overview]
Message-ID: <48F73782.1090003@trash.net> (raw)
In-Reply-To: <20081016124315.GA20302@ff.dom.local>

Jarek Poplawski wrote:
> On Thu, Oct 16, 2008 at 02:19:37PM +0200, Patrick McHardy wrote:
>> Jarek Poplawski wrote:
>>> pkt_sched: sch_generic: Add generic qdisc->ops->peek() implementation.
>>>
>>> +	if (qops->peek == NULL)
>>> +		qops->peek = noop_qdisc_ops.peek;
>>>  	if (qops->dequeue == NULL)
>>>  		qops->dequeue = noop_qdisc_ops.dequeue;
>> ->dequeue and ->peek are somewhat tied together, so I think we should
>> only use the noop variants if both are unset. Whether this should be
>> checked here of before merging new qdiscs is a different question of
>> course :)
> 
> Actually, there is much less users of ->peek. Do you mean to always check
> for NULL before using? It was meant mainly for these non-work-conserving
> qdisc in case patch 6/6 isn't merged. Of course, IMHO it should be enough
> to implement this always (while merging), but this code above could be
> misleading what is optional/mandatory. (Please make it clear which way do
> you prefer and I'll redo, no problem.)

No, I meant that peek = noop_qdisc_ops.peek and dequeue = something_else
doesn't make much sense. But I think declaring this an API usage error
and catching it during review is fine.

  reply	other threads:[~2008-10-16 12:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-16  9:47 [PATCH 3/6] pkt_sched: sch_generic: Add generic qdisc->ops->peek() implementation Jarek Poplawski
2008-10-16 12:19 ` Patrick McHardy
2008-10-16 12:43   ` Jarek Poplawski
2008-10-16 12:45     ` Patrick McHardy [this message]
2008-10-16 20:59       ` Jarek Poplawski

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=48F73782.1090003@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=jarkao2@gmail.com \
    --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).