netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* More tc action mess
@ 2005-01-19  5:09 Patrick McHardy
  2005-01-19 13:10 ` jamal
  0 siblings, 1 reply; 6+ messages in thread
From: Patrick McHardy @ 2005-01-19  5:09 UTC (permalink / raw)
  To: jamal; +Cc: Maillist netdev

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-01-20 13:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-19  5:09 More tc action mess Patrick McHardy
2005-01-19 13:10 ` 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

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).