Re: The tale of a TCP bug

2011-04-02 Thread Stefan `Sec` Zehl
Hi I'm back :)

On Fri, Apr 01, 2011 at 01:40 +0200, Stefan `Sec` Zehl wrote:
> I'll of course monitor this value and report back if I ever see it
> increase :-)

It did:

| ice:~>uptime
|  1:45PM  up 2 days, 17:01, 0 users, load averages: 1.29, 0.98, 0.60
| ice:~>sysctl net.inet.tcp.adv_neg
| net.inet.tcp.adv_neg: 120
| ice:~>

I currently have no idea why. But I think it would be a good idea to fix
that adv calculation on 64bit for the negative case anyway.

As my original attempt with a (long) cast was frowned upon, maybe
something like what OpenBSD did in r1.15 / 1998?

http://www.openbsd.org/cgi-bin/cvsweb/src/sys/netinet/tcp_output.c.diff?r1=1.14;r2=1.15

--- tcp_output.c.pre2011-04-02 13:50:32.0 +0200
+++ tcp_output.c2011-04-02 13:50:35.0 +0200
@@ -575,7 +575,7 @@
 * taking into account that we are limited by
 * TCP_MAXWIN << tp->rcv_scale.
 */
-   long adv = min(recwin, (long)TCP_MAXWIN << tp->rcv_scale) -
+   long adv = lmin(recwin, (long)TCP_MAXWIN << tp->rcv_scale) -
(tp->rcv_adv - tp->rcv_nxt);
 
