Use test program to make sure netem is correct type.
(Logical change 1.57)
This commit is contained in:
parent
aa6a7ab8b2
commit
2979d52f45
|
|
@ -1,3 +1,9 @@
|
||||||
|
2004-07-30 Stephen Hemminger <shemminger@osdl.org>
|
||||||
|
|
||||||
|
* Change configure script to make sure netem is the correct
|
||||||
|
version. I changed the structure def. a couple of times before
|
||||||
|
settling on the final API
|
||||||
|
|
||||||
2004-07-07 Stephen Hemminger <shemminger@osdl.org>
|
2004-07-07 Stephen Hemminger <shemminger@osdl.org>
|
||||||
|
|
||||||
* Fix if_ether.h to fix arpd build
|
* Fix if_ether.h to fix arpd build
|
||||||
|
|
|
||||||
|
|
@ -14,13 +14,23 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n " netem scheduler... "
|
echo -n " netem scheduler... "
|
||||||
if grep -q 'tc_netem_qopt' $PKT_SCHED
|
cat >/tmp/netemtest.c <<EOF
|
||||||
then
|
#include <asm/types.h>
|
||||||
|
#include <linux/pkt_sched.h>
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
static struct tc_netem_qopt qopt;
|
||||||
|
exit(qopt.latency | qopt.limit | qopt.loss | qopt.gap | qopt.duplicate | qopt.jitter);
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
gcc -I$INCLUDE -c /tmp/netemtest.c >/dev/null 2>&1
|
||||||
|
if [ $? -eq 0 ]
|
||||||
|
then
|
||||||
echo "TC_CONFIG_NETEM:=y" >>Config
|
echo "TC_CONFIG_NETEM:=y" >>Config
|
||||||
echo y
|
echo y
|
||||||
else
|
else
|
||||||
echo n
|
echo n
|
||||||
fi
|
fi
|
||||||
|
rm -f /tmp/netemtest.c /tmp/netemtest.o
|
||||||
|
|
||||||
echo -n " ATM... "
|
echo -n " ATM... "
|
||||||
cat >/tmp/atmtest.c <<EOF
|
cat >/tmp/atmtest.c <<EOF
|
||||||
|
|
@ -31,7 +41,7 @@ int main(int argc, char **argv) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
gcc -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1
|
gcc -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "TC_CONFIG_ATM:=y" >>Config
|
echo "TC_CONFIG_ATM:=y" >>Config
|
||||||
|
|
@ -39,6 +49,7 @@ then
|
||||||
else
|
else
|
||||||
echo n
|
echo n
|
||||||
fi
|
fi
|
||||||
|
rm -f /tmp/atmtest.c /tmp/atmtest
|
||||||
|
|
||||||
# See if we know about TCP Vegas
|
# See if we know about TCP Vegas
|
||||||
echo "SS"
|
echo "SS"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue