From: Jarek Poplawski <jarkao2@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: kaber@trash.net, jussi.kivilinna@mbnet.fi, netdev@vger.kernel.org
Subject: Re: [PATCH 2/2 respin] net_sched: Add qdisc __NET_XMIT_BYPASS flag
Date: Tue, 5 Aug 2008 06:34:23 +0000 [thread overview]
Message-ID: <20080805063423.GA4407@ff.dom.local> (raw)
In-Reply-To: <20080804.231449.199557608.davem@davemloft.net>
On Mon, Aug 04, 2008 at 11:14:49PM -0700, David Miller wrote:
...
> After applying this I noticed that dst_input()'s usage of
> plain NET_XMIT_BYPASS was bogus, and after killing that
> there are no more references.
>
> Thus I added the following commit.
>
> commit cc6533e98a7f3cb7fce9d740da49195c7aa523a4
> Author: David S. Miller <davem@davemloft.net>
> Date: Mon Aug 4 23:04:08 2008 -0700
>
> net: Kill plain NET_XMIT_BYPASS.
>
> dst_input() was doing something completely absurd, looping
> on skb->dst->input() if NET_XMIT_BYPASS was seen, but these
> functions never return such an error.
>
> And as a result plain ole' NET_XMIT_BYPASS has no more
> references and can be completely killed off.
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
>
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index abbf5d5..488c56e 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -61,9 +61,6 @@ struct wireless_dev;
> #define NET_XMIT_DROP 1 /* skb dropped */
> #define NET_XMIT_CN 2 /* congestion notification */
> #define NET_XMIT_POLICED 3 /* skb is shot by police */
> -#define NET_XMIT_BYPASS 4 /* packet does not leave via dequeue;
> - (TC use only - dev_queue_xmit
> - returns this as NET_XMIT_SUCCESS) */
> #define NET_XMIT_MASK 0xFFFF /* qdisc flags in net/sch_generic.h */
>
> /* Backlog congestion levels */
> diff --git a/include/net/dst.h b/include/net/dst.h
> index c5c318a..8a8b71e 100644
> --- a/include/net/dst.h
> +++ b/include/net/dst.h
> @@ -252,17 +252,7 @@ static inline int dst_output(struct sk_buff *skb)
> /* Input packet from network to transport. */
> static inline int dst_input(struct sk_buff *skb)
> {
> - int err;
> -
> - for (;;) {
> - err = skb->dst->input(skb);
> -
> - if (likely(err == 0))
> - return err;
> - /* Oh, Jamal... Seems, I will not forgive you this mess. :-) */
> - if (unlikely(err != NET_XMIT_BYPASS))
> - return err;
> - }
> + return skb->dst->input(skb);
> }
NAK! You're not allowed to remove such a great comment!
BTW, I hope you've checked this enough, becouse I've some doubts
here: this NET_XMIT_BYPASS looks wrong here but maybe it was meant
to be some NET_RX_ code, like NET_RX_CN_HIGH?
Jarek P.
next prev parent reply other threads:[~2008-08-05 6:28 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-31 17:14 [PATCH] net_sched: Add qdisc __NET_XMIT_STOLEN flag Jarek Poplawski
2008-08-01 6:15 ` Patrick McHardy
2008-08-01 7:58 ` Jarek Poplawski
2008-08-01 10:19 ` [PATCH] net_sched: Add qdisc __NET_XMIT_BYPASS flag Jarek Poplawski
2008-08-04 1:25 ` David Miller
2008-08-04 6:28 ` [PATCH take 2] " Jarek Poplawski
2008-08-04 6:42 ` David Miller
2008-08-04 6:51 ` Jarek Poplawski
2008-08-04 8:55 ` [PATCH 1/2 respin] net_sched: Add qdisc __NET_XMIT_STOLEN flag Jarek Poplawski
2008-08-05 5:38 ` David Miller
2008-08-04 8:57 ` [PATCH 2/2 respin] net_sched: Add qdisc __NET_XMIT_BYPASS flag Jarek Poplawski
2008-08-05 6:14 ` David Miller
2008-08-05 6:34 ` Jarek Poplawski [this message]
2008-08-05 6:31 ` David Miller
2008-08-05 6:47 ` Jarek Poplawski
2008-08-04 18:35 ` [PATCH take 2] " Jussi Kivilinna
2008-08-04 21:03 ` Jarek Poplawski
2008-08-05 12:43 ` Jussi Kivilinna
2008-08-05 15:50 ` Jarek Poplawski
2008-08-06 19:42 ` qdisc_enqueue, NET_XMIT_SUCCESS and kfree_skb (Was: Re: [PATCH take 2] net_sched: Add qdisc __NET_XMIT_BYPASS flag) Jussi Kivilinna
2008-08-06 21:52 ` Jarek Poplawski
2008-08-07 3:26 ` qdisc_enqueue, NET_XMIT_SUCCESS and kfree_skb David Miller
2008-08-07 5:09 ` David Miller
2008-08-07 6:24 ` Jarek Poplawski
2008-08-07 10:09 ` Jarek Poplawski
2008-08-07 10:10 ` David Miller
2008-08-07 10:31 ` Jarek Poplawski
2008-08-07 10:45 ` David Miller
2008-08-07 11:39 ` Jarek Poplawski
2008-08-07 11:36 ` Jussi Kivilinna
2008-08-07 12:05 ` Jarek Poplawski
2008-08-18 6:52 ` David Miller
2008-08-19 12:50 ` Herbert Xu
2008-08-19 13:08 ` Patrick McHardy
2008-08-19 13:11 ` Herbert Xu
2008-08-19 13:20 ` Patrick McHardy
2008-08-19 13:42 ` Herbert Xu
2008-08-19 20:10 ` Denys Fedoryshchenko
2008-08-19 20:21 ` Jarek Poplawski
2008-08-19 20:26 ` David Miller
2008-08-07 11:40 ` qdisc_enqueue, NET_XMIT_SUCCESS and kfree_skb (Was: Re: [PATCH take 2] net_sched: Add qdisc __NET_XMIT_BYPASS flag) Jussi Kivilinna
2008-08-07 12:23 ` Jarek Poplawski
2008-08-05 21:22 ` [PATCH take 2] net_sched: Add qdisc __NET_XMIT_BYPASS flag David Miller
2008-08-04 6:48 ` [PATCH take 3] " 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=20080805063423.GA4407@ff.dom.local \
--to=jarkao2@gmail.com \
--cc=davem@davemloft.net \
--cc=jussi.kivilinna@mbnet.fi \
--cc=kaber@trash.net \
--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).