llcecan question

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

llcecan question

89 Views
ZHANGBOWEN
Contributor I

hi nxp team:

Test hardware: s32g274
Software version: bsp38

can setting: ip link set llcecan(0~3) type can \
bitrate 500000 \
sample-point 0.8 \
dbitrate 2000000 \
dsample-point 0.7 \
fd on
test case:
1: Vector v1640 can1 can be connected to can0~can3 of s32g, and can2 can be connected to llce_can0~llce_can3 of s32g
2: vector1640 sends can data, and s32g receives can data.
3: Check whether the sent and received data frames are consistent.
Test results:
1: Data frames are lost in llce_can0~llce_can3, but not in can0~can3.
The reference image is as follows
Figure 1: We can see that v1640 can1 sent a total of 1,823,705 frames, and in Figure 2, s32g274 can0~can3 received 1,823,705 frames without any frame loss.
We can observe that the total number of frames sent by v1640 can2 is 1,845,947, while the corresponding number of frames received by s32g274 llce_can0~llce_can3 is approximately 1,845,887. There is a loss of 60 frames.

When the CPU load is relatively high, the frame loss situation worsens. Is it possible to increase LLCE_CAN_MAX_RX_MB to reduce the cpu load. as the same time, How to solve the frame loss problem? Are there any optimization items?

ZHANGBOWEN_0-1780368083252.pngZHANGBOWEN_1-1780368090168.png

 

Tags (1)
0 Kudos
Reply
3 Replies

71 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @ZHANGBOWEN 

Thanks for your post.

From the description shared, seems the frames lost when system load is high.

I suggest trying to change the value of LLCE_CAN_MAX_RX_MB in

drivers/net/can/llce/llce_can_common.c,  with new value such as 32 or 64, then rebuild the kernel to have another test, to check if there are still issues existed in your test.

 

BR

Chenyin

0 Kudos
Reply

30 Views
ZHANGBOWEN
Contributor I

Hi,

Thanks for your reply.

After I modified LLCE_CAN_MAX_RX_MB to 64 and 128, the CPU load did not decrease or the decrease was not noticeable, making it difficult to observe. And the frame loss phenomenon of llcecan still exists

0 Kudos
Reply

14 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @ZHANGBOWEN 

Thanks for your reply.

In order for investigating on the issue further, firstly I wish reproducing it on local RDB2.

Would you mind clarifying the following:

1. Which version LLCE FW is used in your test?

2. Have you ever tested it with other version BSP? If so, same results?

3. Could the frame loss only occurred when doing benchmark via 8 CAN channels as described? May I know if you had done some pressure test on only LLCE CAN interfaces? Any simplified testing setup existed that could reproduce the issue?

4. What is the test load for the test? What is the throughput value when frame loss are found? What is the average CPU load during the test? 

 

 

BR

Chenyin

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2374717%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ellcecan%20question%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2374717%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ehi%20nxp%20team%3A%3C%2FP%3E%3CP%3ETest%20hardware%3A%20s32g274%3CBR%20%2F%3ESoftware%20version%3A%20bsp38%3C%2FP%3E%3CP%3Ecan%20setting%EF%BC%9A%20ip%20link%20set%20llcecan%EF%BC%880~3%EF%BC%89%20type%20can%20%5C%3CBR%20%2F%3Ebitrate%20500000%20%5C%3CBR%20%2F%3Esample-point%200.8%20%5C%3CBR%20%2F%3Edbitrate%202000000%20%5C%3CBR%20%2F%3Edsample-point%200.7%20%5C%3CBR%20%2F%3Efd%20on%3CBR%20%2F%3Etest%20case%EF%BC%9A%3CBR%20%2F%3E1%3A%20Vector%20v1640%20can1%20can%20be%20connected%20to%20can0~can3%20of%20s32g%2C%20and%20can2%20can%20be%20connected%20to%20llce_can0~llce_can3%20of%20s32g%3CBR%20%2F%3E2%3A%20vector1640%20sends%20can%20data%2C%20and%20s32g%20receives%20can%20data.%3CBR%20%2F%3E3%3A%20Check%20whether%20the%20sent%20and%20received%20data%20frames%20are%20consistent.%3CBR%20%2F%3ETest%20results%EF%BC%9A%3CBR%20%2F%3E1%3A%20Data%20frames%20are%20lost%20in%20llce_can0~llce_can3%2C%20but%20not%20in%20can0~can3.%3CBR%20%2F%3EThe%20reference%20image%20is%20as%20follows%3CBR%20%2F%3EFigure%201%3A%20We%20can%20see%20that%20v1640%20can1%20sent%20a%20total%20of%201%2C823%2C705%20frames%2C%20and%20in%20Figure%202%2C%20s32g274%20can0~can3%20received%201%2C823%2C705%20frames%20without%20any%20frame%20loss.%3CBR%20%2F%3EWe%20can%20observe%20that%20the%20total%20number%20of%20frames%20sent%20by%20v1640%20can2%20is%201%2C845%2C947%2C%20while%20the%20corresponding%20number%20of%20frames%20received%20by%20s32g274%20llce_can0~llce_can3%20is%20approximately%201%2C845%2C887.%20There%20is%20a%20loss%20of%2060%20frames.%3C%2FP%3E%3CP%3EWhen%20the%20CPU%20load%20is%20relatively%20high%2C%20the%20frame%20loss%20situation%20worsens.%20Is%20it%20possible%20to%20increase%20LLCE_CAN_MAX_RX_MB%20to%20reduce%20the%20cpu%20load.%20as%20the%20same%20time%2C%20How%20to%20solve%20the%20frame%20loss%20problem%3F%20Are%20there%20any%20optimization%20items%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ZHANGBOWEN_0-1780368083252.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ZHANGBOWEN_0-1780368083252.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F387473i242807587E68B6B7%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ZHANGBOWEN_0-1780368083252.png%22%20alt%3D%22ZHANGBOWEN_0-1780368083252.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ZHANGBOWEN_1-1780368090168.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ZHANGBOWEN_1-1780368090168.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F387474i4EAEA9D5CE9FBFC1%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ZHANGBOWEN_1-1780368090168.png%22%20alt%3D%22ZHANGBOWEN_1-1780368090168.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2375616%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20llcecan%20question%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2375616%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F259184%22%20target%3D%22_blank%22%3E%40ZHANGBOWEN%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20your%20reply.%3C%2FP%3E%0A%3CP%3EIn%20order%20for%20investigating%20on%20the%20issue%20further%2C%20firstly%20I%20wish%20reproducing%20it%20on%20local%20RDB2.%3C%2FP%3E%0A%3CP%3EWould%20you%20mind%20clarifying%20the%20following%3A%3C%2FP%3E%0A%3CP%3E1.%20Which%20version%20LLCE%20FW%20is%20used%20in%20your%20test%3F%3C%2FP%3E%0A%3CP%3E2.%20Have%20you%20ever%20tested%20it%20with%20other%20version%20BSP%3F%20If%20so%2C%20same%20results%3F%3C%2FP%3E%0A%3CP%3E3.%20Could%20the%20frame%20loss%20only%20occurred%20when%20doing%20benchmark%20via%208%20CAN%20channels%20as%20described%3F%20May%20I%20know%20if%20you%20had%20done%20some%20pressure%20test%20on%20only%20LLCE%20CAN%20interfaces%3F%20Any%20simplified%20testing%20setup%20existed%20that%20could%20reproduce%20the%20issue%3F%3C%2FP%3E%0A%3CP%3E4.%20What%20is%20the%20test%20load%20for%20the%20test%3F%20What%20is%20the%20throughput%20value%20when%20frame%20loss%20are%20found%3F%20What%20is%20the%20average%20CPU%20load%20during%20the%20test%3F%26nbsp%3B%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EChenyin%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2375388%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20llcecan%20question%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2375388%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EThanks%20for%20your%20reply.%3C%2FP%3E%3CP%3EAfter%20I%20modified%20LLCE_CAN_MAX_RX_MB%20to%2064%20and%20128%2C%20the%20CPU%20load%20did%20not%20decrease%20or%20the%20decrease%20was%20not%20noticeable%2C%20making%20it%20difficult%20to%20observe.%26nbsp%3BAnd%20the%20frame%20loss%20phenomenon%20of%20llcecan%20still%20exists%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2374869%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20llcecan%20question%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2374869%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F259184%22%20target%3D%22_blank%22%3E%40ZHANGBOWEN%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20your%20post.%3C%2FP%3E%0A%3CP%3EFrom%20the%20description%20shared%2C%20seems%20the%20frames%20lost%20when%20system%20load%20is%20high.%3C%2FP%3E%0A%3CP%3EI%20suggest%26nbsp%3B%3CSPAN%3Etrying%20to%20change%20the%20value%20of%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3ELLCE_CAN_MAX_RX_MB%20in%3C%2FSPAN%3E%3C%2FP%3E%0A%3CARTICLE%20data-content%3D%22%5B%7B%22%20type%3D%22%22%3E%0A%3CDIV%3E%3CSPAN%3Edrivers%2Fnet%2Fcan%2Fllce%2Fllce_can_common.c%3C%2FSPAN%3E%3CSPAN%3E%2C%26nbsp%3B%20with%20new%20value%20such%20as%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E32%20or%2064%2C%20then%20rebuild%20the%20kernel%20to%20have%20another%20test%2C%20to%20check%20if%20there%20are%20still%20issues%20existed%20in%20your%20test.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3C%2FARTICLE%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%3EBR%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EChenyin%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E