head	1.3;
access;
symbols
	RELENG_8_4:1.3.0.2
	RELENG_9_1_0_RELEASE:1.2.4.1.4.2
	RELENG_9_1:1.2.4.1.0.4
	RELENG_9_1_BP:1.2.4.1
	RELENG_8_3_0_RELEASE:1.2.2.3.6.1
	RELENG_8_3:1.2.2.3.0.6
	RELENG_8_3_BP:1.2.2.3
	RELENG_9_0_0_RELEASE:1.2.4.1.2.1
	RELENG_9_0:1.2.4.1.0.2
	RELENG_9_0_BP:1.2.4.1
	RELENG_9:1.2.0.4
	RELENG_9_BP:1.2
	RELENG_8_2_0_RELEASE:1.2.2.3.4.1
	RELENG_8_2:1.2.2.3.0.4
	RELENG_8_2_BP:1.2.2.3
	RELENG_8_1_0_RELEASE:1.2.2.3.2.1
	RELENG_8_1:1.2.2.3.0.2
	RELENG_8_1_BP:1.2.2.3
	RELENG_8:1.2.0.2;
locks; strict;
comment	@# @;


1.3
date	2012.09.14.11.51.49;	author glebius;	state dead;
branches
	1.3.2.1;
next	1.2;

1.2
date	2010.03.21.16.30.32;	author luigi;	state Exp;
branches
	1.2.2.1
	1.2.4.1;
next	1.1;

1.1
date	2010.03.02.17.40.48;	author luigi;	state Exp;
branches;
next	;

1.3.2.1
date	2012.09.14.11.51.49;	author svnexp;	state dead;
branches;
next	1.3.2.2;

1.3.2.2
date	2013.03.28.13.05.31;	author svnexp;	state Exp;
branches;
next	;

1.2.2.1
date	2010.03.23.09.58.59;	author luigi;	state dead;
branches;
next	1.2.2.2;

1.2.2.2
date	2010.03.23.09.58.59;	author luigi;	state Exp;
branches;
next	1.2.2.3;

1.2.2.3
date	2010.04.07.13.18.58;	author luigi;	state Exp;
branches
	1.2.2.3.2.1
	1.2.2.3.4.1
	1.2.2.3.6.1;
next	1.2.2.4;

1.2.2.4
date	2012.11.17.10.37.02;	author svnexp;	state Exp;
branches;
next	;

1.2.2.3.2.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.2.2.3.4.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.2.2.3.6.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.2.2.3.6.2;

1.2.2.3.6.2
date	2012.11.17.08.25.37;	author svnexp;	state Exp;
branches;
next	;

1.2.4.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.2.4.1.2.1
	1.2.4.1.4.1;
next	1.2.4.2;

1.2.4.2
date	2012.11.17.11.37.21;	author svnexp;	state Exp;
branches;
next	1.2.4.3;

1.2.4.3
date	2012.11.22.12.16.38;	author svnexp;	state dead;
branches;
next	;

1.2.4.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.2.4.1.2.2;

1.2.4.1.2.2
date	2012.11.17.08.37.18;	author svnexp;	state Exp;
branches;
next	;

1.2.4.1.4.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.2.4.1.4.2;

1.2.4.1.4.2
date	2012.11.17.08.48.09;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.3
log
@SVN rev 240494 on 2012-09-14 11:51:49Z by glebius

o Create directory sys/netpfil, where all packet filters should
  reside, and move there ipfw(4) and pf(4).

o Move most modified parts of pf out of contrib.

Actual movements:

