Skip to contentSkip to conversation

Jitter phenomenon in the netfilter infrastructure

DISCUSSION Mike-Ro-Chanel 2 participants 2 messages Oct 16, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

Hi All,
Inspired by ipt_limit module I've written a token bucket module as a iptables module extension.

I've observed a strange behaviour:
In the linux kernel 2.4.21 input ethernet frames are sent to the IPv4 layer by "process_backlog()" function, this one pass to ip_rcv() hundreds of SKB elements in a single burst, its execution is limited (in time) by 1 jiffy. As result a regular IPv4 input traffic is looked by PREROUTING hook as an irregular flow of packets.

Looking this phenomenon I think: an ingress bandwidth filter as netfilter module is unfeasible.

Is my opinion wrong?

Any suggestions?

Thanks

Mike-Ro-Chanel

#1 lore raw
Quoted 11 lines · Mike-Ro-Chanel

Hi All,
Inspired by ipt_limit module I've written a token bucket module as a iptables module extension.

I've observed a strange behaviour:
In the linux kernel 2.4.21 input ethernet frames are sent to the IPv4 layer by "process_backlog()" function, this one pass to ip_rcv() hundreds of SKB elements in a single burst, its execution is limited (in time) by 1 jiffy.
As result a regular IPv4 input traffic is looked by PREROUTING hook as an irregular flow of packets.

yes, but you have an skb receive timestamp, which tells you the exact jiffies at which the skb came in from the wire.

Quoted 2 lines

Thanks
Mike-Ro-Chanel

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie