TSN任务流

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

TSN任务流

211 Views
ZhaoXingLi
Contributor I

nxp技术员你好:

我想请问一下适用于RT1176的genavb-apps-freertos-7_0_0对比genavb-apps-freertos-5_6_0的创建任务流有什么变化,之前我调试genavb-apps-freertos-5_6_0的时候在tsn_tasks_config.c文件中使用不同的stream_id可以进行cyclic_task_init初始化成功,但是在genavb-apps-freertos-7_0_0代码中会在 tsn_task_net_init——>genavb_socket_tx_open——>net_tx_init——>net_tx_connect中进行失败跳出,请问在genavb-apps-freertos-7_0_0使用的接口中对比genavb-apps-freertos-5_6_0有什么改动吗?
期待您的回复。

0 Kudos
Reply
1 Reply

90 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @ZhaoXingLi ,

感谢您联系NXP团队!

由于我们本地没有老版本的genavb-tsn package,因此我只能按照最新的版本的源码,给您一些我的看法。genavb-apps-freertos-7_0_0 中,stream_id 不是一个“仅用于 task 配置的逻辑编号”,而是一个必须能映射到完整 TSN Stream 配置(MAC / VLAN / Priority / Protocol 等)的索引。
同时,TX/RX 网络流(socket)的创建与连接前移到了 task 初始化阶段。因此,如果 stream_id 对应的 stream 配置不存在或不匹配,就会在 genavb_socket_tx_open → net_tx_connect 阶段直接失败,而不是先让 cyclic_task_init() 成功。

要新增或修改 stream_id,需要检查 3 个地方

- tsn_streams[]是否存在该 index,MAC / VLAN / Priority 是否合理

- cyclic_tasks[]peer_id 是否一致

- stream 类型

Best regards,
Gavin

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2353338%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3ETSN%20Task%20Stream%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2353338%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20nxp%20technician%3A%3C%2FP%3E%3CP%3EI%20would%20like%20to%20ask%20what%20is%20the%20change%20of%20creating%20task%20flow%20in%20genavb-apps-freertos-7_0_0%20for%20RT1176%20compared%20to%20genavb-apps-freertos-5_6_0.%20Previously%20when%20I%20debugged%20the%20genavb-apps-freertos-5_6_0%20I%20used%20a%20different%20stream_id%20in%20the%20tn_tasks_%20config.c%20file%20with%20a%20different%20stream_id%20can%20do%3CSPAN%3Ecyclic_task_init%20initialization%20successfully%2C%20but%20in%20genavb-apps-freertos-7_0_0%20code%20it%20will%20do%20the%20same%20in%20%3C%2FSPAN%3E%3CSPAN%3Etsn_task_net_init--%3C%2FSPAN%3E%3CSPAN%3E%26gt%3B%3C%2FSPAN%3E%3CSPAN%3Egenavb_socket_tx_open%3C%2FSPAN%3E%3CSPAN%3Enet_tx_init%3C%2FSPAN%3E%3CSPAN%3Enet_tx_connect%2C%20please%20ask%20in%20%3CSPAN%3Egenavb-apps-freertos-%207_0_0%20used%20in%20the%20interface%20compared%20to%20genavb-apps-freertos-5_6_0%20any%20changes%3F%20%3CBR%20%2F%3ELooking%20forward%20to%20your%20reply.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2356931%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20TSN%E4%BB%BB%E5%8A%A1%E6%B5%81%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2356931%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F261007%22%20target%3D%22_blank%22%3E%40ZhaoXingLi%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20contacting%20the%20NXP%20team!%3C%2FP%3E%0A%3CP%3ESince%20we%20don't%20have%20an%20older%20version%20of%20the%20genavb-tsn%20package%20locally%2C%20I%20can%20only%20give%20you%20my%20opinion%20according%20to%20the%20latest%20version%20of%20the%20source%20code.%20genavb-apps-freertos-7_0_0%2C%20the%20stream_id%20is%20not%20a%20%22logical%20number%20used%20only%20for%20task%20configuration%22%20but%20an%20index%20that%20must%20map%20to%20the%20complete%20TSN%20Stream%20configuration%20(MAC%20%2F%20VLAN%20%2F%20Priority%20%2F%20Protocol%20etc.).%20%22but%20an%20index%20that%20must%20map%20to%20the%20full%20TSN%20Stream%20configuration%20(MAC%20%2F%20VLAN%20%2F%20Priority%20%2F%20Protocol%20etc.).%20%3CBR%20%2F%3EAt%20the%20same%20time%2C%20the%20creation%20and%20connection%20of%20TX%2FRX%20network%20streams%20(sockets)%20is%20moved%20forward%20to%20the%20task%20initialization%20phase.%20Therefore%2C%20if%20the%20stream%20configuration%20corresponding%20to%20the%20stream_id%20does%20not%20exist%20or%20does%20not%20match%2C%20it%20will%20fail%20directly%20in%20the%20genavb_socket_tx_open%20%E2%86%92%20net_tx_connect%20phase%2C%20instead%20of%20allowing%20cyclic_task_init()%20to%20succeed%20first.%3C%2FP%3E%0A%3CP%3ETo%20add%20or%20modify%20stream_id%2C%20you%20need%20to%20check%203%20places%3C%2FP%3E%0A%3CP%3E-%20tsn_streams%5B%5D%20whether%20this%20index%20exists%20and%20whether%20MAC%20%2F%20VLAN%20%2F%20Priority%20is%20reasonable%3C%2FP%3E%0A%3CP%3E-%20cyclic_tasks%5B%5D%20peer_id%20is%20consistent%3C%2FP%3E%0A%3CP%3E-%20stream%20Type%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%20%3CBR%20%2F%3EGavin%3C%2FP%3E%3C%2FLINGO-BODY%3E