public inbox for initramfs@vger.kernel.org
 help / color / mirror / Atom feed
From: WANG Chao <chaowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Thomas Renninger <trenn-l3A5Bk7waGM@public.gmane.org>
Cc: harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	hare-l3A5Bk7waGM@public.gmane.org,
	initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Pavel Wieczorkiewicz
	<pwieczorkiewicz-IBi9RG/b67k@public.gmane.org>
Subject: Re: [PATCH 11/33] 95iscsi: Autodetect iSCSI firmware
Date: Fri, 21 Nov 2014 13:43:11 +0800	[thread overview]
Message-ID: <20141121054311.GD2591@dhcp-17-37.nay.redhat.com> (raw)
In-Reply-To: <1416495428-36978-12-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>

Hi,

On 11/20/14 at 03:56pm, Thomas Renninger wrote:
> From: Hannes Reinecke <hare-l3A5Bk7waGM@public.gmane.org>
> 
> Some iSCSI initiator present firmware information in
> /sys/firmware/ibft or /sys/firmware/iscsi_bootX
> 
> Whenever we detect one of those directories we should assume
> that the iSCSI devices should be activated.
> 
> Also incorporates SUSE patches:
> 0049:
> 95iscsi: Use 'ip=ibft' for ibft autoconfiguration
> 
> For iBFT autoconfiguration we should be setting 'ip=ibft'
> instead of rd.neednet. This should instruct dracut to only
> enable the iBFT interfaces and leave the rest alone.

I think,

/sys/firmware/ibft is created for iBFT if detected.
/sys/firmware/iscsi_bootX is created for hardware iSCSI if detected.

ip=ibft denotes we use iBFT, which is software based iscsi.
rd.iscsi.firmware denotes we use hardware iscsi.

Though "iscsistart -b" will handle both the cases, I don't think it's
good idea to mix these concepts.

One more thing, it seems ip=ibft is deprecated now and "rd.iscsi.ibft"
will take over.

Thanks
WANG Chao

