rmacklem [Sat, 14 May 2011 02:28:21 +0000 (02:28 +0000)]
MFC: r221014,r221018
Modify the experimental NFS client so that it uses the same
"struct nfs_args" as the regular NFS client. This is needed
so that the old mount(2) syscall will work and it makes
sharing of the diskless NFS root code easier. Eary in the
porting exercise I introduced a new revision of nfs_args, but
didn't actually need it, thanks to nmount(2). I re-introduced the
NFSMNT_KERB flag, since it does essentially the same thing and
the old one would not have been used because it never worked.
I also added a few new NFSMNT_xxx flags to sys/nfsclient/nfs_args.h
that are used by the experimental NFS client.
Also fix the NFS client so that it doesn't bogusly set the
f_flags argument of "struct statfs",
mav [Sat, 14 May 2011 00:35:56 +0000 (00:35 +0000)]
MFC r220829:
According to specification. device should respond to COMRESET with COMINIT
in no more then 10ms. If we detected no device presence within that time,
there is no reason to wait longer.
- Setup the default filter mode to allow filtering/steering based on IP
protocol, ingress port, inner VLAN ID, IP frag, FCoE, and MPS match
type; all combined together. You can also filter based on MAC index,
Ethernet type, IP TOS/IPv6 Traffic Class, and outer VLAN ID but you'll
have to modify the default filter mode and exclude some of the
match-fields in it.
IPv4 and IPv6 SIP/DIP/SPORT/DPORT are always available in all filter
rules.
- Add driver ioctls to get/set the global filter mode.
- Add driver ioctls to program and delete hardware filters. A couple of
the "switch" actions that rewrite Ethernet and VLAN information and
switch the packet out of another port may not work as the L2 code is not
yet in place. Everything else, including all "drop" and "pass" rules
with RSS or absolute qid, should work.
r221477:
T4 packet timestamps.
Reference code that shows how to get a packet's timestamp out of
cxgbe(4). Disabled by default because we don't have a standard way
today to pass this information up the stack.
The timestamp is 60 bits wide and each increment represents 1 tick of
the T4's core clock. As an example, the timestamp granularity is ~4.4ns
for this card:
marius [Tue, 10 May 2011 18:43:18 +0000 (18:43 +0000)]
Supply the correct size of the softc. This is a direct commit to stable/8
as in head the problem is no longer present as of r221407 but that revision
can't be MFC'ed.
n_hibma [Sat, 7 May 2011 22:20:01 +0000 (22:20 +0000)]
MFC overview:
- Fix busg in events provided to devd from the USB stack.
- Provide more info on the u3g devices that attached.
- Make the ucom device numbering more sane.
MFC r214429
Add support for setting per-interface PnP information.
MFC r214761
- Simplify the way unit/subunit allocation is done in ucom.
- hw.usb.ucom.cons_unit is now split into
hw.usb.ucom.cons_unit/...cons_subunit.
Note: The tunable/sysctl hw.usb.ucom.cons_unit needs to be reviewed if
a) a console was defined a USB serial devices, and a USB device with
more than 1 subunit is present, and this device is attached before the
device functioning as a console
or
b) a console was defined on a USB device with more than 1 subunit
MFC r214809
Don't terminate the notification with \n. This is done in
usb_device.c:devctl_notify_f().
MFC r214830
Bugfix: Move the 'at <location string' to the beginning of the attach
notification. devd would stop evaluating at 'at' (not '<k>=<v>') and
hence prevent 'port=X' (and 'bus=<"on" string>) from making it into the
environment for the devd action.
MFC r214831
- Remove an unused entry from the softc (only used in a debugging printf).
- Fix the loop count on detach (causing a panic on detaching a serial
dongle).
- Increase a buffer in case some driver want extra long tty device names
(postfixing the purpose of the tty for example, e.g. u3g.ppp).
MFC r214843
Implement ucom_set_pnpinfo_usb() providing ttyname and port number
information through devd. My E220 now produces the notification (1 line):
kaiw [Sat, 7 May 2011 10:32:52 +0000 (10:32 +0000)]
MFC r216716:
* Add mention of the `-f`, `-q`, `-S`, and `-V` options in the synopsis
section.
* Document the `-l`, `-M` and `-S` options.
* Improve the text describing the behavior of the `-r` option.
* Start a section on standard compliance.
* Indicate in the synopsis that the `-S` and `-s` options are mutually
exclusive.
kaiw [Sat, 7 May 2011 10:31:34 +0000 (10:31 +0000)]
MFC r216014:
Add option -D for ranlib(1). When -D is speicified, ranlib(1) will generate
a deterministic archive symbol table (i.e. timestamp for the symbol table
member header is set to 0).
kaiw [Sat, 7 May 2011 10:27:23 +0000 (10:27 +0000)]
MFC r213643 (kientzle):
Add -D (deterministic) option to ar.
When set, it forces all timestamps and owners to zero and
modes to 0644. Useful for producing libraries that are
bitwise identical across multiple build runs.
kaiw [Sat, 7 May 2011 10:23:07 +0000 (10:23 +0000)]
MFC r208189:
Removed ar(1)'s support for compressed archives. This change removes
ar(1)'s dependencies on compressor libraries -lz, -lbz2 and -llzma and
fixes building HEAD on some versions of FreeBSD[78]. Option -j and -z
is now accepted but ignored.
Compressed ar(1) archives are not useful without a ld(1) that can read
them. Also, the current ar(1) compression scheme prevents random
access of archive members and needs to be redesigned anyway.
rmacklem [Sat, 7 May 2011 02:00:35 +0000 (02:00 +0000)]
MFC: r220967
Fix a LOR in vfs_busy() where, after msleeping, it would lock
the mutexes in the wrong order for the case where the
MBF_MNTLSTLOCK is set. I believe this did have the
potential for deadlock. For example, if multiple nfsd threads
called vfs_busyfs(), which calls vfs_busy() with MBF_MNTLSTLOCK.
Thanks go to pho for catching this during his testing.
fabient [Fri, 6 May 2011 14:05:32 +0000 (14:05 +0000)]
MFC r220198:
Clearing the flag when preempting will let the preempted thread run
too much time. This can finish in a scheduler deadlock with ping-pong
between two threads.
One sample of this is:
- device lapic (to have a preemption point on critical_exit())
- options DEVICE_POLLING with HZ>1499 (to have lapic freq = hardclock freq)
- running a cpu intensive task (that does not enter the kernel)
- only one CPU on SMP or no SMP.
As requested by jhb@ 4BSD have received the same type of fix instead of
propagating the flag to the new thread.
fabient [Fri, 6 May 2011 13:24:10 +0000 (13:24 +0000)]
MFC r220206:
Optimisation in IPSEC(4):
- Remove contention on ISR during the crypto operation by using rwlock(9).
- Remove a second lookup of the SA in the callback.
fabient [Fri, 6 May 2011 13:12:45 +0000 (13:12 +0000)]
MFC r220194:
Fix two SA refcount:
- AH does not release the SA like in ESP/IPCOMP when handling EAGAIN
- ipsec_process_done incorrectly release the SA.
jilles [Fri, 6 May 2011 12:49:32 +0000 (12:49 +0000)]
MFC r220903: sh: Do not word split "${#parameter}".
This is only a problem if IFS contains digits, which is unusual but valid.
Because of an incorrect fix for PR bin/12137, "${#parameter}" was treated
as ${#parameter}. The underlying problem was that "${#parameter}"
erroneously added CTLESC bytes before determining the length. This
was properly fixed for PR bin/56147 but the incorrect fix was not backed
out.
If the -p option is turned off, privileges from a setuid or setgid binary
are dropped. Make sure to check if this succeeds. If it fails, this is an
error which will cause the shell to abort except in interactive mode or if
'command' was used to make 'set' or an outer 'eval' or '.' non-special.
Note that taking advantage of this feature and writing setuid shell scripts
seems unwise.
trociny [Thu, 5 May 2011 18:50:52 +0000 (18:50 +0000)]
MFC r221074, r221075, r221076, r221078:
r221074:
Fix assert messages.
r221075:
For conversation between hastctl and hastd we should use HASTCTL_CMD
defines.
r221076:
Rename HASTCTL_ defines, which are used for conversation between main
hastd process and workers, remove unused one and set different range
of numbers. This is done in order not to confuse them with HASTCTL_CMD
defines, used for conversation between hastctl and hastd, and to avoid
bugs like the one fixed in r221075.
r221078:
Add missing ifdef. This fixes build with NO_OPENSSL.
rmacklem [Thu, 5 May 2011 14:19:37 +0000 (14:19 +0000)]
MFC: r220928
Remove the nm_mtx mutex locking from the test for
nm_maxfilesize. This value rarely, if ever, changes
and the nm_mtx mutex is locked/unlocked earlier in
the function, which should be sufficient to avoid
getting a stale cached value for it. There is a
discussion w.r.t. what these tests should be, but
I've left them basically the same as the regular
NFS client for now.
rmacklem [Wed, 4 May 2011 01:39:44 +0000 (01:39 +0000)]
MFC: r220877
Modify the offset + size checks for read and write in the
experimental NFS client to take care of overflows for the calls
above the buffer cache layer in a manner similar to r220876.
Thanks go to dillon at apollo.backplane.com for providing the
snippet of code that does this.
rmacklem [Wed, 4 May 2011 01:24:03 +0000 (01:24 +0000)]
MFC: r220876
Modify the offset + size checks for read and write in the
experimental NFS client to take care of overflows. Thanks
go to dillon at apollo.backplane.com for providing the
snippet of code that does this.
cperciva [Tue, 3 May 2011 16:36:39 +0000 (16:36 +0000)]
MFC r221049: Stop zeroing UFS1 superblocks if we fall off the end of the
disk, in order to avoid wasting time (potentially many hours) in the event
that we find a partially-overwritten UFS1 superblock.
MFC r206428 (by luigi):
This commit enables partial operation of dummynet with kernels
compiled with "options VIMAGE".
As it is now, there is still a single instance of the pipes,
and it is only usable from vnet0 (the main instance).
Trying to use a pipe from a different vimage does not crash
the system as it did before, but the traffic coming out from
the pipe goes to the wrong place, and i still need to
figure out where.
Support for per-vimage pipes is almost there (just a matter of
uncommenting the VNET_* definitions for dn_cfg, plus putting into
the structure the remaining static variables), however i need
first to figure out how init/uninit work, and also to understand
where packets are ending up on exit from a pipe.
In summary: vimage support for dummynet is not complete yet,
but we are getting there.
MFC r206461 (by bz):
Try to help with a virtualized dummynet after r206428.
This adds the explicit include (so far probably included through one of the
few "hidden" includes in other header files) for vnet.h and adds a cast
to unbreak LINT-VIMAGE.
MFC r218360 (by luigi):
correct the 'output_time' of packets generated by dummynet.
In the dec.2009 rewrite I introduced a bug, using for the
computation the arrival time instead of the time the packet
has exited from the queue.
The bandwidth computation was still correct because it is
computed elsewhere, but traffic was sent out in bursts.
The bug is also present in RELENG_8 after dec.2009
Thanks to Daikichi Osuga for investingating, finding and fixing the
bug with detailed graphs of the behaviour before and after the fix.
MFC r220831:
ipdn_bound_var() function is designed to bound a variable between
specified minimum and maximum. In case when specified default value
is out of bounds it does not work as expected and does not limit
variable. Check that default value is in range and limit it if needed.
Also bump max_hash_size value to 65536 to correspond with manual page.
rmacklem [Tue, 3 May 2011 01:19:39 +0000 (01:19 +0000)]
MFC: r220810
Fix up handling of the nfsmount structure in read and write
within the experimental NFS client. Mostly add mutex locking
and use the same rsize, wsize during the operation by keeping
a local copy of it. This is another change that brings it
closer to the regular NFS client.
yongari [Mon, 2 May 2011 22:49:43 +0000 (22:49 +0000)]
MFC r220368:
Add initial jumbo frame support for BCM5714/BCM5715 and BCM5780.
Unlike other controllers which have more advanced jumbo support,
these controllers have one send ring, one standard receive producer
ring and one receive return ring. In order to receive jumbo frames
on the controllers, driver now will increase Rx buffer size to 9k.
Two Rx modes are supported on these controllers and I chose
standard Rx BDs over extended Rx BDs. The extended Rx BD mode
allows up to 4 segmentations for each Rx BDs such that kernel does
not have to allocate large buffer of contiguous memory for
receiving. The extended Rx BD mode is already used on controllers
that have separate jumbo receive ring. However, using extended Rx
BDs on BCM5714/BCM5715/BCM5780 reduces the number of Rx BDs to 256
entries which in turn may reduce the performance. Also UMA backed
page allocator for jumbo frame returns contiguous memory so using
extended Rx BD has no advantage on FreeBSD unless highly customized
local allocator implemented in driver is used.
To use jumbo buffers in standard receive ring, Rx buffer allocation
handler was changed to allocate MJUM9BYTES sized mbuf.
- Assert that dm_lock is exclusively held in devfs_rules_apply() and
in devfs_vmkdir() while adding the entry to de_list of the parent.
- Apply devfs rules to newly created directories and symbolic links.
rmacklem [Mon, 2 May 2011 01:01:03 +0000 (01:01 +0000)]
MFC: r220764
Add a vput() to nfs_lookitup() in the experimental NFS client
for a case that will probably never happen. It can only
happen if a server were to successfully lookup a file, but not
return attributes for that file. Although technically allowed
by the NFSv3 RFC, I doubt any server would ever do this.
However, if it did, the client would have not vput()'d the
new vnode when it needed to do so.
rmacklem [Mon, 2 May 2011 00:49:47 +0000 (00:49 +0000)]
MFC: r220763
Add vput() calls in two places in the experimental NFS client
that would be needed if, in the future, nfscl_loadattrcache()
were to return an error. Currently nfscl_loadattrcache()
never returns an error, so these cases never currently happen.
rmacklem [Sun, 1 May 2011 03:16:13 +0000 (03:16 +0000)]
MFC: r220762
Change the mutex locking for several locations in the
experimental NFS client's vnode op functions to make
them compatible with the regular NFS client. I'll admit
I'm not sure that the mutex locks around the assignments
are needed, but the regular client has them, so I added them.
Also, add handling of the case of partial attributes in
setattr to be compatible with the regular client.
rmacklem [Sun, 1 May 2011 03:01:21 +0000 (03:01 +0000)]
MFC: r220752
Get rid of the "nfscl: consider increasing kern.ipc.maxsockbuf"
message that was generated when doing experimental NFS client
mounts. I put that message in because the krpc would hang with
the default size for mounts that used large rsize/wsize values.
Since the bug that caused these hangs was fixed by r213756,
which fixed the way the krpc used soreserve(), I think the
message is no longer needed.
rmacklem [Sun, 1 May 2011 02:47:54 +0000 (02:47 +0000)]
MFC: r220751
Fix up some of the sysctls for the experimental NFS client so
that they use the same names as the regular client. Also add
string descriptions for them.
rmacklem [Sun, 1 May 2011 02:36:09 +0000 (02:36 +0000)]
MFC: r220739
Change some defaults in the experimental NFS client to be the
same as the regular NFS client for NFSv3. The main one is making
use of a reserved port# the default. Also, set the retry limit
for TCP the same and fix the code so that it doesn't disable
readdirplus for NFSv4.
rmacklem [Sun, 1 May 2011 02:22:54 +0000 (02:22 +0000)]
MFC: r220735
Fix readdirplus in the experimental NFS client so that it
skips over ".." to avoid a LOR race with nfs_lookup(). This
fix is analagous to r138256 in the regular NFS client.
Unbreak non-x86 and in particular ia64, The default stack size
on ia64 is 32KB. Unconditionally hardcoding a 16KB stack for
reasons of increasing the stack size on i386 is just wrong. If
the size was indeed expressed in terms of pages, as the commit
log suggested, then it would happen to be just right for ia64,
though only accidentally.
MFC: r220732
Add a lktype flags argument to nfscl_nget() and ncl_nget() in the
experimental NFS client so that its nfs_lookup() function can use
cn_lkflags in a manner analagous to the regular NFS client.
Create a function for the code from r192246 so that it can be used both
times mount is called.
Limit the automatic behavior to when AUTO is specified (as it is in
etc/defaults/rc.conf) and for everything else take advantage of all
of the goodness in checkyesno.
MFC: r220683
Change the experimental NFS client so that it creates nfsiod
threads in the same manner as the regular NFS client after
r214026 was committed. This resolves the lors fixed by r214026
and its predecessors for the regular client.
MFC: r220648
Fix the experimental NFSv4 server so that it uses VOP_PATHCONF()
to determine if a file system supports NFSv4 ACLs. Since
VOP_PATHCONF() must be called with a locked vnode, the function
is called before nfsvno_fillattr() and the result is passed in
as an extra argument.
MFC: r220645
Modify the experimental NFSv4 server so that it handles
crossing of server mount points properly. The functions
nfsvno_fillattr() and nfsv4_fillattr() were modified to
take the extra arguments that are the mount point, a flag
to indicate that it is a file system root and the mounted
on fileno. The mount point argument needs to be busy when
nfsvno_fillattr() is called, since the vp argument is not
locked.
MFC r215649,r215764,r215802,r215804,r215810,r215812,r216091,r216267,r218165,r220301,r215651,r215803,r216138,r218010,r217558,r220312,r220314,r215846 and r216268.
Backport USB PF and usbdump from head to 8-stable.
This fixes a long standing bug in mxge(4) where "ifconfig mxge0 $IP"
did not bring the interface into a RUNNING state, like it does on
most (all?) other FreeBSD NIC drivers.
Thanks to gnn for mentioning the bug, and yongari for pointing out that
ether_ioctl() invokes ifp->if_init() in SIOCSIFADDR.