RE: [RFC PATCH 0/4] iscsi: chap: introduce support for SHA1 and SHA3-256

2019-09-03 Thread Black, David
number of the people who will be involved in ensuring that the proverbial "right thing" happens, e.g., the Transport Area Directors. Thanks, --David > -Original Message- > From: Christoph Hellwig > Sent: Tuesday, September 3, 2019 3:00 AM > To: Maurizio Lombardi > C

Re: [PATCH v3 net-next] cxgb4/libcxgb/cxgb4i/cxgbit: enable eDRAM page pods for iSCSI

2019-06-10 Thread David Miller
From: Varun Prakash Date: Mon, 10 Jun 2019 18:36:34 +0530 > Page pods are used for direct data placement, this patch > enables eDRAM page pods if firmware supports this feature. > > Signed-off-by: Varun Prakash > --- > v3: reordered local variable declarations in reverse christmas tree format

Re: [PATCH] revert async probing of VMBus scsi device

2019-06-05 Thread David Miller
From: Christoph Hellwig Date: Wed, 5 Jun 2019 12:07:23 -0700 > On Wed, Jun 05, 2019 at 12:06:40PM -0700, Stephen Hemminger wrote: >> > Which is true for every device, and why we use UUIDs or label for >> > mounts that are supposed to be stable. >> >> Not everyone is smart enough to do that. > >

Re: [PATCH v2 net-next] cxgb4/libcxgb/cxgb4i/cxgbit: enable eDRAM page pods for iSCSI

2019-06-04 Thread David Miller
From: Varun Prakash Date: Tue, 4 Jun 2019 15:41:49 +0530 > +static int setup_ppod_edram(struct adapter *adap) > +{ > + int ret; > + unsigned int param, val; Reverse christmas tree please.

Re: [Patch v2] target/iscsi: fix possible condition with no effect (if == else)

2019-05-28 Thread David Disseldorp
nges in v2: treat SRP as unsupported authtype. >Remove unnecessary else >return 2 in all unsupported cases Reviewed-by: David Disseldorp Cheers, David

Re: [PATCH] target/iscsi: fix possible condition with no effect (if == else)

2019-05-27 Thread David Disseldorp
return 2; - else if (strstr("SPKM2", authtype)) - return 2; - else if (strstr("KRB5", authtype)) - return 2; - else - return 2; + /* SRP, SPKM1, SPKM2 and KRB5 are unsupported */ + return 2; } Cheers, David

Re: [PATCH v2 net-next 00/11] qed*: Improve performance on 100G link for offload protocols

2019-05-26 Thread David Miller
From: Michal Kalderon Date: Sun, 26 May 2019 15:22:19 +0300 > This patch series modifies the current implementation of PF selection. > The refactoring of the llh code enables setting additional filters > (mac / protocol) per PF, and improves performance for offload protocols > (RoCE, iWARP, iSCSI

RE: [PATCH v2 4/7] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags

2019-05-08 Thread David Laight
de which is dominated by its tracing!) then you don't want all the function calls and conditionals even if you want some of the functionality. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

Re: [PATCH net-next 07/10] qed*: Add iWARP 100g support

2019-05-01 Thread David Miller
From: Michal Kalderon Date: Wed, 1 May 2019 12:57:19 +0300 > diff --git a/drivers/infiniband/hw/qedr/main.c > b/drivers/infiniband/hw/qedr/main.c > index d93c8a893a89..8bc6775abb79 100644 > --- a/drivers/infiniband/hw/qedr/main.c > +++ b/drivers/infiniband/hw/qedr/main.c > @@ -52,6 +52,10 @@ MOD

RE: [PATCH 3/4] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags

2019-04-15 Thread David Laight
uppressing lines of zeros and dumping a buffer in several blocks then subsequent calls need to know that the last line of the previous call was suppressed zeros - and carry on with the same suppressed block. I've not looked to see if it does support suppressing lines of zeros/0xff.

RE: [PATCH 1/4] lib/hexdump.c: Allow 64 bytes per line

2019-04-15 Thread David Laight
The function shouldn't dictate what the > caller can and can't do beyond the technical limits of it's implementation. Why powers of two? You may want the length to match sizeof (struct foo). You might even want the address increment to be larger that the number of lines dumped.

Re: [PATCH 1/1] target:separate tx/rx cmd_puds

