- added /sbin/cbq script and sample configuration files (#166301)
This commit is contained in:
parent
2376d1b3c9
commit
7320a47a27
40
cbq-0.7.1-avpkt-enhancement.patch
Normal file
40
cbq-0.7.1-avpkt-enhancement.patch
Normal file
@ -0,0 +1,40 @@
|
||||
--- cbq.init-v0.7.3.orig Thu Oct 3 23:11:48 2002
|
||||
+++ cbq.init-v0.7.3 Thu Oct 3 23:19:41 2002
|
||||
@@ -475,6 +475,10 @@
|
||||
CBQ_WORDS="DEVICE|RATE|WEIGHT|PRIO|PARENT|LEAF|BOUNDED|ISOLATED"
|
||||
CBQ_WORDS="$CBQ_WORDS|BUFFER|LIMIT|PEAK|MTU|QUANTUM|PERTURB"
|
||||
|
||||
+### Source AVPKT if it exists
|
||||
+[ -r /etc/sysconfig/cbq/avpkt ] && . /etc/sysconfig/cbq/avpkt
|
||||
+AVPKT=${AVPKT:-3000}
|
||||
+
|
||||
|
||||
#############################################################################
|
||||
############################# SUPPORT FUNCTIONS #############################
|
||||
@@ -705,7 +709,7 @@
|
||||
|
||||
### Setup root qdisc + class for device
|
||||
tc qdisc add dev $dev root handle 1 cbq \
|
||||
- bandwidth $DEVBWDT avpkt 1000 cell 8
|
||||
+ bandwidth $DEVBWDT avpkt $AVPKT cell 8
|
||||
|
||||
### Set weight of the root class if set
|
||||
[ -n "$DEVWGHT" ] &&
|
||||
@@ -722,7 +726,7 @@
|
||||
### Create the class
|
||||
tc class add dev $DEVICE parent 1:$PARENT classid 1:$CLASS cbq \
|
||||
bandwidth $BANDWIDTH rate $RATE weight $WEIGHT prio $PRIO \
|
||||
- allot 1514 cell 8 maxburst 20 avpkt 1000 $BOUNDED $ISOLATED ||
|
||||
+ allot 1514 cell 8 maxburst 20 avpkt $AVPKT $BOUNDED $ISOLATED ||
|
||||
cbq_fail_off "failed to add class $CLASS with parent $PARENT on $DEVICE!"
|
||||
|
||||
### Create leaf qdisc if set
|
||||
@@ -895,7 +899,7 @@
|
||||
### Replace CBQ class
|
||||
tc class replace dev $DEVICE classid 1:$CLASS cbq \
|
||||
bandwidth $BANDWIDTH rate $NEW_RATE weight $NEW_WGHT prio $PRIO \
|
||||
- allot 1514 cell 8 maxburst 20 avpkt 1000 $BOUNDED $ISOLATED
|
||||
+ allot 1514 cell 8 maxburst 20 avpkt $AVPKT $BOUNDED $ISOLATED
|
||||
|
||||
### Replace leaf qdisc (if any)
|
||||
if [ "$LEAF" = "tbf" ]; then
|
36
iproute.spec
36
iproute.spec
@ -1,9 +1,10 @@
|
||||
%define date_version 050816
|
||||
%define cbq_version v0.7.3
|
||||
|
||||
Summary: Advanced IP routing and network device configuration tools.
|
||||
Name: iproute
|
||||
Version: 2.6.13
|
||||
Release: 2
|
||||
Release: 3
|
||||
Group: Applications/System
|
||||
Source: http://developer.osdl.org/dev/iproute2/download/iproute2-%{date_version}.tar.gz
|
||||
URL: http://developer.osdl.org/dev/iproute2/
|
||||
@ -18,9 +19,13 @@ Source8: tc-prio.8
|
||||
Source9: tc-red.8
|
||||
Source10: tc-sfq.8
|
||||
Source11: tc-tbf.8
|
||||
Source12: http://easynews.dl.sourceforge.net/sourceforge/cbqinit/cbq.init-%{cbq_version}
|
||||
Source13: README.cbq
|
||||
|
||||
Patch1: iproute2-2.4.7-rt_config.patch
|
||||
Patch2: iproute2-2.6.9-kernel.patch
|
||||
#Patch4: iproute2-2.4.7-initvar.patch
|
||||
Patch3: cbq-0.7.1-avpkt-enhancement.patch
|
||||
|
||||
License: GNU GPL
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
BuildPrereq: tetex-latex tetex-dvips psutils linuxdoc-tools db4-devel bison
|
||||
@ -32,9 +37,10 @@ capabilities of the Linux 2.4.x and 2.6.x kernel.
|
||||
|
||||
%prep
|
||||
%setup -q -n iproute2-%{date_version}
|
||||
cp %{SOURCE12} $RPM_BUILD_DIR/iproute2-%{date_version}
|
||||
%patch1 -p1 -b .rt_config
|
||||
%patch2 -p1 -b .kernel
|
||||
#%patch4 -p1 -b .initvar
|
||||
%patch3 -p0 -b .avpkt-enhancment
|
||||
|
||||
%build
|
||||
make
|
||||
@ -65,10 +71,26 @@ install -m 644 %{SOURCE8} $RPM_BUILD_ROOT/%{_mandir}/man8
|
||||
install -m 644 %{SOURCE9} $RPM_BUILD_ROOT/%{_mandir}/man8
|
||||
install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/%{_mandir}/man8
|
||||
install -m 644 %{SOURCE11} $RPM_BUILD_ROOT/%{_mandir}/man8
|
||||
install -m 755 %{SOURCE12} $RPM_BUILD_ROOT/sbin/cbq
|
||||
install -d -m 755 $RPM_BUILD_ROOT/etc/sysconfig/cbq
|
||||
|
||||
cp -f etc/iproute2/* $RPM_BUILD_ROOT/etc/iproute2
|
||||
rm -rf $RPM_BUILD_ROOT/%{_libdir}/debug/*
|
||||
|
||||
#create example avpkt file
|
||||
cat <<EOF > $RPM_BUILD_ROOT/etc/sysconfig/cbq/cbq-0000.example
|
||||
DEVICE=eth0,10Mbit,1Mbit
|
||||
RATE=128Kbit
|
||||
WEIGHT=10Kbit
|
||||
PRIO=5
|
||||
RULE=192.168.1.0/24
|
||||
EOF
|
||||
|
||||
cat <<EOF > $RPM_BUILD_ROOT/etc/sysconfig/cbq/avpkt
|
||||
AVPKT=3000
|
||||
EOF
|
||||
|
||||
|
||||
%clean
|
||||
#rm -rf $RPM_BUILD_ROOT
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
@ -76,15 +98,21 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/debug/*
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%dir /etc/iproute2
|
||||
%doc README.decnet README.iproute2+tc RELNOTES
|
||||
%doc README.decnet README.iproute2+tc RELNOTES $RPM_SOURCE_DIR/README.cbq
|
||||
%doc doc/*.ps examples
|
||||
/sbin/*
|
||||
%{_mandir}/man8/*
|
||||
%attr(644,root,root) %config(noreplace) /etc/iproute2/*
|
||||
%{_sbindir}/*
|
||||
%{_libdir}/tc/*
|
||||
/sbin/cbq
|
||||
%dir /etc/sysconfig/cbq
|
||||
%config(noreplace) /etc/sysconfig/cbq/*
|
||||
|
||||
%changelog
|
||||
* Fri Aug 26 2005 Radek Vokal <rvokal@redhat.com> 2.6.13-3
|
||||
- added /sbin/cbq script and sample configuration files (#166301)
|
||||
|
||||
* Fri Aug 19 2005 Radek Vokal <rvokal@redhat.com> 2.6.13-2
|
||||
- upgrade to iproute2-050816
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user