netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: jamal <hadi@cyberus.ca>
Cc: Maillist netdev <netdev@oss.sgi.com>
Subject: More tc action mess
Date: Wed, 19 Jan 2005 06:09:43 +0100	[thread overview]
Message-ID: <41EDEB97.3080503@trash.net> (raw)

I probably found the reason for the problems with the ipt action you were
talking about. netfilter targets, like tc actions, expect a struct 
sk_buff **,
but the ipt action does:

        struct sk_buff *skb = *pskb;
...
        ret = p->t->u.kernel.target->target(&skb, skb->dev, NULL,

which of course doesn't make much sense. Unfortunately, tcf_action_exec
does the same nonsense:

int tcf_action_exec(struct sk_buff *skb, struct tc_action *act,
...
                        ret = a->ops->act(&skb, a);

This means we must convert all paths on which tcf_action_exec is called
to use struct sk_buff ** :(

On egress q->enqueue owns the skb, so for this path we must convert the
qdiscs classification function and all classifierts. On ingress the skb
is owned by netif_receive_skb, so we need to convert the ingress qdisc's
enqueue function to take a sk_buff **, or better add a ingress_filter
function to avoid changing all enqueue calls in other qdiscs.

I have an big, ugly, incomplete patch that does this, but teaching
classifiers to behave correctly when the packet changes under them in
the middle of classification is hard, so any other solutions are welcome.

Regards
Patrick

             reply	other threads:[~2005-01-19  5:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-19  5:09 Patrick McHardy [this message]
2005-01-19 13:10 ` More tc action mess jamal
2005-01-19 20:22   ` Patrick McHardy
2005-01-20  4:30     ` jamal
2005-01-20  6:32       ` Patrick McHardy
2005-01-20 13:44         ` 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=41EDEB97.3080503@trash.net \
    --to=kaber@trash.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).