Commit Graph

200602 Commits

Author SHA1 Message Date
dim
4ce847f533 Regenerate src.conf.5, which was completely busted by r268351. 2014-07-07 16:43:42 +00:00
mjg
8a494537a4 Don't call crdup nor uifind under vnode lock.
A locked vnode can get into the way of satisyfing malloc with M_WATOK.

This is a fixup to r268087.

Suggested by:	kib
MFC after:	1 week
2014-07-07 14:03:30 +00:00
mav
aef4aec0ff Fix "use after free" on port creation error in r268291. 2014-07-07 11:52:22 +00:00
mav
db5360cb99 Add support for READ FULL STATUS action of PERSISTENT RESERVE IN command. 2014-07-07 11:05:04 +00:00
mav
784dfeee39 Teach ctl_add_initiator() to dynamically allocate IIDs from pool.
If port passed negative IID value, the function will try to allocate IID
from the pool of unused, based on passed wwpn or name arguments.  It does
all its best to make IID unique and persistent across reconnects.

This makes persistent reservation properly work for iSCSI.  Previously,
in case of reconnects, reservation could be unexpectedly lost, or even
migrate between intiators.
2014-07-07 09:37:22 +00:00
mav
25e7dba03e Fix bugs for PERSISTENT RESERVE OUT bits in r268096. 2014-07-07 08:58:36 +00:00
fabient
e368d99e2a Optim and Fix for mge driver:
- add missing rcvif in mbuf
- add missing ipacket stat
- remove uncessary mbuf copy on output path
- fix deadlock of the TX engine in case of error

Obtained from:	NETASQ
MFC after:	2 weeks
2014-07-07 08:22:39 +00:00
mav
c964df7230 Correction to r268356: collide only sessions to the same target. 2014-07-07 06:17:07 +00:00
mav
17f8e3065c When new connection comes in, check whether we already have session from
the same intiator (Name+ISID).  If so -- terminate the old session and let
the new one take its place, as required by iSCSI RFC.
2014-07-07 05:48:11 +00:00
hselasky
4be2431f80 Improve support for Intel Lynx Point USB 3.0 controllers by masking
the port routing bits like done in Linux.

MFC after:	1 week
Tested by:	Tur-Wei Chan <twchan@singnet.com.sg>
2014-07-07 05:17:16 +00:00
mav
c28c880da7 Implement ABORT TASK SET and I_T NEXUS RESET task management functions.
Use the last one to terminate active commands on iSCSI session termination.
Previous code was aborting only commands doing some data moves.
2014-07-07 03:10:56 +00:00
marcel
9f28abd980 Remove ia64.
This includes:
o   All directories named *ia64*
o   All files named *ia64*
o   All ia64-specific code guarded by __ia64__
o   All ia64-specific makefile logic
o   Mention of ia64 in comments and documentation

This excludes:
o   Everything under contrib/
o   Everything under crypto/
o   sys/xen/interface
o   sys/sys/elf_common.h

Discussed at: BSDcan
2014-07-07 00:27:09 +00:00
nwhitehorn
43f783bfcf Use common vt_fb parts in ofwfb as far as we are able without sacrificing
performance.

MFC after:	2 weeks
2014-07-07 00:12:18 +00:00
bryanv
c7454c4baf Use the appropriate IPv6 hashtype defines when looking up the PCBGROUP
Reviewed by:	adrian@
2014-07-07 00:02:49 +00:00
gavin
83e469f56c Remove /usr/share/doc/psd/28.cvs/paper.ps.gz if it exists, as it is
obsolete since r251794.

PR:		191003
Submitted by:	Vick Khera
MFC after:	3 days
2014-07-06 23:08:47 +00:00
andreast
67a3cc14e4 Make gcc happy, init idlen2. 2014-07-06 20:09:23 +00:00
mav
ac68a20a27 Close race in r268291 between port destruction, delayed by sessions
teardown, and new port creation during `service ctld restart`.

Close it by returning iSCSI port internal state, that allows to identify
dying ports, which should not be counted as existing, from really alive.
2014-07-06 17:57:59 +00:00
alc
d74e85dbb9 Introduce pmap_unwire(). It will replace pmap_change_wiring(). There are
several reasons for this change:

pmap_change_wiring() has never (in my memory) been used to set the wired
attribute on a virtual page.  We have always used pmap_enter() to do that.
Moreover, it is not really safe to use pmap_change_wiring() to set the wired
attribute on a virtual page.  The description of pmap_change_wiring() says
that it assumes the existence of a mapping in the pmap.  However, non-wired
mappings may be reclaimed by the pmap at any time.  (See pmap_collect().)
Many implementations of pmap_change_wiring() will crash if the mapping does
not exist.