if(min(recwin, (long)TCP_MAXWIN << tp->rcv_scale) <


If anyone has an idea what could trigger these cases, I'd be happy to
help debug. But without a clear testcase, it's a bit difficult.

CU,
Sec
-- 
"few languages are as bad as PHP for doing serious development work"
-- Experiences of Using PHP in Large Websites
   http://www.ukuug.org/events/linux2002/papers/html/php/>
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: net80211 and interface requests

2011-04-02 Thread Adam Stylinski
On Thu, Mar 31, 2011 at 05:35:40PM +0200, Bernhard Schmidt wrote:
> On Thursday, March 31, 2011 17:14:21 Adam Stylinski wrote:
> > On Thu, Mar 31, 2011 at 03:07:15PM +0200, Bernhard Schmidt wrote:
> > > On Thursday, March 31, 2011 14:20:33 Adam Stylinski wrote:
> > > > On Thu, Mar 31, 2011 at 09:02:45AM +0200, Bernhard Schmidt wrote:
> > > > > On Wednesday, March 30, 2011 23:17:53 Adam Stylinski wrote:
> > > > > > Hello,
> > > > > > 
> > > > > > This list has helped me before so I'll email again with the hopes 
> > > > > > that
> > > > > > somebody has an answer.  All is working well with my project, 
> > > > > > however for
> > > > > > the life of me I cannot get the interface to inject the raw frames 
> > > > > > faster
> > > > > > than 11mbps.  I'm following the example given in
> > > > > > /usr/src/tools/tools/net80211/wlaninject.c, and manually specifying
> > > > > > parameters such as ucastrate, mcastrate, and mgmtrate within 
> > > > > > ifconfig.  I'm
> > > > > > putting the card into pureg mode, and yet I still can't inject any 
> > > > > > faster.
> > > > > >  I've even gone so far as to specify an ieee802211_txparam struct 
> > > > > > giving
> > > > > > values of 255 both mcast and ucast rates within the struct (and of 
> > > > > > course
> > > > > > anding them by 0xff).  I then used the ioctl call to set the flags 
> > > > > > within
> > > > > > the interface request.  Any help would be greatly appreciated.
> > > > > 
> > > > > You've set the ibp_rate0 parameter right? This one is in half-mbps, so
> > > > > a value of 108 should give you 54m. The only thing I can think of 
> > > > > right
> > > > > now is that the device (or channel) is actually configured for 11b not
> > > > > 11g mode. Can we rule that out? Which device are you using?
> > > > > 
> > > > > > I am doing nanosleeps in between transmissions as if I don't the 
> > > > > > bpf clone
> > > > > > can't inject due to the buffer being too full.  There's probably a 
> > > > > > better
> > > > > > way of doing this, but I doubt the nanosleeps are the issue 
> > > > > > (afterall, I get
> > > > > > almost exactly 11mbps).  I should probably note I'm not doing any 
> > > > > > ACKs, this
> > > > > > is pure transmits.
> > > > > > 
> > > > > > If anybody cares enough to look at my unpolished code to get a 
> > > > > > better idea,
> > > > > > look here:
> > > > > > 
> > > > > > http://projhinternet.svn.sourceforge.net/
> > > > > > 
> > > > > > The idea is to allow unidirectional traffic so that with an FCC 
> > > > > > amateur
> > > > > > license (yes I know I'm not currently broadcasting the call sign as 
> > > > > > of yet)
> > > > > > you can broadcast unencrypted transmissions for miles (with a linear
> > > > > > amplifier spec'd to 2.4ghz).  With the license FCC part15 no longer 
> > > > > > applies
> > > > > > and you can operate just like in any other amateur band.
> > > > > > ___
> > > > > > freebsd-net@freebsd.org mailing list
> > > > > > http://lists.freebsd.org/mailman/listinfo/freebsd-net
> > > > > > To unsubscribe, send any mail to 
> > > > > > "freebsd-net-unsubscr...@freebsd.org"
> > > > > > 
> > > > > 
> > > > 
> > > > I'm using an atheros AR2413 chipset, running in pure g mode, with also 
> > > > the card put into "mode 11g" and ucast, mcast, and mgmt rates set to 
> > > > 54.  I think the parameter for ibp_rate0 is just for setting it in the 
> > > > header (but I could be wrong).  Regardless I am doing this, let me give 
> > > > you the exact source files I'm doing this in.
> > > 
> > > Well, the ath_rate_* modules afaik do not honor the fixed rate
> > > settings. At least I've heard something about those being broken. The
> > > ibp_rate0 parameter set to 108 seems to be correct though.
> > > 
> > > No clue why that doesn't work, you may have to debug ath_tx_findrix().
> > > Adding a printf of the passed over rate and ridx should shed some light
> > > on this I guess.
> > > 
> > > > Line 38 in this file:
> > > > http://projhinternet.svn.sourceforge.net/viewvc/projhinternet/src/callbacks.c?revision=69&view=markup
> > > >  
> > > > 
> > > > And the setup_if function in this:
> > > > http://projhinternet.svn.sourceforge.net/viewvc/projhinternet/src/libinject.c?revision=69&view=markup
> > > > 
> > > 
> > 
> > It turns out strange coincidences can happen.  I decided to busy loop, 
> > thinking maybe it was my nanosleep call.  And what do you know, 52Mb/sec.  
> > Is there some sort of call I can use to probe the fd to see if the buffer 
> > has been sent yet?  
> 
> Honestly, no clue. The bpf transmit path is a bunch of ugly hacks..
> What you can try though is to enable various debug options for
> net80211 and ath to figure out what's going on, especially the bits
> for xmit.
> 
> On a unrelated side note, how is the ath/wlan0 interface configured?
> I mean, is it in sta mode or ahdemo? I guess most tests have been done
> in ahdemo mode. Also I'm sure that all frames are simply di

Re: nfs error: No route to host when starting apache ...

2011-04-02 Thread Marc G. Fournier

On Fri, 1 Apr 2011, Rick Macklem wrote:


Since rpc.lockd and rpc.statd expect to be able to do IP broadcast
(same goes for rpcbind), I suspect that might be a problem w.r.t.
jails, although I know nothing about how jails work?


Oh, and you can use the "nolock" mount option to avoid use of
rpc.lockd and rpc.statd.


based on the mount_nfs man page, as well as trying it just in case, this 
option no longer appears to be availalble in the 7.x nfs code ... :(


___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


7-STABLE NFS: fatal: "select lock: Permission denied"

2011-04-02 Thread Marc G. Fournier


I'm trying to simulate a diskless boot of FreeBSD, as am looking at moving 
to a more 'thin client' environment, using a Netapp as a filer to provide 
the file systems for FreeBSD front ends ...


To simulate this, I have two servers, both running 7-STABLE, one acting as 
the nfs server (ie. simulated netapp), and the other the client ...


Both servers have a private and a public IP ... the nfs traffic is over 
the private network ...


Initially, had issues with lockd that I got resolved ...

Settings in /etc/rc.conf on server are:

rpcbind_enable="YES"
rpcbind_flags="-h 192.168.1.9"
nfs_server_enable="YES"
mountd_enable="YES"
mountd_flags="-r -h 192.168.1.9"
nfs_server_flags="-u -n 8 -h 192.168.1.9"
rpc_statd_enable="YES"
rpc_lockd_enable="YES"

Settings in /etc/rc.conf on the client are:

rpcbind_enable="YES"
rpcbind_flags="-h 192.168.1.1"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"

===

/etc/fstab on the client has:

192.168.1.9:/vm /vm nfs rw,noauto,intr 0 0

/etc/exports on the server has:

/vm -network 192.168.1.0/24 -maproot=0 -alldirs

===

Now, to simulate the diskless, I built a jail on top of the mounted /vm 
... that worked fine ...


I have several applications built and installed on it ... primarily, 
apache 2.2 and postfix 2.7.x ...


Apache 2.2 + mod_fcgi + php 5.3.6 *appears* to work fine ...

Postfix, on the other hand, generates the error message in the subject 
line when I try and run 'mailq':


postfix/showq[19805]: fatal: select lock: Permission denied

Since the handbook as a section on diskless boot in Chapter 31:

   http://www.freebsd.org/doc/handbook/network-diskless.html

I assumed / hoped that things would run just fine ... am I wrong in that 
assumption?  Or have I just overlooked a key setting in getting the nfs to 
work?


Any suggestions / pointers are most welcome ...


Marc G. FournierHub.Org Hosting Solutions S.A.
scra...@hub.org http://www.hub.org

Yahoo:yscrappySkype: hub.orgICQ:7615664MSN:scra...@hub.org
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"