> 
> References: bnc#879038
> 
> 0054:
> 95iscsi: update commandline printing
> 
> dracut has a separate callout 'cmdline' which should be used
> for printing out the generated commandline.
> 
> 
> Signed-off-by: Pavel Wieczorkiewicz <pwieczorkiewicz-IBi9RG/b67k@public.gmane.org>
> Signed-off-by: Hannes Reinecke <hare-l3A5Bk7waGM@public.gmane.org>
> Signed-off-by: Thomas Renninger <trenn-l3A5Bk7waGM@public.gmane.org>
> ---
>  modules.d/95iscsi/module-setup.sh | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
> index 8b42d3e..5d2a39b 100755
> --- a/modules.d/95iscsi/module-setup.sh
> +++ b/modules.d/95iscsi/module-setup.sh
> @@ -28,6 +28,21 @@ check() {
>      return 0
>  }
>  
> +install_ibft() {
> +    # When iBFT / iscsi_boot is detected:
> +    # - Use 'ip=ibft' to set up iBFT network interface
> +    # - specify firmware booting cmdline parameter
> +
> +    for d in /sys/firmware/* ; do
> +        if [ -d ${d}/initiator ] ; then
> +            if [ ${d##*/} = "ibft" ] ; then
> +                echo -n "ip=ibft "
> +            fi
> +            echo -n "rd.iscsi.firmware=1"
> +        fi
> +    done
> +}
> +
>  # called by dracut
>  depends() {
>      echo network rootfs-block
> @@ -37,6 +52,12 @@ depends() {
>  installkernel() {
>      local _arch=$(uname -m)
>  
> +    # Detect iBFT and perform mandatory steps
> +    if [[ $hostonly_cmdline == "yes" ]] ; then
> +        install_ibft > "${initdir}/etc/cmdline.d/95iscsi.conf"
> +        echo >> "${initdir}/etc/cmdline.d/95iscsi.conf"
> +    fi
> +
>      instmods bnx2i qla4xxx cxgb3i cxgb4i be2iscsi
>      hostonly="" instmods iscsi_tcp iscsi_ibft crc32c iscsi_boot_sysfs
>      iscsi_module_filter() {
> @@ -77,6 +98,11 @@ installkernel() {
>  }
>  
>  # called by dracut
> +cmdline() {
> +    install_ibft
> +}
> +
> +# called by dracut
>  install() {
>      inst_multiple umount iscsistart hostname iscsi-iname
>      inst_multiple -o iscsiuio
> -- 
> 1.8.5.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe initramfs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-11-21  5:43 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-20 14:56 SUSE patches which should show up mainline Thomas Renninger
     [not found] ` <1416495428-36978-1-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
2014-11-20 14:56   ` [PATCH 01/33] mkinitrd-suse: Update to sles12 SUSE state Thomas Renninger
2014-11-20 14:56   ` [PATCH 02/33] Update dracut manpage for GRUB Legacy and GRUB2 Thomas Renninger
     [not found]     ` <1416495428-36978-3-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
2014-11-26  5:32       ` Dave Young
     [not found]         ` <20141126053216.GE3505-4/PLUo9XfK+sDdueE5tM26fLeoKvNuZc@public.gmane.org>
2014-12-10 15:08           ` Thomas Renninger
2014-11-20 14:56   ` [PATCH 03/33] 00warpclock: Set correct timezone Thomas Renninger
     [not found]     ` <1416495428-36978-4-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
2014-11-26  5:36       ` Dave Young
2014-11-26  5:52       ` WANG Chao
2014-11-20 14:56   ` [PATCH 04/33] systemd always tries to load autofs4 Thomas Renninger
2014-11-20 14:56   ` [PATCH 05/33] Fixup mdraid setup Thomas Renninger
2014-11-20 14:56   ` [PATCH 06/33] 95udev-rules: Include correct sg3_utils rules Thomas Renninger
2014-11-20 14:56   ` [PATCH 07/33] 90multipath: install correct multipath rules Thomas Renninger
2014-11-20 14:56   ` [PATCH 08/33] 90multipath: Install libgcc_s library Thomas Renninger
     [not found]     ` <1416495428-36978-9-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
2014-11-25 12:25       ` Harald Hoyer
2014-11-20 14:56   ` [PATCH 09/33] 90multipath: Load device_handler modules early during boot Thomas Renninger
     [not found]     ` <1416495428-36978-10-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
2014-11-25 12:25       ` Harald Hoyer
2014-11-20 14:56   ` [PATCH 10/33] 90multipath: install dracut-specific service file Thomas Renninger
     [not found]     ` <1416495428-36978-11-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
2014-11-25 12:26       ` Harald Hoyer
2014-11-20 14:56   ` [PATCH 11/33] 95iscsi: Autodetect iSCSI firmware Thomas Renninger
     [not found]     ` <1416495428-36978-12-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
2014-11-21  5:43       ` WANG Chao [this message]
     [not found]         ` <20141121054311.GD2591-2coKmSd1Zb7VyFQaPrqbSRcY2uh10dtjAL8bYrjMMd8@public.gmane.org>
2014-11-21  6:51           ` Hannes Reinecke
     [not found]             ` <546EE10A.5010606-l3A5Bk7waGM@public.gmane.org>
2014-11-21  7:32               ` WANG Chao
     [not found]                 ` <20141121073255.GE2591-2coKmSd1Zb7VyFQaPrqbSRcY2uh10dtjAL8bYrjMMd8@public.gmane.org>
2014-12-10 16:29                   ` Thomas Renninger
2014-11-20 14:56   ` [PATCH 12/33] 95iscsi: Install libgcc_s library Thomas Renninger
2014-11-20 14:56   ` [PATCH 13/33] 95iscsi: Set correct iscsi_started value for iSCSI firmware Thomas Renninger
2014-11-20 14:56   ` [PATCH 14/33] 95iscsi: strip one set of quotes when calling initqueue Thomas Renninger
2014-11-20 14:56   ` [PATCH 15/33] 95iscsi: Fixup bnx2i offload booting Thomas Renninger
2014-11-20 14:56   ` [PATCH 16/33] 95iscsi: More empty cmdline fixes Thomas Renninger
2014-11-20 14:56   ` [PATCH 17/33] 95iscsi: generate commandline for software iscsi Thomas Renninger
2014-11-20 14:56   ` [PATCH 18/33] iscsi: iscsi.initiator and others can and must only show up once Thomas Renninger
2014-11-20 14:56   ` [PATCH 19/33] Restore original IFS value Thomas Renninger
     [not found]     ` <1416495428-36978-20-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
2014-11-21  9:10       ` Harald Hoyer
     [not found]         ` <546F019E.2030906-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-11-21 10:53           ` Thomas Renninger
2014-11-21 12:37             ` Harald Hoyer
2014-11-20 14:56   ` [PATCH 20/33] Implement 'rd.timeout' to modify the device timeout Thomas Renninger
2014-11-20 14:56   ` [PATCH 21/33] Do not call 'lvm' for non-LVM device-mapper devices Thomas Renninger
2014-11-20 14:56   ` [PATCH 22/33] Print stored dracut commandline during initramfs build Thomas Renninger
2014-11-20 14:56   ` [PATCH 23/33] Align dev_unit_name() with systemd's function Thomas Renninger
2014-11-20 14:56   ` [PATCH 24/33] Generate fallback mount unit for root filesystem Thomas Renninger
2014-11-20 14:57   ` [PATCH 25/33] 99base: warn on invalid command for initqueue Thomas Renninger
2014-11-20 14:57   ` [PATCH 26/33] Handle module alias properly Thomas Renninger
2014-11-20 14:57   ` [PATCH 27/33] 99base: Increase initqueue timeout in non systemd case Thomas Renninger
2014-11-20 14:57   ` [PATCH 28/33] 90lvm: Install dm-snapshot module Thomas Renninger
2014-11-20 14:57   ` [PATCH 29/33] Check for logfile (--logfile option) and create it if necessary Thomas Renninger
2014-11-20 14:57   ` [PATCH 30/33] dracut.sh: Avoid duplicate devices in host_devs Thomas Renninger
2014-11-20 14:57   ` [PATCH 31/33] dracut.sh: Fix UUID= fstab parsing in case --mount option is passed Thomas Renninger
2014-11-20 14:57   ` [PATCH 32/33] dracut.usage.asc: Remove distro specific help from manpage Thomas Renninger
2014-11-20 14:57   ` [PATCH 33/33] nfs: Add ip=... and root=nfs... parameters to internal dracut Thomas Renninger
     [not found]     ` <1416495428-36978-34-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org>
2014-11-21  9:26       ` Harald Hoyer
     [not found]         ` <546F0546.8080007-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-11-21 10:34           ` Thomas Renninger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141121054311.GD2591@dhcp-17-37.nay.redhat.com \
    --to=chaowang-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hare-l3A5Bk7waGM@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pwieczorkiewicz-IBi9RG/b67k@public.gmane.org \
    --cc=trenn-l3A5Bk7waGM@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox