No functional change - this just reduces an upcoming
patch that will make further changes to this function.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic186f315b09ebadfba6120a70fac03ebb9beaffb
Reviewed-on: https://review.gerrithub.io/398856
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
The socket-related code was already broken out into
lib/net/sock.c, so break out the header portions
from include/spdk/net.h into its own sock.h.
This prepares for some upcoming changes in how
TCP sockets are abstracted, to enable alternative
userspace TCP stack implementations to be used with
SPDK.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I40b162e72ea80c235b49f10b17c2085fcfb385d4
Reviewed-on: https://review.gerrithub.io/398851
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Require braces around all conditional statements, e.g.:
if (cond)
statement();
becomes:
if (cond) {
statement();
}
This is the style used through most of the SPDK code, but several
exceptions crept in over time. Add the astyle option to make sure we
are consistent.
Change-Id: I5a71980147fe8dfb471ff42e8bc06db2124a1a7f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/390914
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
There are two ways to set stockets to nonblocking type:
- ioctl with FIONBIO
- fcntl with O_NONBLOCK
Those two should be equivalent for sockets used in SPDK.
During testing it was shown that VPP interprets only
the second type, so this patch changes all occurences of it.
When here, more descriptive error logs were set in case of
failure.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ifa5b30e3a4fa04fe23f41fa2ae9dab4b01dd7d3c
Reviewed-on: https://review.gerrithub.io/388816
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
SPDK have used "*" and "[*]" as wildcard address
for iSCSI network portal. These abbreviations may be convenient
but unusual. If "*" or "[*]" is used, output warning message
and forcefully overwrite "*" or "[*]" by "0.0.0.0" or "[::]"
respectively.
After confirming that the usage of "*" and "[*]" is not used any
more, the code for "*" and "[*]" will be deleted.
Change-Id: Ibb8fb0d4598ffa1f7b1690ad6afd10d5ae162612
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/383556
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
spdk_sock_getaddr() (in lib/net/sock.c) only support IPv4.
Hence IPv6 cannot be used in SPDK iSCSI target.
By adding the code to support IPv6 transparently, IPv6 becomes
available in SPDK iSCSI target.
Change-Id: I236f2c6cb1e61283dde090729fecd8f743cec3fc
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/383672
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This removes the event framework dependency from the net
library entirely.
Change-Id: I7bc1a6f146437fd3d2dab0289bbd845f0ff61ae8
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365726
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The stricter warning levels (-Wimplicit-fallthrough=4) require all-caps
FALLTHROUGH, so update the existing comments to match.
Change-Id: I5f8608101cad31d8ea8e84d48604397f98400e87
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/363491
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This patch also drops support for automatically unbinding
devices from the kernel - run scripts/setup.sh first.
Our generic pci interface is now hidden behind include/spdk/pci.h
and implemented in lib/util/pci.c. We no longer wrap the calls
in nvme_impl.h or ioat_impl.h. The implementation now only uses
DPDK and the libpciaccess dependency has been removed. If using
a version of DPDK earlier than 16.07, enumerating devices
by class code isn't available and only Intel SSDs will be
discovered. DPDK 16.07 adds enumeration by class code and all
NVMe devices will be correctly discovered.
Change-Id: I0e8bac36b5ca57df604a2b310c47342c67dc9f3c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This is a useful abstraction when you want to plug in
a userspace networking layer instead of using the kernel.
Change-Id: I7039d2987e6abad9dcd1987fa105282b1598e2f5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>