summaryrefslogtreecommitdiffstats
path: root/sys/net/if_bridge.c
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2010-03-02 17:40:48 +0000
committerluigi <luigi@FreeBSD.org>2010-03-02 17:40:48 +0000
commit5ceeac4aa882074e2b1e42fbc20c79ebbd24f4c5 (patch)
tree225c58cb171a7858ca9880ee492dd9f3d281f623 /sys/net/if_bridge.c
parenta8f766213ad48d0cb09214bdf6ac6a3b74221b03 (diff)
downloadFreeBSD-src-5ceeac4aa882074e2b1e42fbc20c79ebbd24f4c5.zip
FreeBSD-src-5ceeac4aa882074e2b1e42fbc20c79ebbd24f4c5.tar.gz
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.
Diffstat (limited to 'sys/net/if_bridge.c')
-rw-r--r--sys/net/if_bridge.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index d985e98..5f33dd5 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -135,7 +135,6 @@ __FBSDID("$FreeBSD$");
#include <net/route.h>
#include <netinet/ip_fw.h>
#include <netinet/ipfw/ip_fw_private.h>
-#include <netinet/ip_dummynet.h>
/*
* Size of the route hash table. Must be a power of two.
@@ -3073,15 +3072,15 @@ bridge_pfil(struct mbuf **mp, struct ifnet *bifp, struct ifnet *ifp, int dir)
if (mtag == NULL) {
args.rule.slot = 0;
} else {
- struct dn_pkt_tag *dn_tag;
+ struct ipfw_rule_ref *r;
/* XXX can we free the tag after use ? */
mtag->m_tag_id = PACKET_TAG_NONE;
- dn_tag = (struct dn_pkt_tag *)(mtag + 1);
+ r = (struct ipfw_rule_ref *)(mtag + 1);
/* packet already partially processed ? */
- if (dn_tag->rule.slot != 0 && V_fw_one_pass)
+ if (r->info & IPFW_ONEPASS)
goto ipfwpass;
- args.rule = dn_tag->rule;
+ args.rule = *r;
}
args.m = *mp;
OpenPOWER on IntegriCloud