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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 13 Jun 2011 15:28:19 +0800
From:	Aaron Wu <aaronwu06@...il.com>
To:	netdev <netdev@...r.kernel.org>
Subject: Question on IP_TOS options

Greetings!

Recently I am looking into some network performance test, but have no
idea how the IP_TOS, to be specific the 0xa0 (means
IPTOS_PREC_CRITIC_ECP?) works. Here is the full story:
By starting two iperf sessions at the same time, followed by the third
iperf session right after 10 seconds like below:

1)iperf -c <serverip> -p 5001 -u -t 20 -S 0x00 -b 3.2M -i 2
2)iperf -c <serverip> -p 5002 -u -t 20 -S 0xa0 -b 2.8M -i 2

3)iperf -c <serverip> -p 5003 -u -t 20 -S 0x00 -b 3.2M -i 2

The total network bandwidth is about 6M, so first we fill all the
bandwidth with session 1 and sesson 2, session one is marked as low
priority by -S 0x00 and session 2 as high prioirty with -S 0xa0.
Then 10 seconds later, we start the third low priority session. The
expected result is: bandwidth for session 2 will not drop to 90% of
it's original value before the insertion of session 3, as it's the
high priority session. However, the actual test result varies from
platform to platform, on a ubuntu 10.04 X86 computer is works as
expected, on another embedded platform also running the IPV4,
bandwidth for session 2 decreased greatly due to the insertion of
session 3. We tracked the code and find -S option for iperf eventually
invokes the following code in net/ipv4/ip_sockglue.c:

  case IP_TOS:    /* This sets both TOS and Precedence */
                printk("Setting IP_TOS, val is 0x%x\n", val);
                if (sk->sk_type == SOCK_STREAM) {
                        val &= ~3;
                        val |= inet->tos & 3;
                        printk("Setting IP_TOS, is stream val is 0x%x\n", val);
                }
                if (inet->tos != val) {
                        inet->tos = val;
                        sk->sk_priority = rt_tos2priority(val);
                        sk_dst_reset(sk);
                        printk("Setting IP_TOS, set tos to val is 0x%x\n", val);
                }
                break;
We don't have idea on the 0xa0 (IPTOS_PREC_CRITIC_ECP) for IP_TOS
option and have no idea why on X86 it works well and on the embedded
platform it does not. Appreciate very much if someone could shed some
light.

Best regards,
Aaron
--
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