[Open-FCoE] [PATCH 1/2] fcoe: crc offload should be per frame
jeykholt at cisco.com
Sat Jan 31 22:06:14 UTC 2009
Yi Zou wrote:
> The CRC check on rx side should be per frame based, the LLD should set clear
> the flag FCPHF_CRC_UNCHECKED if CRC offload is successful for that frame.
> Signed-off-by: Yi Zou <yi.zou at intel.com>
> drivers/scsi/fcoe/libfcoe.c | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
> diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
> index 2960710..935c6f5 100644
> --- a/drivers/scsi/fcoe/libfcoe.c
> +++ b/drivers/scsi/fcoe/libfcoe.c
> @@ -625,9 +625,7 @@ int fcoe_percpu_receive_thread(void *arg)
> * it's solicited data, in which case, the FCP layer would
> * check it during the copy.
> - if (lp->crc_offload)
> - fr_flags(fp) &= ~FCPHF_CRC_UNCHECKED;
> - else
> + if (!lp->crc_offload)
> fr_flags(fp) |= FCPHF_CRC_UNCHECKED;
> fh = fc_frame_header_get(fp);
Looks good, just a couple questions:
If the NIC provides CRC offload, and it wants to check only some frames,
it'll have to set the UNCHECKED flag on the ones it doesn't check.
However, that flag is in the skb->cb. So, is the skb->>cb guaranteed to
be unused in any layers between the NIC and the fcoe module? Not sure
what those might be. Perhaps the vlan driver?
More information about the devel