2019-04-15 Thread David Disseldorp
[replying to an old thread] On Sun, 8 Apr 2018 11:57:18 +0800, Zhang Zhuoyu wrote: > > On Thu, 5 Apr 2018 13:12:12 +0200, David Disseldorp wrote: > > > > > > -CONFIGFS_ATTR_RO(target_stat_tgt_port_, in_cmds); > > > > +CONFIGFS_ATTR_RO(target_stat_tgt_port_,

RE: [PATCH 3/4] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags

2019-04-15 Thread David Laight
t bytes. In that case you may want hexdump to return the flags for the next call when a large buffer is being dumped in fragments. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

RE: [PATCH 4/4] lib/hexdump.c: Allow multiple groups to be separated by lines '|'

2019-04-10 Thread David Laight
ly counted. I'm not even sure that is needed if you are printing 32bit words. OTOH 32bit words makes 64bit values really stupid on LE systems. Bytes with extra spaces every 4 bytes is the format I prefer even for long lines. Oh, and if you are using hexdump() a lot you want a version th

Re: Userspace regression with 6baca7601bde ("scsi: target: drop unused pi_prot_format attribute storage")

2019-02-03 Thread David Disseldorp
with open(path, 'r') as file_fd: > > PermissionError: [Errno 13] Permission denied: > > '/sys/kernel/config/target/core/fileio_28/xxx/attrib/pi_prot_format' > > This looks like an intentional behavior change with > > commit 6baca7601bdee2e57f20

Re: [RFC PATCH] target: sanitize ALUA and PR state file paths before use

2018-12-10 Thread David Disseldorp
e code. Sounds reasonable, although that would leave us with the task of migrating consumers of the existing unit-serial-number derived paths to use the new state file locations. > Regarding testing ALUA code: I use sg_rtpg and sg_stpg to test SCSI target > ALUA code. Thanks, I'll have a play with them. Cheers, David

Re: [RFC PATCH] target: sanitize ALUA and PR state file paths before use

2018-12-10 Thread David Disseldorp
Ping - any feedback on this change? On Thu, 22 Nov 2018 14:38:00 +0100, David Disseldorp wrote: > Block ALUA and PR state storage if any of the dynamic subdirectory > components include a path separator. > > Fixes: c66ac9db8d4a ("[SCSI] target: Add LIO target core v4.0.0-rc6&

Re: [PATCH v7 3/5] target: add device vendor_id configfs attribute

2018-12-06 Thread David Disseldorp
d, the comment should refer to page 0x83. @Martin: all patches in this series have now been reviewed+acked. Can you fix the above comment (s/0x80/0x83) if/when you merge, or should I resend the series with this fixed? Cheers, David

[PATCH v7 3/5] target: add device vendor_id configfs attribute

2018-12-05 Thread David Disseldorp
t when the backstore device is enabled. Signed-off-by: David Disseldorp --- drivers/target/target_core_configfs.c | 70 +++ 1 file changed, 70 insertions(+) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 82

[PATCH v7 2/5] target: consistently null-terminate t10_wwn strings

2018-12-05 Thread David Disseldorp
fiers instead. Signed-off-by: David Disseldorp --- drivers/target/target_core_configfs.c | 16 +++ drivers/target/target_core_device.c | 46 ++-- drivers/target/target_core_pscsi.c| 50 +++ drivers/target/target_core_

[PATCH v7 5/5] target: perform t10_wwn ID initialisation in target_alloc_device()

2018-12-05 Thread David Disseldorp
outside of ConfigFS. Signed-off-by: David Disseldorp Reviewed-by: Roman Bolshakov --- drivers/target/target_core_device.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index eb

[PATCH v7 1/5] target: use consistent left-aligned ASCII INQUIRY data

2018-12-05 Thread David Disseldorp
the standard INQUIRY data as well as the T10 VENDOR IDENTIFICATION field in the INQUIRY Device Identification VPD Page are zero-terminated/zero-padded. Fix this inconsistency by using space-padding for all of the above fields. Signed-off-by: David Disseldorp Reviewed-by: Christoph Hellwig

[PATCH v7 0/5] target: user configurable T10 Vendor ID

2018-12-05 Thread David Disseldorp
consistent INQUIRY data padding as a separate patch - Drop t10_wwn.model buffer print fix, already upstream Changes since v1: - https://www.spinics.net/lists/target-devel/msg10545.html - Rebase against nab's for-next branch, which includes Christoph's configfs API changes. David Disseld

[PATCH v7 4/5] target: remove hardcoded T10 Vendor ID in INQUIRY response

2018-12-05 Thread David Disseldorp
Use the value stored in t10_wwn.vendor, which defaults to "LIO-ORG", but can be reconfigured via the vendor_id ConfigFS attribute. Signed-off-by: David Disseldorp Reviewed-by: Bryant G. Ly Reviewed-by: Lee Duncan Reviewed-by: Hannes Reinecke Reviewed-by: Roman Bolshakov --- driv

Re: [PATCH v6 3/5] target: add device vendor_id configfs attribute

2018-12-04 Thread David Disseldorp
t; > + sizeof(dev->t10_wwn.vendor)); > > + > > Should we allow non-ASCII characters? No :) > It's okay to strip final newline > for convenience. A simple loop would ensure the rest is conformant to > SPC. EINVAL can be returned otherwise. I'll add an isascii() loop in the next round. Cheers, David

Re: [PATCH v6 3/5] target: add device vendor_id configfs attribute

