logo       

Re: meaning of ISCSI_FLG_STATUS: msg#00212

Subject: Re: meaning of ISCSI_FLG_STATUS
yes. we need a flag to achieve that goal. but there are 2 flags.

[mingz@amd64 iscsitarget-0.4.11]$ grep -rn ISCSI_FLG_STATUS *
kernel/iscsi_hdr.h:242:#define ISCSI_FLG_STATUS         0x01
kernel/iscsi.c:271:                     rsp->flags = ISCSI_FLG_FINAL |
ISCSI_FLG_STATUS;
[mingz@amd64 iscsitarget-0.4.11]$ grep -rn ISCSI_FLG_FINAL *
kernel/iscsi_hdr.h:351:#define ISCSI_FLG_FINAL                  0x80
kernel/iscsi.c:271:                     rsp->flags = ISCSI_FLG_FINAL |
ISCSI_FLG_STATUS;
kernel/iscsi.c:310:     rsp_hdr->flags = ISCSI_FLG_FINAL;
kernel/iscsi.c:349:     rsp_hdr->flags = ISCSI_FLG_FINAL;
kernel/iscsi.c:767:             rsp_hdr->flags = ISCSI_FLG_FINAL;
kernel/iscsi.c:1029:            if (scsi_cmnd->pdu.bhs.flags &
ISCSI_FLG_FINAL) {
kernel/iscsi.c:1070:            if (req->flags & ISCSI_FLG_FINAL) {
kernel/iscsi.c:1077:            if (!(req->flags & ISCSI_FLG_FINAL) &&
scsi_cmnd->r2t_length == 0)
kernel/iscsi.c:1080:            if (!(req->flags & ISCSI_FLG_FINAL))
kernel/iscsi.c:1173:    rsp_hdr->flags = ISCSI_FLG_FINAL;
kernel/iscsi.c:1236:            rsp_hdr->flags = ISCSI_FLG_FINAL;
kernel/iscsi.c:1267:    rsp_hdr->flags = ISCSI_FLG_FINAL;
kernel/iscsi.c:1423:            cmnd_set_sn(cmnd, (rsp->flags &
ISCSI_FLG_FINAL) ? 1 : 0);
usr/iscsi_hdr.h:135:#define ISCSI_FLG_FINAL                     0x80
usr/iscsid.c:605:       if (req->flags & ISCSI_FLG_FINAL)
usr/iscsid.c:606:               rsp->flags = ISCSI_FLG_FINAL;
usr/iscsid.c:620:       rsp->flags = ISCSI_FLG_FINAL;

see ISCSI_FLG_STATUS, only set while never be evaluated. 
see ISCSI_FLG_FINAL, set and evaluated here and there.

ming


On Tue, 2005-07-19 at 07:35 +0200, Arne Redlich wrote: 
> Am Montag, den 18.07.2005, 17:11 -0400 schrieb Ming Zhang:
> > Hi,
> > 
> > in do_send_data_rsp(), there is a 
> > rsp->flags = ISCSI_FLG_FINAL | ISCSI_FLG_STATUS;
> > 
> > but 
> > [mingz@amd64 iscsitarget-0.4.11]$ grep -rn ISCSI_FLG_STATUS *
> > kernel/iscsi_hdr.h:242:#define ISCSI_FLG_STATUS         0x01
> > kernel/iscsi.c:271:                     rsp->flags = ISCSI_FLG_FINAL |
> > ISCSI_FLG_STATUS;
> > 
> > i guess we shall get it removed?
> 
> No! The status flag is set in the last Data-In PDU of a sequence (hence
> the F-bit is set, too) and indicates that the data contains SCSI status
> information and that the residual count flags and field of the PDU are
> to be evaluated - see RFC3720, 10.7.
> 
> Arne
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Iscsitarget-devel mailing list
> Iscsitarget-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/iscsitarget-devel



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click


<Prev in Thread] Current Thread [Next in Thread>