| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* iscsid/iscsiuio: fix OOM adjustment
For both the iscsid and iscsiuio daemons, they try to modify
nice value and OOM adjustment value, so they have priority
and will not be killed by the OOM-killer.
But the code incorrectly set the value to "-17" for modern
linux systems, when the maximum is actually "-1000". While
making the changes, use "/proc/self/..." instead of
"/proc/<PID>/...", so we don't have to use getpid() nor
print out the pathname. Now we either write "-16" to
the old interface, "-1000" to the new interface, or we
print a warning.
Several "log_debug()" calls that should have been warnings
are changed to "log_warning()" calls in iscsid.
* iscsid/iscsiuio: fix OOM adjustment value for older systems
On older linux system, "-17" is the maximum, not "-16".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Build: Add an iscsiuio 'build_date.sh' script
This is currently unused, but will be used by meson to
build the "build_date.[ch]" files used by iscsiuio.
* Build: have git ignore file '.setup'
I commonly use this file for shell aliases/functions.
* Add framework to support building using meson.
This adds the ability to use meson/ninja to build open-iscsi
and iscsiuio, rather than the current system that uses 'autoconf'
for iscsiuio and uses 'make' for everything else.
The old make/autoconf system is left in place, for now, but
deprecated, including a warning about that when running 'make all'
or 'make user' from the top-level.
* utils/build: enhance iscsi-iname to generate prefix
Added new "-g/--generate-iname-prefix" argument to generate the
InitiatorName= prefix. Also, updated iscsi-iname to use getopts.
Also, use the new option from meson.
* git/meson: remove 'builddir' from ignored files
The build directory can be called anything.
Suggested by: Eli Schwartz
* iscsiuio build: fix new build_date.sh script
Fixed several issues:
- fix option handling for "-S"
- fix epoch date handling from env (noticed by Eli Schwartz)
- remove debug statements
* iscsiuio meson: warn when not creating a symlink for iscsiuio
* meson: install man pages more efficiently
We don't need to specify path or subdirectory
* iscsiuio meson: remove unused source date epoch option
This option was never used, since we pass this info
from the environment.
* meson: no need to set libdir: default is fine
* iscsiuio meson: no need to add c_args: already there
* Don't generate initiatorname when cross-building (#367)
Let it be generated by the iscsi-init service.
Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
* Set ISCSI_CONFIG_ROOT by meson
Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
* Set LOCK_DIR from home_dir to lock_dir
Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
* Install iface.example to db_root/ifaces
Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
Co-authored-by: TIAN Yuanhao <78596099+tianyuanhao@users.noreply.github.com>
Co-authored-by: TIAN Yuanhao <tianyuanhao3@163.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* build: move utils/sysdeps to top-level
The routines here are used by iscsiuio, so
move them to the top level.
* libopeniscsiusr: fix kernel-doc bugs
There were errors in four places, effecting the generated
manual pages.
* libopeniscsiusr: clean up kernel-doc usage
Simplify generation of library interface documentation using
the kernel-doc script:
* make the kernel-doc perl script executble (the only visible change)
* remove mention of sed (not used)
* stop compressing man pages -- let distros do that
* improve kernel-doc so that doc-preclean.pl and split-man.pl
are no longer needed
* add list-man-pages.sh to simplify things (copied from libnvme)
* build: keep current version number in one place
Move the current version number (now 2.1.7) into
the top-level Makefile, and out of usr/version.h and
libopeniscsiusr/version.h, completely eliminating the
need for the latter.
Note that this ties the libopeniscsiusr library idea of
"version" to the usr/ (iscsid, etc) idea of version, even
though they used to be defined separately. But they always
had the same value, so nothing lost.
* build: insteall man pages uncompressed
We were delivering some man pages compressed and other not, and
it turns out distros know how to install man pages using the
compression they prefer, so stop doing it for them.
|
|
|
|
|
|
|
|
| |
pthread_t is opaque, therefore avoid compiler errors on musl when
compiling since pthread_t is not a plain old data type, like glibc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
- We don't want to use _LIBS here, we're building a library, not an executable.
- We want LDADD for the whole lot (not a mix of LDFLAGS/LIBS/LDADD),
but put the objects/libraries (.a files) first so that -l* works correctly.
Closes: https://github.com/open-iscsi/open-iscsi/issues/337
Fixes: 9fbd6009cd917f1152a367fa7e5ae3993133c1e4
Signed-off-by: Sam James <sam@gentoo.org>
|
|\
| |
| | |
Build system tweaks from downstream
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use LIBS rather than LDFLAGS which ensures automake gets the ordering
right (some LDFLAGS values won't work correctly if not placed exactly before
libraries).
This should functionally work the same as before, just improve compatibility
with bits like -Wl,--as-needed.
Signed-off-by: Sam James <sam@gentoo.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The systemd check currently clobbers LDFLAGS from the environment
rather than appending to it.
But we actually want LIBS here anyway, rather than LDFLAGS.
Signed-off-by: Sam James <sam@gentoo.org>
|
|\ \
| | |
| | | |
Fix a missing-unlocking bug
|
| |/
| |
| | |
Fix a missing-unlocking bug in nic_utils.c
|
|/
|
|
|
|
|
| |
On install we created both usr/share/man/man8/iscsiuio.8 and
usr/share/man/man8/iscsiuio.8.gz, since we installed from both
iscsiuio/Makefile as well as from doc/Makefile, so get rid
of the doc/Makefile version and just insall the gz from iscsiuio.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds two new top-level build options: one
for the "home" directory for open-iscsi called "HOMEDIR",
and one for the "database" directory, called "DBROOT". One can
now override the defaults of "/etc/iscsi" for either or
both of these directories on the make command line.
The README and man pages are updated with details about
these new options.
Some Makefile cleanup/repair was done as well. Installation
of the initiatorname.iscsi file, was moved out of the top-level
Makefile into the etc subdirectory, and installation of man
ages moved from the top-level Makefile to the doc subdirectory.
Also, this fixes some issues from commit fd14dd8316b1 ("Clean
p Makefile build system."), which incorrectly changed the DESTDIR
ariable in the Makefiles. This current commit also fixes the
top-level variable names for moving DBROOT and HOMEDIR.
|
|
|
|
|
|
|
|
| |
In case eth device failed to return correct version,
then we will initialize bp->version with baseline instead
of assigning unknown version number.
Signed-off-by: Manish Rangankar <mrangankar@marvell.com>
|
|
|
|
| |
Debian Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=982307
|
|
|
|
| |
CVE-2020-17437
|
|
|
|
| |
CVE-2020-13988
|
|
|
|
| |
CVE-2020-13987
|
|
|
|
|
|
|
|
|
|
|
|
| |
IFNAMSIZ is not used in this file. IFNAMSIZ is a macro defined in
net/if.h. Maybe this this macro is defined here to give it a self
defined value rather than system pre-defined at beginning, while
it seems the code reference the macro in this file is removed, so
here we can remove it.
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: Wu Bo <wubo40@huawei.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Both qedi_open() and bnx2x_open() perform 15 times retry
to make system call open() successful, while this retry
mechanism can not make sure open() can execute successfully.
So this patch verify return value of open(), if it is still
INVALID_FD just print error info and return the errno.
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
|
|
|
|
|
| |
This makes the compiler happy when searching for uio%d sysfs
directories.
|
|
|
|
|
|
|
|
| |
When playing with IPv6 IP addresses, which are described
in C using a union, and the gcc-10 compiler didn't like
that we were not specifying which member of the union
we wanted to address of, when in fact all members have
the same address. The fix is to be more explicit.
|
|
|
|
| |
The proper local is <poll.h>.
|
|
|
|
|
|
|
| |
Now that "-Werror" is turned on, 32-bit x86 compile problems are
fatal, so fix them.
*Should* be no functional change.
|
|
|
|
|
|
| |
This meant cleaning up the definition of some
global variables, so that they were only defined
in one place and refered to as external elsewhere.
|
|
|
|
|
|
| |
It's been reported that this breaks IPv6 discovery with qedi controllers
This reverts commit af48f0d68db48cd492d0e27e046fc011be236fd3.
|
| |
|
| |
|
|
|
|
|
| |
This loop is executing 16 times (sizeof(struct ipv6_addr)) but then
consumes 16-bits at a time (and moves ptr ahead two bytes).
|
| |
|
|
|
|
| |
dereferencing pointer
|
|\
| |
| | |
iscsiuio bug fix
|
| |
| |
| |
| | |
Signed-off-by: Nilesh Javali <njavali@marvell.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the event of DHCP failure, killing of enable_nic_thread did not
process any iscsid requests leading to error,
iscsistart: Could not broadcast to uIP after 5 tries
and login failure to next active path.
Do not kill enable_nic_thread and allow further processing of iscsid
requests and performing login to next active path.
Signed-off-by: Nilesh Javali <njavali@marvell.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit c1870ae6dddb7bc2dbdc750df68edbbe1a80763f added systemd
support to iscsiuio, but it was not integrated with the
autoconf script there, so this commit rectifies that. Now one
can build without systemd support, from the top, using:
$ make OPTFLAGS="... -DNO_SYSTEMD ...
which now works for both iscsid and iscsiuio.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Add in example socket and service files for iscsiuio, such
that it can socket-activated, as is iscsid. Also, update
main in iscsiuio to use sd_notify() when it is ready for
business. All of the systemd code can be skipped if
NO_SYSTEMD is defined when building.
|
| |
| |
| |
| |
| |
| |
| | |
Only send a message down the pipe if it is open, i.e.
only in daemon (non-foreground) mode.
Fixes: 9483ee87ceea3ec8816e6a39d93aee242e7e19d2
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a pipe from child to parent when running in the
background (daemon mode), so that the parent does not exit
until the child is ready for business, so that systemd does
not send us work too early. Also, fix error messages,
adding newlines where needed, and printing them to
stderr.
|
| |
| |
| |
| |
| | |
Convert /var/run to /run, and convert /var/lock to /run/lock,
as per modern requirements on use of the /var directory.
|
|\ \
| |/
| | |
iscsiuio bug fixes
|
| |
| |
| |
| | |
Signed-off-by: Nilesh Javali <nilesh.javali@cavium.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1. Use HW BD prod index to read packet buffer descriptor.
2. Use BD producer and consumer index to check for new data instead
of UIO ring buffer index.
NOTE - This patch has dependency on upstream qedi driver v8.33.0.21,
commit "qedi: Move LL2 producer index processing in BH.",
(https://marc.info/?l=linux-scsi&m=154271028608808)
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
|
| |
| |
| |
| |
| |
| | |
Invalid ether len was resulting into showing CRC error on wire.
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
|
|\ \
| |/
| | |
iscsiuio: Do not flush tx queue on each uio interrupt.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Unlike bnx2x, qedi start_xmit netlink provide us guarantee
of transmitting LL2 packet, so there is no need to call clear_tx_intr for
each LL2 packet. This help us in reducing iscsiuio lock contention.
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
|
|\ \
| | |
| | | |
Cleanup nic nl open usage
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The return value of nic_nl_open was ignored and while working by chance
being the latest call before the error label any later insertion of code
after this might break it.
Avoid that by checking for the retval and explicitly jumping to the
error label in case it is non zero.
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
nic_nl_open might have collected a non-zero rc and jumped to the error
label but still returned zero which would indicate success.
The function should return whatever it has collected in rc and while
working without, also explicitly initialize it to zero.
Fixes #125
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
|
|/
|
|
|
|
|
| |
The file descriptors used for writing to the pid file were
not being closed. Just be more clean and close them.
Also fix a debug message that said 'lock file' rather than 'pid file'.
|
|
|
|
|
|
|
|
| |
After successful stateless router adv., the restart of handle_ndp thread
infinitely checks dhcpv6 causing IPv6 DHCP sequence failure.
Limit the retries of dhcpv6 validation.
Signed-off-by: Nilesh Javali <nilesh.javali@cavium.com>
|