[Open-FCoE] CRC errors in target

Joe Eykholt jeykholt at cisco.com
Sun Apr 26 19:34:42 UTC 2009



Karthik G Balaji wrote:
> On Sat, Apr 25, 2009 at 10:40 AM, Joe Eykholt <jeykholt at cisco.com 
> <mailto:jeykholt at cisco.com>> wrote:
> 
> 
> 
>     Karthik G Balaji wrote:
> 
>         I am trying to bring up sw-target to the latest kernel. My setup
>         is as
>         follows,
> 
>         Initiator  - 2.6.30-rc2 (From linux git tree)
>         Target  - Trying to build it in 2.6.29.1
>         Mode  - Point to Point
> 
>         After the entire setup when I initiate a connection , the target
>         drops all
>         the FLOGI packets due to CRC errors. I observed the following
>         messages in
>         the target machine(After compiling with debug mode). Initiator
>         seems to be
>         sane and it retries continuously and hence these messages occur
>         repeatedly
>         in the target machine.
> 
>         Is this occuring due to the compatibility issues between the latest
>         initiator and target ?
> 
> 
>         Apr 25 02:06:19 kb-xen kernel: [10544.396376] frame with CRC
>         error 010101 ->
>         010102 xids 014c ffff ELS req ELS PLOGI
>         Apr 25 02:06:19 kb-xen kernel: [10544.400015] fcoe_xmit      
>         000000 ->
>         fffffe xids 00c4 ffff ELS req ELS FLOGI
>         Apr 25 02:06:19 kb-xen kernel: [10544.400540] fcoe_rcv:
>         skb_info: len:166
>         data_len:0 head:c7578000 data:c7578020 tail:c75780c6
>         end:c7578100 sum:0
>         dev:eth0
>         Apr 25 02:06:19 kb-xen kernel: [10544.400549]
>         fcoe_percpu_receive_thread:
>         skb_info: len:166 data_len:0 head:c7578000 data:c7578020
>         tail:c75780c6
>         end:c7578100 sum:0 dev:eth0
>         Apr 25 02:06:19 kb-xen kernel: [10544.400553]
>         fcoe_percpu_receive_thread:
>         dropping frame with CRC error
>         Apr 25 02:06:19 kb-xen kernel: [10544.400556] frame with CRC
>         error fffffe ->
>         000000 xids 00c4 014d ELS rep ELS LS_ACC
>         Apr 25 02:06:19 kb-xen kernel: [10544.400675] fcoe_rcv:
>         skb_info: len:66
>         data_len:0 head:e586e000 data:e586e020 tail:e586e062
>         end:e586e100 sum:0
>         dev:eth0
>         Apr 25 02:06:19 kb-xen kernel: [10544.400683]
>         fcoe_percpu_receive_thread:
>         skb_info: len:66 data_len:0 head:e586e000 data:e586e020
>         tail:e586e062
>         end:e586e100 sum:0 dev:eth0
>         Apr 25 02:06:19 kb-xen kernel: [10544.400686]
>         fcoe_percpu_receive_thread:
>         dropping frame with CRC error
>         Apr 25 02:06:19 kb-xen kernel: [10544.400690] frame with CRC
>         error 010101 ->
>         010102 xids 014e ffff ELS req ELS LOGO
>         Apr 25 02:06:19 kb-xen kernel: [10544.400893] fcoe_rcv:
>         skb_info: len:166
>         data_len:0 head:ed683000 data:ed683020 tail:ed6830c6
>         end:ed683100 sum:0
>         dev:eth0
>         Apr 25 02:06:19 kb-xen kernel: [10544.400901]
>         fcoe_percpu_receive_thread:
>         skb_info: len:166 data_len:0 head:ed683000 data:ed683020
>         tail:ed6830c6
>         end:ed683100 sum:0 dev:eth0
>         Apr 25 02:06:19 kb-xen kernel: [10544.400905]
>         fcoe_percpu_receive_thread:
>         dropping frame with CRC error
>         Apr 25 02:06:19 kb-xen kernel: [10544.400908] frame with CRC
>         error 010101 ->
>         010102 xids 014f ffff ELS req ELS PLOGI
>         Apr 25 02:06:21 kb-xen kernel: [10546.395430] fcoe_rcv:
>         skb_info: len:50
>         data_len:0 head:ed687400 data:ed687420 tail:ed687452
>         end:ed687500 sum:0
>         dev:eth0
>         Apr 25 02:06:21 kb-xen kernel: [10546.395442]
>         fcoe_percpu_receive_thread:
>         skb_info: len:50 data_len:0 head:ed687400 data:ed687420
>         tail:ed687452
>         end:ed687500 sum:0 dev:eth0
>         Apr 25 02:06:21 kb-xen kernel: [10546.395446]
>         fcoe_percpu_receive_thread:
>         dropping frame with CRC error
>         Apr 25 02:06:21 kb-xen kernel: [10546.395450] frame with CRC
>         error 010101 ->
>         010102 xids 014c ffff BLS abort BLS op 2d
>         Apr 25 02:06:21 kb-xen kernel: [10546.395682] fcoe_rcv:
>         skb_info: len:50
>         data_len:0 head:ed79e800 data:ed79e820 tail:ed79e852
>         end:ed79e900 sum:0
>         dev:eth0
>         Apr 25 02:06:21 kb-xen kernel: [10546.395689]
>         fcoe_percpu_receive_thread:
>         skb_info: len:50 data_len:0 head:ed79e800 data:ed79e820
>         tail:ed79e852
>         end:ed79e900 sum:0 dev:eth0
>         Apr 25 02:06:21 kb-xen kernel: [10546.395693]
>         fcoe_percpu_receive_thread:
>         dropping frame with CRC error
>         Apr 25 02:06:21 kb-xen kernel: [10546.395696] frame with CRC
>         error 010101 ->
>         010102 xids 014e ffff BLS abort BLS op 4
>         Apr 25 02:06:21 kb-xen kernel: [10546.395942] fcoe_rcv:
>         skb_info: len:50
>         data_len:0 head:ed683400 data:ed683420 tail:ed683452
>         end:ed683500 sum:0
>         dev:eth0
>         Apr 25 02:06:21 kb-xen kernel: [10546.395951]
>         fcoe_percpu_receive_thread:
>         skb_info: len:50 data_len:0 head:ed683400 data:ed683420
>         tail:ed683452
>         end:ed683500 sum:0 dev:eth0
>         Apr 25 02:06:21 kb-xen kernel: [10546.395955]
>         fcoe_percpu_receive_thread:
>         dropping frame with CRC error
>         Apr 25 02:06:21 kb-xen kernel: [10546.395959] frame with CRC
>         error 010101 ->
>         010102 xids 014f ffff BLS abort BLS op b0
>         Apr 25 02:06:21 kb-xen kernel: [10546.396029] fcoe_rcv:
>         skb_info: len:166
>         data_len:0 head:ed685000 data:ed685020 tail:ed6850c6
>         end:ed685100 sum:0
>         dev:eth0
>         Apr 25 02:06:21 kb-xen kernel: [10546.396038]
>         fcoe_percpu_receive_thread:
>         skb_info: len:166 data_len:0 head:ed685000 data:ed685020
>         tail:ed6850c6
>         end:ed685100 sum:0 dev:eth0
>         Apr 25 02:06:21 kb-xen kernel: [10546.396043]
>         fcoe_percpu_receive_thread:
>         dropping frame with CRC error
>         Apr 25 02:06:21 kb-xen kernel: [10546.396046] frame with CRC
>         error 010101 ->
>         010102 xids 0150 ffff ELS req ELS PLOGI
>         Apr 25 02:06:21 kb-xen kernel: [10546.400012] fcoe_xmit      
>         000000 ->
>         fffffe xids 00c6 ffff ELS req ELS FLOGI
> 
> 
>         I tried to compare the fcoe_percpu_receive_thread() function of
>         the latest
>         initiator with the same function present in the target. But I am
>         not able to
>         figure out the error. Please help me to debug this. I have
>         attached the
>         relevant dump from wireshark with this mail. That has the packet
>         contents
>         while these error messages are displayed.
> 
> 
>     It looks like the length may be the problem, or the target is
>     looking for
>     the CRC in the wrong place.  The wireshark info shows it read 42000000,
>     which is an EOF code value which would normally follow the CRC.
> 
>     So, it looks like it's looking 4 bytes past the CRC, and
>     perhaps also using 4 bytes more than it should to compute the CRC.
> 
>     Let us know what it turns out to be.
> 
> 
> Ya looks  like it. Thanks for the pointer. I think the following patch 
> has some role to play in this error.
> 
> http://lists.wpkg.org/pipermail/stgt/2008-July/001762.html
> 
> The target is still using *FCOE_T11_AUG07* and the CRC struct reads,
> 
> /*
>  * FCoE CRC & EOF
>  * NB: This is the old version, defined before August 2007.
>  */
> struct fcoe_crc_eof {
>     u_int32_t    fcoe_crc32;    /* CRC for FC packet */
>     net8_t        fcoe_eof;    /* EOF from RFC 3643 */
> } __attribute__((packed));
> 
> Let me know your thoughts. I will try to understand this better.
> 
> -Karthik
> 

The one called FCOE_T11_AUG07 is the latest one, but that crc_eof struct
above is from the pre-T11 format.  The latest one has an additional
three reserved bytes after the EOF.

The patch intended to remove the old pre-T11 support, but I don't
see the changes that would be required in the receive code, and it
still has the member fcoe_hlen, which was used to select the format.

I figure somehow the offset to the CRC in your target receive code
(percpu_receive_thread) is 4 bytes larger than it should be.

You might try just using the code you have, but with fcconf, be sure
to select the new format.  To do that:

	fcconf ethX delete   # this might not work on target, you may need to rmmod
	fcconf ethX create fcoe_version T11

If that works, then the patch was incomplete.  Target mode definitely
needs more attention and testing.  I'm glad you're doing that.

	Joe




More information about the devel mailing list