pmap_unwire() accepts a range of virtual addresses, whereas
pmap_change_wiring() acts upon a single virtual page.  Since we are
typically unwiring a range of virtual addresses, pmap_unwire() will be more
efficient.  Moreover, pmap_unwire() allows us to unwire superpage mappings.
Previously, we were forced to demote the superpage mapping, because
pmap_change_wiring() only allowed us to express the unwiring of a single
base page mapping at a time.  This added to the overhead of unwiring for
large ranges of addresses, including the implicit unwiring that occurs at
process termination.

Implementations for arm and powerpc will follow.

Discussed with:	jeff, marcel
Reviewed by:	kib
Sponsored by:	EMC / Isilon Storage Division
2014-07-06 17:42:38 +00:00
mav
3437bf8178 Make iSCSI initiator keep Initiator Session ID (ISID) across reconnects.
Previously ISID was changed every time, that made impossible correct
persistent reservation, because reconnected session was identified as
completely new one.

Reviewed by:	trasz
MFC after:	1 week
2014-07-06 17:37:49 +00:00
nwhitehorn
02cefe6a6a In case we ever support little-endian PowerPC (probably userland only),
avoid hardcoding endianness here.
2014-07-06 16:20:37 +00:00
nwhitehorn
399c1f5289 Add a new CPU id for a POWER8 variant. 2014-07-06 16:19:55 +00:00
hselasky
50128eff91 Fix OFED startup order: All SYSINIT()'s and modules should be loaded
prior to starting "/sbin/init" which will run all the "/etc/rc.d/xxx"
scripts. Else there can be a race configuring the interfaces via
"/etc/rc.conf".

MFC after:	4 weeks
Sponsored by:	Mellanox Technologies
2014-07-06 14:22:13 +00:00
hselasky
050052b698 Fix compile warning.
MFC after:	4 weeks
Sponsored by:	Mellanox Technologies
2014-07-06 14:20:47 +00:00
hselasky
8bc8d604f8 Fix some compile warnings.
MFC after:	4 weeks
Sponsored by:	Mellanox Technologies
2014-07-06 14:14:07 +00:00
andrew
b9ea3f69fd Align the stack in _rtld_bind_start. Normally this is called with the
correct stack alignment, however when we have a leaf function that uses
thread local storage it calls __aeabi_read_tp to get the thread pointer.
Neither GCC or clang see this as a function call so will align the stack
to a 4-byte boundary. This may be a problem as _rtld_bind expects to be
on an 8-byte boundary.

The solution is to store a copy of the stack pointer and force the
alignment before calling _rtld_bind.

This fixes a problem with armeb where applications would crash in odd ways.
It should also remove the need for a local patch to clang to force the
stack alignment to an 8-byte boundary, even for leaf functions. Further
testing will be needed before reverting this local change to clang as we
may rely on it in other places.

Reviewed by:	jmg@
2014-07-06 10:24:06 +00:00
mav
832ad256f9 Add support for SCSI Ports (88h) VPD page. 2014-07-06 07:34:18 +00:00
mav
30f8b78b35 Make REPORT TARGET PORT GROUPS command report realistic data instead of
hardcoded garbage.
2014-07-06 07:02:36 +00:00
mav
a50500ead5 Move lun_map() method from command nexus to port.
Previous implementation made impossible to do some things, such as calling
it for ports other then one through which command arrived.
2014-07-06 06:21:34 +00:00
mav
1bf007c808 Relax some bit checks for INQUIRY command.
FreeBSD still tries to put LUN number in second byte until it get device
protocol version, even that it was obsoleted about 20 years ago.
2014-07-06 06:12:29 +00:00
jilles
df3c34c7bd sh: Fix overflow checking on 'ulimit' operand. 2014-07-05 21:50:59 +00:00
gavin
f62356bcf8 Add support to asmc(4) for Macmini 3,1.
PR:		190195
Submitted by:	fbsdbugs2 sentry.org
MFC after:	1 week
Relnotes:	yes
2014-07-05 21:34:37 +00:00
mav
e3cec6db55 Pass through iSCSI session ISID from LOGIN request to the CTL frontend.
ISID is an important part of initiator transport ID for iSCSI.  It is not
used now, but should be to properly implement persistent reservation.
2014-07-05 21:18:33 +00:00
loos
f995552a76 Check the number of returned entries before doing any access to ifm_ulist. 2014-07-05 20:16:02 +00:00
rpaulo
c5e392f88d bsd.dep.mk: add support for generating DTrace header files from .d files.
MFC after:	3 weeks
2014-07-05 20:08:35 +00:00
gavin
d354f1271b Use %zu not %zd for printing size_t.
PR:		185007
Submitted by:	saper saper.info
MFC after:	3 days
2014-07-05 20:08:25 +00:00
gavin
b19b03f00b Correct format string to fix build of uhsoctl when DEBUG is defined
PR:		185007
Submitted by:	saper saper.info
MFC after:	3 days
2014-07-05 19:53:21 +00:00
rpaulo
5ed852244e Add the DTrace probe definitions for plockstat support.
This will be connected to the system later.