2018-12-04 Thread David Disseldorp
up. That means in the actual INQUIRY commands it > will still return vendor_id of the underlying storage. If that's that's > true, this means an attempt to set vendor_id will be succesful but it > won't do what's intended for. That's correct. Cheers, David

Re: [PATCH v5 2/5] target: consistently null-terminate t10_wwn strings

2018-12-04 Thread David Disseldorp
On Tue, 4 Dec 2018 14:31:57 +0300, Roman Bolshakov wrote: > On Sat, Dec 01, 2018 at 12:34:20AM +0100, David Disseldorp wrote: ... > > diff --git a/drivers/target/target_core_configfs.c > > b/drivers/target/target_core_configfs.c > > index f6b1549f4142..34872f24e8bf 100

[PATCH v6 3/5] target: add device vendor_id configfs attribute

2018-12-04 Thread David Disseldorp
t when the backstore device is enabled. Signed-off-by: David Disseldorp Reviewed-by: Bryant G. Ly Reviewed-by: Lee Duncan Reviewed-by: Hannes Reinecke --- drivers/target/target_core_configfs.c | 48 +++ 1 file changed, 48 insertions(+) diff --git a/driv

[PATCH v6 1/5] target: use consistent left-aligned ASCII INQUIRY data

2018-12-04 Thread David Disseldorp
the standard INQUIRY data as well as the T10 VENDOR IDENTIFICATION field in the INQUIRY Device Identification VPD Page are zero-terminated/zero-padded. Fix this inconsistency by using space-padding for all of the above fields. Signed-off-by: David Disseldorp Reviewed-by: Christoph Hellwig

[PATCH v6 2/5] target: consistently null-terminate t10_wwn strings

2018-12-04 Thread David Disseldorp
fiers instead. Signed-off-by: David Disseldorp Reviewed-by: Hannes Reinecke --- drivers/target/target_core_configfs.c | 14 +++--- drivers/target/target_core_device.c | 49 --- drivers/target/target_core_pscsi.c| 18 - drivers/t

[PATCH v6 4/5] target: remove hardcoded T10 Vendor ID in INQUIRY response

2018-12-04 Thread David Disseldorp
Use the value stored in t10_wwn.vendor, which defaults to "LIO-ORG", but can be reconfigured via the vendor_id ConfigFS attribute. Signed-off-by: David Disseldorp Reviewed-by: Bryant G. Ly Reviewed-by: Lee Duncan Reviewed-by: Hannes Reinecke --- drivers/target/target_core

[PATCH v6 5/5] target: perform t10_wwn ID initialisation in target_alloc_device()

2018-12-04 Thread David Disseldorp
y used for anything outside of ConfigFS. Signed-off-by: David Disseldorp --- drivers/target/target_core_device.c | 27 ++- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index 55

[PATCH v6 0/5] target: user configurable T10 Vendor ID

2018-12-04 Thread David Disseldorp
This patch-set allows for the modification of the T10 Vendor Identification string returned in the SCSI INQUIRY response, via the target/core/$backstore/$name/wwn/vendor_id ConfigFS path. Changes since v5: - remove unnecessary TRANSPORT_FLAG_PASSTHROUGH conditional from t10_wwn ID defaults initi

Re: [PATCH v5 5/5] target: perform t10_wwn ID initialisation in target_alloc_device()

