Merge couple more fixes from OpenBSD to bulk processing:
revision 1.118 date: 2009/03/23 06:19:59; author: dlg; state: Exp; lines: +8 -6 wait an appropriate amount of time before giving up on a bulk update, rather than giving up after a hardcoded 5 seconds (which is generally much too short an interval for a bulk update). pointed out by david@, eyeballed by mcbride@ revision 1.171 date: 2011/10/31 22:02:52; author: mikeb; state: Exp; lines: +2 -1 Don't forget to cancel bulk update failure timeout when destroying an interface. Problem report and fix from Erik Lax, thanks! Start a brief note of revisions merged from OpenBSD.
This commit is contained in:
parent
c5360c2998
commit
e3b670692a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=228814
@ -42,6 +42,11 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Revisions picked from OpenBSD after revision 1.110 import:
|
||||
* 1.118, 1.124, 1.148, 1.149, 1.151, 1.171 - fixes to bulk updates
|
||||
*/
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include "opt_inet.h"
|
||||
#include "opt_inet6.h"
|
||||
@ -536,6 +541,7 @@ pfsync_clone_destroy(struct ifnet *ifp)
|
||||
EVENTHANDLER_DEREGISTER(ifnet_departure_event, sc->sc_detachtag);
|
||||
PF_LOCK();
|
||||
#endif
|
||||
timeout_del(&sc->sc_bulkfail_tmo);
|
||||
timeout_del(&sc->sc_bulk_tmo);
|
||||
timeout_del(&sc->sc_tmo);
|
||||
#ifdef __FreeBSD__
|
||||
@ -1604,14 +1610,16 @@ pfsync_in_bus(struct pfsync_pkt *pkt, struct mbuf *m, int offset, int count)
|
||||
switch (bus->status) {
|
||||
case PFSYNC_BUS_START:
|
||||
#ifdef __FreeBSD__
|
||||
callout_reset(&sc->sc_bulkfail_tmo, 5 * hz, pfsync_bulk_fail,
|
||||
V_pfsyncif);
|
||||
#else
|
||||
timeout_add_sec(&sc->sc_bulkfail_tmo, 5); /* XXX magic */
|
||||
#endif
|
||||
#ifdef XXX
|
||||
callout_reset(&sc->sc_bulkfail_tmo, 4 * hz +
|
||||
pf_pool_limits[PF_LIMIT_STATES].limit /
|
||||
(PFSYNC_BULKPACKETS * sc->sc_maxcount));
|
||||
((sc->sc_sync_if->if_mtu - PFSYNC_MINPKT) /
|
||||
sizeof(struct pfsync_state)),
|
||||
pfsync_bulk_fail, V_pfsyncif);
|
||||
#else
|
||||
timeout_add(&sc->sc_bulkfail_tmo, 4 * hz +
|
||||
pf_pool_limits[PF_LIMIT_STATES].limit /
|
||||
((sc->sc_if.if_mtu - PFSYNC_MINPKT) /
|
||||
sizeof(struct pfsync_state)));
|
||||
#endif
|
||||
#ifdef __FreeBSD__
|
||||
if (V_pf_status.debug >= PF_DEBUG_MISC)
|
||||
|
Loading…
Reference in New Issue
Block a user