Re: [PATCH v2 24/44] libfc: Stop using the SCSI pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/9/22 00:10, Hannes Reinecke wrote:
On 2/8/22 18:24, Bart Van Assche wrote:
+struct bnx2fc_priv {
+    struct libfc_cmd_priv libfc_data; /* must be the first member */
+    struct bnx2fc_cmd *io_req;
+};
I am not sure this is correct.

Both, libfc and the fcoe drivers do use SCp.ptr, but from what I can see each in different ways. So I'm not sure that we need to stack the private data; we never did that previously.
Some more careful audit is required to separate out the usage here.

My understanding is that the bnx2fc driver works as follows:
- libfc and libfcoe are used for the slow path. These libraries use the 'fsp' member of struct libfc_cmd_priv (formerly CMD_SP(scsi_cmd)).
- bnx2fc_priv.io_req is only used for the fast path (hardware offloading).

I think it is safe to use different pointer members for the slow path and the fast path. Although this change is not essential, this allows to remove several pointer type casts from the bnx2fc driver.

Thanks,

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux