All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <mchristi@redhat.com>
To: target-devel@vger.kernel.org
Subject: Re: [PATCH] target:iscsi:fix np_ip_proto and np_sock_type in iscsit_setup_np
Date: Wed, 20 Mar 2019 16:59:04 +0000	[thread overview]
Message-ID: <5C927158.7050706@redhat.com> (raw)
In-Reply-To: <1552488998-3604-1-git-send-email-hndksztwj@163.com>

On 03/13/2019 09:56 AM, tangwenji wrote:
> From: tangwenji <tang.wenji@zte.com.cn>
> 
> In the switch, np_ip_proto and np_sock_type set different values according to np_network_transport, and then uniformly assign values, so the previous values are overwritten.
> 
> Signed-off-by: tangwenji <tang.wenji@zte.com.cn>
> ---
>  drivers/target/iscsi/iscsi_target_login.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c
> index ae3209e..c526e66 100644
> --- a/drivers/target/iscsi/iscsi_target_login.c
> +++ b/drivers/target/iscsi/iscsi_target_login.c
> @@ -883,9 +883,6 @@ int iscsit_setup_np(
>  		return -EINVAL;
>  	}
>  
> -	np->np_ip_proto = IPPROTO_TCP;
> -	np->np_sock_type = SOCK_STREAM;
> -
>  	ret = sock_create(sockaddr->ss_family, np->np_sock_type,
>  			np->np_ip_proto, &sock);
>  	if (ret < 0) {
> 

This got added in 2013:

commit baa4d64b147a4064626f6597646ae8a330d9e2ed
Author: Nicholas Bellinger <nab@linux-iscsi.org>
Date:   Wed Mar 6 21:54:13 2013 -0800

    iscsi-target: Initial traditional TCP conversion to iscsit_transport

so I guess SCTP does not get used a lot, or it somehow worked still. I
do not have a SCTP initiator to test, but it looks ok to me since it
looks like the original code.


Reviewed-by: Mike Christie <mchristi@redhat.com>

  reply	other threads:[~2019-03-20 16:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-13 14:56 [PATCH] target:iscsi:fix np_ip_proto and np_sock_type in iscsit_setup_np tangwenji
2019-03-20 16:59 ` Mike Christie [this message]
2019-03-21  0:37 ` Martin K. Petersen

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=5C927158.7050706@redhat.com \
    --to=mchristi@redhat.com \
    --cc=target-devel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.