Sponsored by:	The FreeBSD Foundation
2014-07-05 19:49:31 +00:00
gavin
1b2640b4f1 Fix equation and limerick to be correct. NetBSD fixed this 14 years ago
(src/games/fortune/datfiles/fortunes2 1.7).

PR:		188714
Submitted by:	ksmakoto dd.iij4u.or.jp
Reviewed by:	Wolfram Alpha
MFC after:	3 days
2014-07-05 19:37:38 +00:00
loos
d4ce3e7614 Allow the PVID setting on CPU port.
Return our static list of supported media for the CPU port.

Tested on TP-Link 1043ND.
2014-07-05 19:31:22 +00:00
mav
dd9568e892 Burry devid port method, which was a gross hack.
Instead make ports provide wanted port and target IDs, and LUNs provide
wanted LUN IDs.  After that core Device ID VPD code only had to link all
of them together and add relative port and port group numbers.

LUN ID for iSCSI LUNs no longer created by CTL, but by ctld, and passed
to CTL as "scsiname" LUN option.  This makes LUNs to report the same set
of IDs, independently from the port through which it is accessed, as
required by SCSI specifications.
2014-07-05 19:30:20 +00:00
gavin
40297ad930 Dominion Day became Canada Day in 1982, update the holiday calendar.
PR:		191533
Submitted by:	db
Obtained from:	http://www.pch.gc.ca/eng/1359137387574/1359137429809
MFC after:	3 days
2014-07-05 19:02:53 +00:00
mav
4e932574fb Create separate CTL port for every iSCSI target (and maybe portal group).
Having single port for all iSCSI connections makes problematic implementing
some more advanced SCSI functionality in CTL, that require proper ports
enumeration and identification.

This change extends CTL iSCSI API, making ctld daemon to control list of
iSCSI ports in CTL.  When new target is defined in config fine, ctld will
create respective port in CTL.  When target is removed -- port will be
also removed after all active commands through that port properly aborted.
This change require ctld to be rebuilt to match the kernel.

As a minor side effect, this allows to have iSCSI targets without LUNs.
While that may look odd and not very useful, that is not incorrect.
2014-07-05 18:15:00 +00:00
pfg
e78d2f6e69 Merge from OpenSolaris (24-Jul-2010):
6679140 asymmetric alloc/dealloc activity can induce dynamic variable drops
6679193 dtrace_dynvar walker produces flood of dtrace_dynhash_sink

This finishes a set of merges from the older OpenSolaris releases.
Still the FreeBSD port has many differences that are difficult to
account for but that seems normal given that the kernels are different.

MFC after:	1 week
2014-07-05 15:36:17 +00:00
mav
d7ab4b5c0d Fix minor copy-paste bug in r268284. 2014-07-05 15:32:25 +00:00
mav
6a3d6f3982 Improve CTL_BEARG_* flags support, including optional values copyout. 2014-07-05 14:32:42 +00:00
mav
cd2bf77221 Implement and use ctl_frontend_find(). 2014-07-05 13:50:05 +00:00
cy
de8f7474ba Fix compile-time errors when NO_WERROR and WITHOUT_INET6_SUPPORT
(NO_INET6) are specified.

Approved by:	glebius
MFC after:	1 week
2014-07-05 07:15:19 +00:00
hselasky
9d5fb7b715 When getting the initial value of numeric tunables use the
getenv_xxx() functions instead of strtoq(), because the getenv_xxx()
functions include wrappers for various postfixes like G/M/K, which
strtoq() doesn't do.
2014-07-05 06:12:48 +00:00
mav
28432b0ce5 Introduce new IOCTL CTL_PORT_LIST reporting in more flexible XML format.
Leave old CTL_GET_PORT_LIST in place so far.  Garbage-collect it later.
2014-07-05 05:44:26 +00:00
mav
1aa291ed88 Improve readability of XML generated by CTL_LUN_LIST. 2014-07-05 04:10:24 +00:00