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.