netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jamal <hadi@cyberus.ca>
To: Patrick McHardy <kaber@trash.net>
Cc: Stephen Hemminger <shemminger@osdl.org>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@oss.sgi.com
Subject: Re: [PATCH] netem: account for packets in delayed queue in qlen
Date: Thu, 21 Apr 2005 20:05:36 -0400	[thread overview]
Message-ID: <1114128336.10572.12.camel@localhost.localdomain> (raw)
In-Reply-To: <426839B4.2090502@trash.net>

On Fri, 2005-22-04 at 01:39 +0200, Patrick McHardy wrote:
> Stephen Hemminger wrote:
> > I'm thinking of changing enqueue (and maybe later dequeue) API to decouple
> > the qlen assumption.
> > 
> > Either:
> > 	rc = qdisc->enqueue(skb, qdisc, &my->qlen)
> > or add NET_XMIT_DUPPED
> > 	rc = qdisc->enqueue(skb, qdisc);
> > 	if (rc < NET_XMIT_SUCCESS) {
> > 		++my->dropped;
> > 	} else {
> > 		my->qlen++;
> > 		if (rc == NET_XMIT_DUPPED)
> > 			my->qlen++;
> > }
> 
> To be frank, I don't like either one. Both have the same problem
> wrt. HFSC, the first solution requires changes all over the place,
> the second one is unflexible and also requires lots of changes. I
> don't see what could benefit from this API change besides netem,
> so I'd vote to go with my proposed solution: store the parent
> pointers in struct Qdisc, add code to walk up the tree and adjust
> the qlen to netem, and fix up HFSC.

Duplication of packets would be trivial to do with mirred mirror option
attached to the qdisc. Something along the lines of:

on device ethx \
match all packets (or whatever filter you want) \
action mirred mirror to device ethx

To duplicate packet more than once:
on device ethx \
match all packets (or whatever filter you want) \
action mirred mirror to device ethx \
action mirred mirror to device ethx

repeat for as many dups as you want

more funky?
randomly duplicate one or two packets

on device ethx \
match all packets (or whatever filter you want) \
action gact random stop here \
action mirred mirror to device ethx \
action gact random stop here \
action mirred mirror to device ethx

cheers,
jamal

  reply	other threads:[~2005-04-22  0:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-29 23:21 [PATCH] netem: account for packets in delayed queue in qlen Stephen Hemminger
2005-04-01  4:36 ` David S. Miller
2005-04-05 19:48 ` Patrick McHardy
2005-04-05 19:58   ` Stephen Hemminger
2005-04-07 19:04   ` Stephen Hemminger
2005-04-17 15:38     ` Patrick McHardy
2005-04-19  1:06       ` Stephen Hemminger
2005-04-20 14:00         ` Patrick McHardy
2005-04-21  3:20           ` Stephen Hemminger
2005-04-21 23:10             ` Patrick McHardy
2005-04-21 23:22               ` Stephen Hemminger
2005-04-21 23:39                 ` Patrick McHardy
2005-04-22  0:05                   ` jamal [this message]
2005-04-22  0:10                     ` Patrick McHardy
2005-04-22  0:32                       ` jamal
2005-04-22  0:40                         ` jamal

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=1114128336.10572.12.camel@localhost.localdomain \
    --to=hadi@cyberus.ca \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=netdev@oss.sgi.com \
    --cc=shemminger@osdl.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).