[pf4freebsd] Re: patches for ALTQ on 5.1R
Pyun YongHyeon
yongari at kt-is.co.kr
Wed Sep 15 20:42:14 PDT 2004
On Tue, Jul 29, 2003 at 11:12:46AM +0900, To pf4freebsd at freelists.org wrote:
>
> Hello All,
>
> There is a patch for Dennis Berger's ALTQ.
> This patch was posted to Dennis and he published the patch
> on this URL. His next release will include this patch.
>
> http://www.nipsi.de/FreeBSD/altqfixes.0.1
>
> Above patch solves Dennis' IF_POLL macro problem. It also
> touches wi(4) driver and provide a new ALTQ driver tun(4).
> Beware! Both wi(4) and tun(4) driver was not tested at all.
> So you may get panics!(I just have fxp(4))
> I hope the tun(4) driver can be used to experiment
> "prioritizing empty TCP acks".
>
Hello All,
I got several random lockups when I enable ALTQ.
If I ping to the victim system during boot, the system is paniced.
I think this problem comes from ALTQ fxp(4) driver.
Based on http://people.freebsd.org/~hmp/patches/if_fxp-alt.diff
I made a patch for ALTQ fxp driver.
This patch was generated after applying Dennis's ALTQ patch.
I can't sure this patch solves all fxp(4) problems but it works
for me at least up to now.
--- ./sys.altq/dev/fxp/if_fxpvar.h.ORG Tue Jul 29 22:25:51 2003
+++ ./sys.altq/dev/fxp/if_fxpvar.h Tue Jul 29 22:13:34 2003
@@ -111,8 +111,14 @@
#define mtx_destroy(a)
struct mtx { int dummy; };
#else
-#define FXP_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx)
-#define FXP_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx)
+#define FXP_LOCK(_sc) do { \
+ if (!mtx_owned(&(_sc)->sc_mtx)) \
+ mtx_lock(&(_sc)->sc_mtx); \
+} while(0)
+#define FXP_UNLOCK(_sc) do { \
+ if (mtx_owned(&(_sc)->sc_mtx)); \
+ mtx_unlock(&(_sc)->sc_mtx); \
+} while(0)
#endif
/*
Thanks.
Regards,
--
Pyun YongHyeon <http://www.kr.freebsd.org/~yongari>
More information about the freebsd-pf
mailing list