Skip to contentSkip to conversation

relationship between ingress policer and netfilter hooks?

DISCUSSION Chris Friesen 2 participants 4 messages Jun 2, 2009 – Jun 3, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

Can someone tell me where the hook is for incoming packets to be sent through the ingress policer?

In particular, I'm trying to find out how the ingress traffic shaping hook relates to the various netfilter hooks so that I can set them up to behave nicely together.

Thanks,

Chris

#1 lore raw
Quoted 8 lines · Chris Friesen

Hi all,

Can someone tell me where the hook is for incoming packets to be sent through the ingress policer?

In particular, I'm trying to find out how the ingress traffic shaping hook relates to the various netfilter hooks so that I can set them up to behave nicely together.

They're not related at all. The ingress qdisc is hooked at net/dev/core.c:handle_ing().

#2 lore raw
Quoted 7 lines · Patrick McHardy
Quoted 5 lines · Chris Friesen

Hi all,

Can someone tell me where the hook is for incoming packets to be sent through the ingress policer?

Quoted 6 lines
Quoted 3 lines

In particular, I'm trying to find out how the ingress traffic shaping hook relates to the various netfilter hooks so that I can set them up to behave nicely together.

They're not related at all. The ingress qdisc is hooked at net/dev/core.c:handle_ing().

Thanks. Based on that the shaping is done before any of the netfilter hooks, which is what I was trying to figure out.

On a related note...the deliver_skb() call right before the call to handle_ing()--is that to allow packet sockets to receive everything that arrives on the wire even if some of it may be dropped later?

Chris

#3 lore raw
Quoted 12 lines · Chris Friesen
Quoted 10 lines · Patrick McHardy
Quoted 8 lines · Chris Friesen

Hi all,

Can someone tell me where the hook is for incoming packets to be sent through the ingress policer?

In particular, I'm trying to find out how the ingress traffic shaping hook relates to the various netfilter hooks so that I can set them up to behave nicely together.

Quoted 5 lines
Quoted 2 lines

They're not related at all. The ingress qdisc is hooked at net/dev/core.c:handle_ing().

Thanks. Based on that the shaping is done before any of the netfilter hooks, which is what I was trying to figure out.

Correct.

Quoted 3 lines

On a related note...the deliver_skb() call right before the call to handle_ing()--is that to allow packet sockets to receive everything that arrives on the wire even if some of it may be dropped later?

Yes, its the final delivery for ptype_all handlers.