lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 31 Jul 2015 14:22:10 +0200
From:	Yegor Yefremov <yegorslists@...glemail.com>
To:	Mugunthan V N <mugunthanvnm@...com>
Cc:	netdev <netdev@...r.kernel.org>, Felipe Balbi <balbi@...com>
Subject: am335x: cpsw at high broadcast load

We experience massive problems, when putting am335x based devices into
high broadcast load environment (customer reports). To reproduce the
issue we've written following Python script

#!/usr/bin/python
# Send UDP broadcast packets

myport = 50000

import sys, time
from socket import *

if len(sys.argv) == 2:
    myport = int(sys.argv[1])

s = socket(AF_INET, SOCK_DGRAM)
s.bind(('192.168.254.36', 0))
s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)

while 1:
    #data = repr(time.time()) + '\n'
    data = "a"
    s.sendto(data, ('<broadcast>', myport))
    time.sleep(0.0001)

Just running this script on a host machine and invoking "top" on the
am335x machine results in sirq showing about 90% for 600MHz CPU and
3.18.x kernel. Below example of idle "top" output for the reference:

Mem: 13432K used, 217844K free, 64K shrd, 652K buff, 4956K cached
CPU:   0% usr   0% sys   0% nic  99% idle   0% io   0% irq   0% sirq

Then I tried 4.2.0-rc4 and sirq was about 80%, then I applied both

drivers: net: cpsw: remove  disable_irq/enable_irq as irq can be
    masked from cpsw itself
  drivers: net: cpsw: add separate napi for tx packet handling for
    performance improvment

and sirq lowered to about 50%, but I have also tried evil vendor tree
3.2.0+ and sirq was about 2%. Am I missing some kernel option/setting?
Any idea, how one can make am335x with a recent kernel to keep sirq as
low as possible, when no service listens to these broadcasts?

All am335x kernels used dual_emac mode.

I have similar situation with am3517. Kernel 2.6.37 (latest official
TI kernel) shows sirq 24% and upstream 4.1.2 about 90%.

Thanks.

Regards,
Yegor
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