All of lore.kernel.org
 help / color / mirror / Atom feed
* Completely DROP for UDP packets.
@ 2007-12-08 19:39 msn
  2007-12-08 20:34 ` Martijn Lievaart
  0 siblings, 1 reply; 5+ messages in thread
From: msn @ 2007-12-08 19:39 UTC (permalink / raw)
  To: netfilter

Hi, I'm trying to dropping all UDP packets from specific address
but it still has higher CPU usages. anyone has ideas for this
issues ? here's example

A   --+--->  F
B   --+
C   --+

A/B/C sending massive UDP packets to F, also it has address dropping
rules fro A/B/C. Yes, it is works fine. But if i see the CPU usages
of 'F' some of cases it is using more than 20-30% when its(A/B/C)
sending 100M to F. is there any best way to decreasing the CPU usage
of the 'F' ? thanks in advance.

Cheers.

P.S :
1. INPUT filter dropping very higher CPU usages
2. TARPIT and prestate PREROUTING dropping less higher but not satisfied.




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

* Re: Completely DROP for UDP packets.
  2007-12-08 19:39 Completely DROP for UDP packets msn
@ 2007-12-08 20:34 ` Martijn Lievaart
  2007-12-10  5:43   ` msn
  2007-12-10  5:45   ` msn
  0 siblings, 2 replies; 5+ messages in thread
From: Martijn Lievaart @ 2007-12-08 20:34 UTC (permalink / raw)
  To: msn; +Cc: netfilter

msn wrote:
> Hi, I'm trying to dropping all UDP packets from specific address
> but it still has higher CPU usages. anyone has ideas for this
> issues ? here's example
>
> A   --+--->  F
> B   --+
> C   --+
>
> A/B/C sending massive UDP packets to F, also it has address dropping
> rules fro A/B/C. Yes, it is works fine. But if i see the CPU usages
> of 'F' some of cases it is using more than 20-30% when its(A/B/C)
> sending 100M to F. is there any best way to decreasing the CPU usage
> of the 'F' ? thanks in advance.
>
> Cheers.
>
> P.S :
> 1. INPUT filter dropping very higher CPU usages
> 2. TARPIT and prestate PREROUTING dropping less higher but not satisfied.
>
>   

TARPITTING does not work on UDP, it's for TCP only. Just DROP in the raw 
table.

HTH,
M4


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

* Re: Completely DROP for UDP packets.
  2007-12-08 20:34 ` Martijn Lievaart
@ 2007-12-10  5:43   ` msn
  2007-12-10  5:45   ` msn
  1 sibling, 0 replies; 5+ messages in thread
From: msn @ 2007-12-10  5:43 UTC (permalink / raw)
  To: m; +Cc: netfilter

So, it is NO

> msn wrote:
>> Hi, I'm trying to dropping all UDP packets from specific address but
>> it still has higher CPU usages. anyone has ideas for this
>> issues ? here's example
>>
>> A   --+--->  F
>> B   --+
>> C   --+
>>
>> A/B/C sending massive UDP packets to F, also it has address dropping
>> rules fro A/B/C. Yes, it is works fine. But if i see the CPU usages of
>> 'F' some of cases it is using more than 20-30% when its(A/B/C) sending
>> 100M to F. is there any best way to decreasing the CPU usage of the
>> 'F' ? thanks in advance.
>>
>> Cheers.
>>
>> P.S :
>> 1. INPUT filter dropping very higher CPU usages
>> 2. TARPIT and prestate PREROUTING dropping less higher but not
>> satisfied.
>>
>>
>
> TARPITTING does not work on UDP, it's for TCP only. Just DROP in the raw
>  table.
>
> HTH,
> M4




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

* Re: Completely DROP for UDP packets.
  2007-12-08 20:34 ` Martijn Lievaart
  2007-12-10  5:43   ` msn
@ 2007-12-10  5:45   ` msn
  2007-12-10 15:17     ` Pascal Hambourg
  1 sibling, 1 reply; 5+ messages in thread
From: msn @ 2007-12-10  5:45 UTC (permalink / raw)
  To: m; +Cc: netfilter

ignoring previous message. sorry...

So, it is NOT possible to decreasing the CPU usage of the massive UDP
handling in the linux kernel ? any comments would be nice to me. thanks in
advance.

Cheers.



> msn wrote:
>> Hi, I'm trying to dropping all UDP packets from specific address but
>> it still has higher CPU usages. anyone has ideas for this
>> issues ? here's example
>>
>> A   --+--->  F
>> B   --+
>> C   --+
>>
>> A/B/C sending massive UDP packets to F, also it has address dropping
>> rules fro A/B/C. Yes, it is works fine. But if i see the CPU usages of
>> 'F' some of cases it is using more than 20-30% when its(A/B/C) sending
>> 100M to F. is there any best way to decreasing the CPU usage of the
>> 'F' ? thanks in advance.
>>
>> Cheers.
>>
>> P.S :
>> 1. INPUT filter dropping very higher CPU usages
>> 2. TARPIT and prestate PREROUTING dropping less higher but not
>> satisfied.
>>
>>
>
> TARPITTING does not work on UDP, it's for TCP only. Just DROP in the raw
>  table.
>
> HTH,
> M4




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

* Re: Completely DROP for UDP packets.
  2007-12-10  5:45   ` msn
@ 2007-12-10 15:17     ` Pascal Hambourg
  0 siblings, 0 replies; 5+ messages in thread
From: Pascal Hambourg @ 2007-12-10 15:17 UTC (permalink / raw)
  To: netfilter

Hello,

msn a écrit :
> 
> So, it is NOT possible to decreasing the CPU usage of the massive UDP
> handling in the linux kernel ? any comments would be nice to me.

You cannot decrease the packet processing load in the network interface 
driver, unless you use a more "efficient" network card or driver. As 
Martijn wrote, the best you can do at iptables level is drop the packets 
as soon as possible, in the PREROUTING chain of the 'raw' table even 
though this is not the primary purpose of the 'raw' table. This will 
save CPU usage for the traversal of subsequent iptables chains, the 
connection tracking if it is enabled (as opposed to filtering in the 
PREROUTING chain of the 'mangle' table), the input routing decision and 
the fragment reassembly (as opposed to filtering in the INPUT chain of 
any table).

The path is as follows :

interface -> raw/PREROUTING -> conntrack & fragment reassembly -> 
mangle/PREROUTING -> nat/PREROUTING -> routing decision -> fragment 
reassembly -> mangle/INPUT -> filter/INPUT -> local delivery

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

end of thread, other threads:[~2007-12-10 15:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-08 19:39 Completely DROP for UDP packets msn
2007-12-08 20:34 ` Martijn Lievaart
2007-12-10  5:43   ` msn
2007-12-10  5:45   ` msn
2007-12-10 15:17     ` Pascal Hambourg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.