sys/contrib/pf/net/*.c		-> sys/netpfil/pf/
sys/contrib/pf/net/*.h		-> sys/net/
contrib/pf/pfctl/*.c		-> sbin/pfctl
contrib/pf/pfctl/*.h		-> sbin/pfctl
contrib/pf/pfctl/pfctl.8	-> sbin/pfctl
contrib/pf/pfctl/*.4		-> share/man/man4
contrib/pf/pfctl/*.5		-> share/man/man5

sys/netinet/ipfw		-> sys/netpfil/ipfw

The arguable movement is pf/net/*.h -> sys/net. There are
future plans to refactor pf includes, so I decided not to
break things twice.

Not modified bits of pf left in contrib: authpf, ftp-proxy,
tftp-proxy, pflogd.

The ipfw(4) movement is planned to be merged to stable/9,
to make head and stable match.

Discussed with:		bz, luigi
@
text
@#
# $FreeBSD: src/sys/netinet/ipfw/test/Makefile,v 1.2 2010/03/21 16:30:32 luigi Exp $
#
# Makefile for building userland tests
# this is written in a form compatible with gmake

SCHED_SRCS = test_dn_sched.c
SCHED_SRCS += dn_sched_fifo.c
SCHED_SRCS += dn_sched_prio.c
SCHED_SRCS += dn_sched_qfq.c
SCHED_SRCS += dn_sched_rr.c
SCHED_SRCS += dn_sched_wf2q.c
SCHED_SRCS += dn_heap.c
SCHED_SRCS += main.c

SCHED_OBJS=$(SCHED_SRCS:.c=.o)

HEAP_SRCS = dn_heap.c test_dn_heap.c
HEAP_OBJS=$(HEAP_SRCS:.c=.o)

VPATH=	.:..

CFLAGS = -I.. -I. -Wall -Werror -O3 -DIPFW
TARGETS= test_sched # no test_heap by default

all:	$(TARGETS)

test_heap : $(HEAP_OBJS)
	$(CC) -o $@@ $(HEAP_OBJS)

test_sched : $(SCHED_OBJS)
	$(CC) -o $@@ $(SCHED_OBJS)

$(SCHED_OBJS): dn_test.h
main.o: mylist.h

clean:
	- rm *.o $(TARGETS) *.core

ALLSRCS = $(SCHED_SRCS) dn_test.h mylist.h \
	dn_sched.h dn_heap.h ip_dn_private.h Makefile
TMPBASE = /tmp/testXYZ
TMPDIR = $(TMPBASE)/test

tgz:
	-rm -rf $(TMPDIR)
	mkdir -p $(TMPDIR)
	-cp -p $(ALLSRCS) $(TMPDIR)
	-(cd ..; cp -p $(ALLSRCS) $(TMPDIR))
	ls -la  $(TMPDIR)
	(cd $(TMPBASE); tar cvzf /tmp/test.tgz test)
@


1.3.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:05:31 +0000
@
text
@d1 51
@


1.3.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 51
#
# $FreeBSD: releng/8.4/sys/netinet/ipfw/test/Makefile 206342 2010-04-07 13:18:58Z luigi $
#
# Makefile for building userland tests
# this is written in a form compatible with gmake

SCHED_SRCS = test_dn_sched.c
SCHED_SRCS += dn_sched_fifo.c
SCHED_SRCS += dn_sched_prio.c
SCHED_SRCS += dn_sched_qfq.c
SCHED_SRCS += dn_sched_rr.c
SCHED_SRCS += dn_sched_wf2q.c
SCHED_SRCS += dn_heap.c
SCHED_SRCS += main.c

SCHED_OBJS=$(SCHED_SRCS:.c=.o)

HEAP_SRCS = dn_heap.c test_dn_heap.c
HEAP_OBJS=$(HEAP_SRCS:.c=.o)

VPATH=	.:..

CFLAGS = -I.. -I. -Wall -Werror -O3 -DIPFW
TARGETS= test_sched # no test_heap by default

all:	$(TARGETS)

test_heap : $(HEAP_OBJS)
	$(CC) -o $@@ $(HEAP_OBJS)

test_sched : $(SCHED_OBJS)
	$(CC) -o $@@ $(SCHED_OBJS)

$(SCHED_OBJS): dn_test.h
main.o: mylist.h

clean:
	- rm *.o $(TARGETS) *.core

ALLSRCS = $(SCHED_SRCS) dn_test.h mylist.h \
	dn_sched.h dn_heap.h ip_dn_private.h Makefile
TMPBASE = /tmp/testXYZ
TMPDIR = $(TMPBASE)/test

tgz:
	-rm -rf $(TMPDIR)
	mkdir -p $(TMPDIR)
	-cp -p $(ALLSRCS) $(TMPDIR)
	-(cd ..; cp -p $(ALLSRCS) $(TMPDIR))
	ls -la  $(TMPDIR)
	(cd $(TMPBASE); tar cvzf /tmp/test.tgz test)
@


1.2
log
@SVN rev 205417 on 2010-03-21 16:30:32Z by luigi

Add a priority-based packet scheduler.

Sponsored by:	The ONELAB2 Project
Submitted by:	Riccardo Panicucci
@
text
@d2 1
a2 1
# $FreeBSD$
@


1.2.4.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.2.4.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d2 1
a2 1
# $FreeBSD: stable/9/sys/netinet/ipfw/test/Makefile 205417 2010-03-21 16:30:32Z luigi $
@


1.2.4.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 243401
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r243401 | glebius | 2012-11-22 12:11:32 +0000 (Thu, 22 Nov 2012) | 3 lines
## SVN ##
## SVN ##   Partially merge r240494, which moved netinet/ipfw to netpfil/ipfw,
## SVN ## to make it easier to merge ipfw commits back to stable/9.
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@@


1.2.4.1.4.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.2.4.1.4.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: releng/9.1/sys/netinet/ipfw/test/Makefile 205417 2010-03-21 16:30:32Z luigi $
@


1.2.4.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.2.4.1.2.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: releng/9.0/sys/netinet/ipfw/test/Makefile 205417 2010-03-21 16:30:32Z luigi $
@


1.2.2.1
log
@file Makefile was added on branch RELENG_8 on 2010-03-23 10:04:51 +0000
@
text
@d1 51
@


1.2.2.2
log
@SVN rev 205511 on 2010-03-23 09:58:59Z by luigi

MFC of a large number of ipfw and dummynet fixes and enhancements
done in CURRENT over the last 4 months.
HEAD and RELENG_8 are almost in sync now for ipfw, dummynet
the pfil hooks and related components.

Among the most noticeable changes:
- r200855 more efficient lookup of skipto rules, and remove O(N)
  blocks from critical sections in the kernel;
- r204591 large restructuring of the dummynet module, with support
  for multiple scheduling algorithms (4 available so far)
See the original commit logs for details.

Changes in the kernel/userland ABI should be harmless because the
kernel is able to understand previous requests from RELENG_8 and
RELENG_7. For this reason, this changeset would be applicable
to RELENG_7 as well, but i am not sure if it is worthwhile.
@
text
@a0 50
#
# $FreeBSD$
#
# Makefile for building userland tests
# this is written in a form compatible with gmake

SCHED_SRCS = test_dn_sched.c
SCHED_SRCS += dn_sched_fifo.c
SCHED_SRCS += dn_sched_wf2q.c
SCHED_SRCS += dn_sched_qfq.c
SCHED_SRCS += dn_sched_rr.c
SCHED_SRCS += dn_heap.c
SCHED_SRCS += main.c

SCHED_OBJS=$(SCHED_SRCS:.c=.o)

HEAP_SRCS = dn_heap.c test_dn_heap.c
HEAP_OBJS=$(HEAP_SRCS:.c=.o)

VPATH=	.:..

CFLAGS = -I.. -I. -Wall -Werror -O3 -DIPFW
TARGETS= test_sched # no test_heap by default

all:	$(TARGETS)

test_heap : $(HEAP_OBJS)
	$(CC) -o $@@ $(HEAP_OBJS)

test_sched : $(SCHED_OBJS)
	$(CC) -o $@@ $(SCHED_OBJS)

$(SCHED_OBJS): dn_test.h
main.o: mylist.h

clean:
	- rm *.o $(TARGETS) *.core

ALLSRCS = $(SCHED_SRCS) dn_test.h mylist.h \
	dn_sched.h dn_heap.h ip_dn_private.h Makefile
TMPBASE = /tmp/testXYZ
TMPDIR = $(TMPBASE)/test

tgz:
	-rm -rf $(TMPDIR)
	mkdir -p $(TMPDIR)
	-cp -p $(ALLSRCS) $(TMPDIR)
	-(cd ..; cp -p $(ALLSRCS) $(TMPDIR))
	ls -la  $(TMPDIR)
	(cd $(TMPBASE); tar cvzf /tmp/test.tgz test)
@


1.2.2.3
log
@SVN rev 206342 on 2010-04-07 13:18:58Z by luigi

add priority scheduler.
@
text
@d9 1
a9 1
SCHED_SRCS += dn_sched_prio.c
a11 1
SCHED_SRCS += dn_sched_wf2q.c
@


1.2.2.4
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d2 1
a2 1
# $FreeBSD: stable/8/sys/netinet/ipfw/test/Makefile 206342 2010-04-07 13:18:58Z luigi $
@


1.2.2.3.6.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.2.2.3.6.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: releng/8.3/sys/netinet/ipfw/test/Makefile 206342 2010-04-07 13:18:58Z luigi $
@


1.2.2.3.4.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.2.2.3.2.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.1
log
@SVN rev 204591 on 2010-03-02 17:40:48Z by luigi

Bring in the most recent version of ipfw and dummynet, developed
and tested over the past two months in the ipfw3-head branch.  This
also happens to be the same code available in the Linux and Windows
ports of ipfw and dummynet.

The major enhancement is a completely restructured version of
dummynet, with support for different packet scheduling algorithms
(loadable at runtime), faster queue/pipe lookup, and a much cleaner
internal architecture and kernel/userland ABI which simplifies
future extensions.

In addition to the existing schedulers (FIFO and WF2Q+), we include
a Deficit Round Robin (DRR or RR for brevity) scheduler, and a new,
very fast version of WF2Q+ called QFQ.

Some test code is also present (in sys/netinet/ipfw/test) that
lets you build and test schedulers in userland.

Also, we have added a compatibility layer that understands requests
from the RELENG_7 and RELENG_8 versions of the /sbin/ipfw binaries,
and replies correctly (at least, it does its best; sometimes you
just cannot tell who sent the request and how to answer).
The compatibility layer should make it possible to MFC this code in a
relatively short time.

Some minor glitches (e.g. handling of ipfw set enable/disable,
and a workaround for a bug in RELENG_7's /sbin/ipfw) will be
fixed with separate commits.

CREDITS:
This work has been partly supported by the ONELAB2 project, and
mostly developed by Riccardo Panicucci and myself.
The code for the qfq scheduler is mostly from Fabio Checconi,
and Marta Carbone and Francesco Magno have helped with testing,
debugging and some bug fixes.
@
text
@d9 1
a9 1
SCHED_SRCS += dn_sched_wf2q.c
d12 1
@

