From: Thomas Graf <tgraf@suug.ch>
To: jamal <hadi@cyberus.ca>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@oss.sgi.com
Subject: Re: [PATCH] PKT_SCHED: dsmark must take care of shared/cloned skbs
Date: Mon, 20 Dec 2004 00:18:24 +0100 [thread overview]
Message-ID: <20041219231824.GS17998@postel.suug.ch> (raw)
In-Reply-To: <1103496820.1049.204.camel@jzny.localdomain>
* jamal <1103496820.1049.204.camel@jzny.localdomain> 2004-12-19 17:53
> On Sun, 2004-12-19 at 15:36, Thomas Graf wrote:
> > * jamal <1103487827.1048.188.camel@jzny.localdomain> 2004-12-19 15:23
> > > If the qdisc at that level muddies the packet thats fair game - thats
> > > what goes out on the wire. So we should leave the code as is.
> >
> > Agreed for egress but I think it is needed for stuff like IMQ. It's
> > debatable whether we should take care of IMQ and alike though.
>
> You are right, it may cause an issue on an IMQ like device when we have
> one in kernel. Hang on to the patch for now is my opinion; "schedulers"
> should probably not be mucking with packets once they are queued in
> (dsmark aint really a scheduler). We should talk to Werner to see if we
> can move that functionality prequeueing ...
Fine with me, we could make the dscp mapping an action. I doubt that
there are many users out there since the ECN bits are still taken
into account which doesn't make much sense. Something like the
following patch would be required to bring back the old behaviour
which relied on the lower two bits being unused.
--- linux-2.6.10-rc3-bk12.orig/net/sched/sch_dsmark.c 2004-12-19 01:31:01.000000000 +0100
+++ linux-2.6.10-rc3-bk12/net/sched/sch_dsmark.c 2004-12-19 01:31:27.000000000 +0100
@@ -14,6 +14,7 @@
#include <linux/rtnetlink.h>
#include <net/pkt_sched.h>
#include <net/dsfield.h>
+#include <net/inet_ecn.h>
#include <asm/byteorder.h>
@@ -199,10 +200,12 @@
IP/IPv6 header is always linear --TGR */
switch (skb->protocol) {
case __constant_htons(ETH_P_IP):
- skb->tc_index = ipv4_get_dsfield(skb->nh.iph);
+ skb->tc_index = ipv4_get_dsfield(skb->nh.iph)
+ & ~INET_ECN_MASK;
break;
case __constant_htons(ETH_P_IPV6):
- skb->tc_index = ipv6_get_dsfield(skb->nh.ipv6h);
+ skb->tc_index = ipv6_get_dsfield(skb->nh.ipv6h)
+ & ~INET_ECN_MASK;
break;
default:
skb->tc_index = 0;
next prev parent reply other threads:[~2004-12-19 23:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-18 17:00 [PATCH] PKT_SCHED: dsmark must take care of shared/cloned skbs Thomas Graf
2004-12-18 21:00 ` Thomas Graf
2004-12-19 20:23 ` jamal
2004-12-19 20:36 ` Thomas Graf
2004-12-19 22:53 ` jamal
2004-12-19 23:18 ` Thomas Graf [this message]
2004-12-20 8:06 ` Patrick McHardy
2004-12-20 14:13 ` jamal
2004-12-21 1:02 ` David S. Miller
2004-12-22 13:14 ` jamal
2004-12-22 13:50 ` Thomas Graf
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=20041219231824.GS17998@postel.suug.ch \
--to=tgraf@suug.ch \
--cc=davem@davemloft.net \
--cc=hadi@cyberus.ca \
--cc=netdev@oss.sgi.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).