2018-12-03 Thread David Disseldorp
On Sun, 2 Dec 2018 23:22:23 +0100, David Disseldorp wrote: > > > + if (!(dev->transport->transport_flags & TRANSPORT_FLAG_PASSTHROUGH)) { > > > + strlcpy(dev->t10_wwn.vendor, "LIO-ORG", > > > + sizeof(dev->t10_wwn.vend

Re: [PATCH v5 5/5] target: perform t10_wwn ID initialisation in target_alloc_device()

2018-12-02 Thread David Disseldorp
Hi Hannes, Thanks for the feedback... On Sat, 1 Dec 2018 15:59:25 +0100, Hannes Reinecke wrote: > On 12/1/18 12:34 AM, David Disseldorp wrote: ... > > @@ -810,6 +810,23 @@ struct se_device *target_alloc_device(struct se_hba > > *hba, const char *name) > >

[PATCH v5 4/5] target: remove hardcoded T10 Vendor ID in INQUIRY response

2018-11-30 Thread David Disseldorp
Use the value stored in t10_wwn.vendor, which defaults to "LIO-ORG", but can be reconfigured via the vendor_id ConfigFS attribute. Signed-off-by: David Disseldorp Reviewed-by: Bryant G. Ly Reviewed-by: Lee Duncan --- drivers/target/target_core_spc.c | 8 +--- 1 file changed, 5

[PATCH v5 0/5] target: user configurable T10 Vendor ID

2018-11-30 Thread David Disseldorp
nfigfs API changes. David Disseldorp (5): target: use consistent left-aligned ASCII INQUIRY data target: consistently null-terminate t10_wwn strings target: add device vendor_id configfs attribute target: remove hardcoded T10 Vendor ID in INQUIRY response target: perfo

[PATCH v5 5/5] target: perform t10_wwn ID initialisation in target_alloc_device()

2018-11-30 Thread David Disseldorp
Initialise the t10_wwn vendor, model and revision defaults when a device is allocated instead of when it's enabled. This ensures that custom vendor or model strings set prior to enablement are not later overwritten with default values. Signed-off-by: David Disseldorp --- drivers/t

[PATCH v5 2/5] target: consistently null-terminate t10_wwn strings

2018-11-30 Thread David Disseldorp
fiers instead. Signed-off-by: David Disseldorp --- drivers/target/target_core_configfs.c | 14 +++--- drivers/target/target_core_device.c | 49 --- drivers/target/target_core_pscsi.c| 18 - drivers/target/target_core_spc.c | 7 ++--- dr

[PATCH v5 3/5] target: add device vendor_id configfs attribute

2018-11-30 Thread David Disseldorp
t when the backstore device is enabled. Signed-off-by: David Disseldorp Reviewed-by: Bryant G. Ly Reviewed-by: Lee Duncan --- drivers/target/target_core_configfs.c | 48 +++ 1 file changed, 48 insertions(+) diff --git a/drivers/target/target_core_configfs.c b/driv

[PATCH v5 1/5] target: use consistent left-aligned ASCII INQUIRY data

2018-11-30 Thread David Disseldorp
the standard INQUIRY data as well as the T10 VENDOR IDENTIFICATION field in the INQUIRY Device Identification VPD Page are zero-terminated/zero-padded. Fix this inconsistency by using space-padding for all of the above fields. Signed-off-by: David Disseldorp Reviewed-by: Christoph Hellwig

Re: [PATCH RFC 00/15] Zero ****s, hugload of hugs <3

2018-11-30 Thread David Miller
From: Jarkko Sakkinen Date: Fri, 30 Nov 2018 13:44:05 -0800 > On Fri, Nov 30, 2018 at 01:01:02PM -0800, James Bottomley wrote: >> No because use of what some people consider to be bad language isn't >> necessarily abusive, offensive or degrading. Our most heavily censored >> medium is TV and "fu

Re: [PATCH RFC 00/15] Zero ****s, hugload of hugs <3

2018-11-30 Thread David Miller
From: Jarkko Sakkinen Date: Fri, 30 Nov 2018 13:42:33 -0800 > Can you tell how the CoC should be interpreted then? Regardless of what I think, as others have showen the CoC explicitly does not apply to existing code.

Re: [PATCH RFC 00/15] Zero ****s, hugload of hugs <3

2018-11-30 Thread David Miller
From: Abuse Date: Fri, 30 Nov 2018 20:39:01 + > I assume I will now be barred. Perhaps, but not because you said fuck. It would be because you're intentionally creating a disturbance on the list and making it more difficult for developers to get their work done and intentionally creating a

Re: [PATCH RFC 00/15] Zero ****s, hugload of hugs <3

2018-11-30 Thread David Miller
From: Jens Axboe Date: Fri, 30 Nov 2018 13:12:26 -0700 > On 11/30/18 12:56 PM, Davidlohr Bueso wrote: >> On Fri, 30 Nov 2018, Kees Cook wrote: >> >>> On Fri, Nov 30, 2018 at 11:27 AM Jarkko Sakkinen >>> wrote: In order to comply with the CoC, replace with a hug. >> >> I hope thi

Re: [PATCH RFC 00/15] Zero ****s, hugload of hugs <3

2018-11-30 Thread David Miller
From: Davidlohr Bueso Date: Fri, 30 Nov 2018 11:56:52 -0800 > I hope this is some kind of joke. Whether or not it is a joke, it is censorship. And because of that I have no intention to apply any patches like this to any code I am in charge of.

Re: [PATCH v4 6/7] target: remove hardcoded T10 Vendor ID in INQUIRY response

2018-11-30 Thread David Disseldorp
On Fri, 30 Nov 2018 14:17:49 +0100, David Disseldorp wrote: > > Where is the code that initializes dev->t10_wwn.vendor to "LIO-ORG"? Did I > > perhaps overlook something? > > This is done in target_configure_device() . Hmm, continuing to do it there may cause

Re: [PATCH v4 6/7] target: remove hardcoded T10 Vendor ID in INQUIRY response

2018-11-30 Thread David Disseldorp
of which it is guaranteed that its length is less than or equal to > the second strnlen() argument? Belt and braces :) Actually, I think it's a little more readable this way. Cheers, David

Re: [PATCH v4 1/7] target: use consistent left-aligned ASCII INQUIRY data

2018-11-30 Thread David Disseldorp
> > I dislike that you are using 0x20 here (and below) instead of ' '. Given that this patch already has a couple of reviewed-bys, I'd prefer to avoid respinning it for this. Besides, I think the comment above makes it pretty clear. Thanks for your feedback. Cheers, David

Re: [PATCH v4 5/7] target: add device vendor_id configfs attribute

2018-11-29 Thread David Disseldorp
gt; INQUIRY_VENDOR_LEN bytes long? It does. As mentioned in v3, this follows the convention used in target_wwn_vpd_unit_serial_store(). I don't feel too strongly about it, but it does make buf allocation a little less error prone IMO. Cheers, David

Re: [PATCH v4 3/7] target: consistently null-terminate t10_wwn.model

2018-11-29 Thread David Disseldorp
On Thu, 29 Nov 2018 08:24:38 -0800, Bart Van Assche wrote: > On Thu, 2018-11-29 at 02:01 +0100, David Disseldorp wrote: > > diff --git a/drivers/target/target_core_configfs.c > > b/drivers/target/target_core_configfs.c > > index f6b1549f4142..9f49b1afd685 100644 >

[PATCH v4 3/7] target: consistently null-terminate t10_wwn.model

2018-11-28 Thread David Disseldorp
th to avoid changing the model string for existing deployments. Signed-off-by: David Disseldorp --- drivers/target/target_core_configfs.c | 8 +--- drivers/target/target_core_device.c | 8 +--- drivers/target/target_core_pscsi.c| 6 -- drivers/target/target_core_spc.c

[PATCH v4 7/7] target: use printf width specifier for t10_wwn field dumps

2018-11-28 Thread David Disseldorp
From: Bart Van Assche The existing for loops step over null-terminators for right-padding. Padding can be achieved in a much simpler way using printf width specifiers. Signed-off-by: David Disseldorp --- drivers/target/target_core_device.c | 35 --- drivers

[PATCH v4 6/7] target: remove hardcoded T10 Vendor ID in INQUIRY response

2018-11-28 Thread David Disseldorp
Use the value stored in t10_wwn.vendor, which defaults to "LIO-ORG", but can be reconfigured via the vendor_id ConfigFS attribute. Signed-off-by: David Disseldorp --- drivers/target/target_core_spc.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/driv

[PATCH v4 4/7] target: consistently null-terminate t10_wwn.revision

2018-11-28 Thread David Disseldorp
The pscsi_set_inquiry_info() codepath doesn't currently explicitly null-terminate t10_wwn.revision. Add an extra byte to the t10_wwn.model buffer and perform null string termination in all cases. Signed-off-by: David Disseldorp --- drivers/target/target_core_device.c | 6 -- drivers/t

[PATCH v4 5/7] target: add device vendor_id configfs attribute

2018-11-28 Thread David Disseldorp
t when the backstore device is enabled. Signed-off-by: David Disseldorp --- drivers/target/target_core_configfs.c | 48 +++ 1 file changed, 48 insertions(+) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 9f

[PATCH v4 2/7] target: consistently null-terminate t10_wwn.vendor

2018-11-28 Thread David Disseldorp
In preparation for supporting user provided vendor strings, add an extra byte to t10_wwn.vendor which will ensure null string termination when an eight byte vendor string is provided by the user. Signed-off-by: David Disseldorp --- drivers/target/target_core_device.c | 6 -- drivers/target

[PATCH v4 0/7] target: user configurable T10 Vendor ID

2018-11-28 Thread David Disseldorp
://www.spinics.net/lists/target-devel/msg10545.html - Rebase against nab's for-next branch, which includes Christoph's configfs API changes. Bart Van Assche (1): target: use printf width specifier for t10_wwn field dumps David Disseldorp (6): target: use consistent left-aligned ASCII IN

[PATCH v4 1/7] target: use consistent left-aligned ASCII INQUIRY data

2018-11-28 Thread David Disseldorp
the standard INQUIRY data as well as the T10 VENDOR IDENTIFICATION field in the INQUIRY Device Identification VPD Page are zero-terminated/zero-padded. Fix this inconsistency by using space-padding for all of the above fields. Signed-off-by: David Disseldorp Reviewed-by: Christoph Hellwig

Re: [PATCH v3 3/4] target: add device vendor_id configfs attribute

2018-11-28 Thread David Disseldorp
? Your patch looks good to me. Mind if I tack it on to the end of my t10_wwn.vendor/model/revision[size+1] patchset, with your authorship? Cheers, David

Re: [PATCH v3 3/4] target: add device vendor_id configfs attribute

2018-11-28 Thread David Disseldorp
t just thought I'd mention that the zeroing of unused bytes is still required due to the scsi_dump_inquiry() + target_stat_lu_vend_show() behaviour. Cheers, David

Re: [PATCH v3 3/4] target: add device vendor_id configfs attribute

2018-11-28 Thread David Disseldorp
On Tue, 20 Nov 2018 19:00:57 +0100, David Disseldorp wrote: > > > + strncpy(buf, page, sizeof(buf)); > > > > Isn't strncpy() deprecated? How about using strlcpy() instead? > > Will change to use strlcpy in the next round. Just a follow up here. I think i

Re: [PATCH net-next] cxgb4: use new fw interface to get the VIN and smt index

2018-11-23 Thread David Miller
From: Ganesh Goudar Date: Wed, 21 Nov 2018 13:40:24 +0530 > From: Santosh Rastapur > > If the fw supports returning VIN/VIVLD in FW_VI_CMD save it > in port_info structure else retrieve these from viid and save > them in port_info structure. Do the same for smt_idx from > FW_VI_MAC_CMD > > Si

Re: [PATCH] target: drop unnecessary get_fabric_name() accessor from fabric_ops

2018-11-23 Thread David Disseldorp
On Fri, 23 Nov 2018 11:22:08 +0100, David Disseldorp wrote: > > > Both fabric_ops.get_fabric_name() and fabric_ops.name are user facing, > > > with the former being used for PR/ALUA state and the latter for configFS > > > (config/target/$name), so we unfortunatel

[PATCH 2/3] target: drop unnecessary get_fabric_name() accessor from fabric_ops

2018-11-23 Thread David Disseldorp
unfortunately need to keep both strings around for now. Replace the useless .get_fabric_name() accessor function with a const string fabric_name member variable. Signed-off-by: David Disseldorp --- drivers/infiniband/ulp/srpt/ib_srpt.c| 7 +-- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 7

[PATCH 0/3] target: drop unneeded pi_prot_format and get_fabric_name()

2018-11-23 Thread David Disseldorp
() - use a new fabric_ops.fabric_alias member to handle the iscsi_target_mod special case. Cheers, David David Disseldorp (3): target: drop unused pi_prot_format attribute storage target: drop unnecessary get_fabric_name() accessor from fabric_ops target: replace fabric_ops.name

[PATCH 3/3] target: replace fabric_ops.name with fabric_alias

2018-11-23 Thread David Disseldorp
x27;t initialised. iscsi_target_mod is the only fabric module to set .fabric_alias . All other fabric modules rely on .fabric_name matching and can drop the duplicate string. Signed-off-by: David Disseldorp --- drivers/infiniband/ulp/srpt/ib_srpt.c| 1 - drivers/scsi/ibmvscsi_tgt/ibmvscsi_

[PATCH 1/3] target: drop unused pi_prot_format attribute storage

2018-11-23 Thread David Disseldorp
-by: David Disseldorp --- drivers/target/target_core_configfs.c | 3 +-- include/target/target_core_base.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 70b9f6755c36..62427acdf503 100644

Re: [PATCH] target: drop unnecessary get_fabric_name() accessor from fabric_ops

2018-11-23 Thread David Disseldorp
On Thu, 22 Nov 2018 23:19:10 -0800, Christoph Hellwig wrote: > On Thu, Nov 22, 2018 at 03:16:23PM +0100, David Disseldorp wrote: > > All fabrics return a const string. In all cases *except* iSCSI the > > get_fabric_name() string matches fabric_ops.name. > > > > Both

Re: [PATCH net-next] cxgb4: use new fw interface to get the VIN and smt index

2018-11-22 Thread David Miller
From: Jason Gunthorpe Date: Wed, 21 Nov 2018 19:46:24 -0700 > On Wed, Nov 21, 2018 at 01:40:24PM +0530, Ganesh Goudar wrote: >> From: Santosh Rastapur >> >> If the fw supports returning VIN/VIVLD in FW_VI_CMD save it >> in port_info structure else retrieve these from viid and save >> them in p

[PATCH] target: drop unnecessary get_fabric_name() accessor from fabric_ops

2018-11-22 Thread David Disseldorp
unfortunately need to keep both strings around for now. Replace the useless .get_fabric_name() accessor function with a const string fabric_name member variable. Signed-off-by: David Disseldorp --- Note: This conflicts with: [RFC PATCH] target: sanitize ALUA and PR state file paths before use I&#x

[RFC PATCH] target: sanitize ALUA and PR state file paths before use

2018-11-22 Thread David Disseldorp
Block ALUA and PR state storage if any of the dynamic subdirectory components include a path separator. Fixes: c66ac9db8d4a ("[SCSI] target: Add LIO target core v4.0.0-rc6") Signed-off-by: David Disseldorp Signed-off-by: Lee Duncan --- Note: Submitted as an RFC, as I've not prop

Re: [PATCH v3 3/4] target: add device vendor_id configfs attribute

2018-11-20 Thread David Disseldorp
On Tue, 20 Nov 2018 09:24:39 -0800, Bart Van Assche wrote: > On Mon, 2018-11-19 at 22:06 +0100, David Disseldorp wrote: > > /* > > + * STANDARD and VPD page 0x80 T10 Vendor Identification > > + */ > > +static ssize_t target_wwn_vendor_id_show(struct config_item *item,

Re: [PATCH v3 2/4] target: don't assume t10_wwn.vendor is null terminated

2018-11-20 Thread David Disseldorp
On Tue, 20 Nov 2018 08:49:24 -0800, Christoph Hellwig wrote: > This could use a little more explanation, the code doesn't just > add a little if but also changes the existing case. Also where > can't it be null currently? I'll add an explanation in the next round. This patch shouldn't cause any

[PATCH v3 1/4] target: use consistent left-aligned ASCII INQUIRY data

2018-11-19 Thread David Disseldorp
the standard INQUIRY data as well as the T10 VENDOR IDENTIFICATION field in the INQUIRY Device Identification VPD Page are zero-terminated/zero-padded. Fix this inconsistency by using space-padding for all of the above fields. Signed-off-by: David Disseldorp --- drivers/target/target_core_spc.c

[PATCH v3 2/4] target: don't assume t10_wwn.vendor is null terminated

2018-11-19 Thread David Disseldorp
Signed-off-by: David Disseldorp --- drivers/target/target_core_stat.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/target/target_core_stat.c b/drivers/target/target_core_stat.c index f0db91ebd735..89f35167f036 100644 --- a/drivers/target

[PATCH v3 4/4] target: remove hardcoded T10 Vendor ID in INQUIRY response

2018-11-19 Thread David Disseldorp
Use the value stored in t10_wwn.vendor, which defaults to "LIO-ORG", but can be reconfigured via the vendor_id ConfigFS attribute. Signed-off-by: David Disseldorp --- drivers/target/target_core_spc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/driv

[PATCH v3 0/4] target: user configurable T10 Vendor ID

2018-11-19 Thread David Disseldorp
PI changes. David Disseldorp (4): target: use consistent left-aligned ASCII INQUIRY data target: don't assume t10_wwn.vendor is null terminated target: add device vendor_id configfs attribute target: remove hardcoded T10 Vendor ID in INQUIRY response drivers/target/target_

[PATCH v3 3/4] target: add device vendor_id configfs attribute

2018-11-19 Thread David Disseldorp
t when the backstore device is enabled. Signed-off-by: David Disseldorp --- drivers/target/target_core_configfs.c | 55 +++ include/target/target_core_base.h | 3 +- 2 files changed, 57 insertions(+), 1 deletion(-) diff --git a/drivers/target/target_core_con

Re: [PATCH v5] target: add emulate_pr backstore attr to toggle PR support

2018-11-19 Thread David Disseldorp
Ping, did anyone get a chance to look at this one? Cheers, David

Re: [RFC PATCH 0/3] target: remove some unused stats

2018-11-16 Thread David Disseldorp
anything stopping us from plumbing them into the corresponding error paths, so I'll withdraw this patchset. Cheers, David

RE: [PATCH] drivers/scsi/fnic/fnic_trace.c: Use vzalloc

2018-11-14 Thread David Laight
s, but if you cast it to a non-pointer type (which this is doing) > the compiler will complain if there is no explicit cast. The real question is why is this code using 'unsigned long' to hold pointers? Never mind why it is allocating a large memory block then setting up another array

[PATCH v5] target: add emulate_pr backstore attr to toggle PR support

2018-11-07 Thread David Disseldorp
s to block such requests, avoiding the multi-node reservation state propagation. When explicitly disabled, PR and RESERVE/RELEASE requests receive Invalid Command Operation Code response sense data. Signed-off-by: David Disseldorp --- drivers/target/target_core_configfs.c

Re: [PATCH v4] target: add emulate_pr backstore attr to toggle PR support

2018-11-07 Thread David Disseldorp
d > TRANSPORT_FLAG_PASSTHROUGH_PGR is set, userspace cannot detect what the > backend supports. We would have to temporarily set emaulate_pr sow e can > read the file then clear it. Agreed, that'd be awkward and is unnecessary given the presence of both configfs attributes. I'll send a new version which drops this hunk. Cheers, David

[PATCH v4] target: add emulate_pr backstore attr to toggle PR support

2018-10-30 Thread David Disseldorp
s to block such requests, avoiding the need for multi-node reservation state propagation. When explicitly disabled, PR and RESERVE/RELEASE requests receive Invalid Command Operation Code response sense data. Signed-off-by: David Disseldorp --- drivers/target/target_core_configfs.c

Re: [RFC PATCH 0/3] target: remove some unused stats

2018-10-29 Thread David Disseldorp
On Wed, 17 Oct 2018 17:48:17 +0200, David Disseldorp wrote: > This patchset removes a couple of unused error stat counters and a > redundant cumulative counter. > I've tagged this patchset RFC, as it may be considered a kernel<->user > (configfs) API change. Ping, any th

RE: [PATCH] scsi: aic7xxx: Fix unintended sign extension issue

2018-10-25 Thread David Laight
undefined (signed integer overflow can do anything it likes). By far the best fix is to change the return type of ahc_inb() to be 'unsigned int'. On systems without byte sized registers (about everything except x86) this will almost certainly generate better code. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

[RFC PATCH 2/3] target: remove unused session PDU-format-errors metric

2018-10-17 Thread David Disseldorp
Signed-off-by: David Disseldorp --- drivers/target/iscsi/iscsi_target_stat.c | 14 +- include/target/iscsi/iscsi_target_stat.h | 2 -- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target_stat.c b/drivers/target/iscsi/iscsi_target_stat.c

[RFC PATCH 3/3] target: remove cumulative session errors metric

2018-10-17 Thread David Disseldorp
The cumulative session errors metric matches cxn_timeout_errors, so drop the duplicate. Signed-off-by: David Disseldorp --- drivers/target/iscsi/iscsi_target_stat.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target_stat.c b/drivers/target

[RFC PATCH 1/3] target: remove unused session digest-errors metric

2018-10-17 Thread David Disseldorp
Signed-off-by: David Disseldorp --- drivers/target/iscsi/iscsi_target_stat.c | 14 +- include/target/iscsi/iscsi_target_stat.h | 2 -- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target_stat.c b/drivers/target/iscsi/iscsi_target_stat.c

[RFC PATCH 0/3] target: remove some unused stats

2018-10-17 Thread David Disseldorp
This patchset removes a couple of unused error stat counters and a redundant cumulative counter. I've tagged this patchset RFC, as it may be considered a kernel<->user (configfs) API change. Cheers, David --- drivers/target/iscsi/iscsi_target_

Re: [PATCH v3 4/5] target: split out helper for cxn timeout error stashing

2018-10-16 Thread David Disseldorp
to 4.20/scsi-queue. Thanks Martin. Cheers, David

Re: [PATCH v3 4/5] target: split out helper for cxn timeout error stashing

2018-10-14 Thread David Disseldorp
) This patch is a v3 respin of an individual patch within the series: [PATCH v2 0/5] target: improve Data-Out and NOP timeout error reporting The sess declaration is provided in [PATCH v2 3/5]. I guess I'll resend entire series in future to avoid false kbuild reports. Cheers, David

[PATCH v3] target: split out helper for cxn timeout error stashing

2018-10-13 Thread David Disseldorp
Replace existing nested code blocks with helper function calls. Signed-off-by: David Disseldorp --- drivers/target/iscsi/iscsi_target_erl0.c | 15 + drivers/target/iscsi/iscsi_target_util.c | 36 ++-- drivers/target/iscsi/iscsi_target_util.h | 1 + 3

Re: [PATCH v2 4/5] target: split out helper for cxn timeout error stashing

2018-10-13 Thread David Disseldorp
. If that > not's the case, how about using strlcpy() to make it easy for anyone who > reads the source code that no output buffer overflow will occur? Both arrays are the same size (ISCSI_IQN_LEN). I'll change this over to use strlcpy(), as I agree that it helps readability. Cheers, David

[PATCH v2 0/5] target: improve Data-Out and NOP timeout error reporting

2018-10-12 Thread David Disseldorp
-lio-trigger-dataout-timeout https://github.com/ddiss/libiscsi/tree/hack-lio-trigger-nop-timeout Cheers, David --- Changes since v1 - split out and use a helper function for cxn timeout error stashing - add I_T Nexus to error messages drivers/target/iscsi/iscsi_target_erl0.c | 15

[PATCH v2 5/5] target: stash sess_err_stats on Data-Out timeout

2018-10-12 Thread David Disseldorp
sess_err_stats are currently filled on NOP ping timeout, but not Data-Out timeout. Stash details of Data-Out timeouts using a ISCSI_SESS_ERR_CXN_TIMEOUT value for last_sess_failure_type. Signed-off-by: David Disseldorp --- drivers/target/iscsi/iscsi_target_erl1.c | 1 + 1 file changed, 1

[PATCH v2 2/5] target: log Data-Out timeouts as errors

2018-10-12 Thread David Disseldorp
Data-Out timeouts resulting in connection outages should be logged as errors. Include the I_T Nexus in the message to aid path identification. Signed-off-by: David Disseldorp --- drivers/target/iscsi/iscsi_target_erl1.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions

[PATCH v2 4/5] target: split out helper for cxn timeout error stashing

2018-10-12 Thread David Disseldorp
Replace existing nested code blocks with helper function calls. Signed-off-by: David Disseldorp --- drivers/target/iscsi/iscsi_target_erl0.c | 15 +- drivers/target/iscsi/iscsi_target_util.c | 35 +--- drivers/target/iscsi/iscsi_target_util.h | 1 + 3

[PATCH v2 3/5] target: log NOP ping timeouts as errors

2018-10-12 Thread David Disseldorp
Events resulting in connection outages like this should be logged as errors. Include the I_T Nexus in the message to aid path identification. Signed-off-by: David Disseldorp --- drivers/target/iscsi/iscsi_target_util.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a

  1   2   3   4   5   6   7   >