From ad05e7162a2eb278179454b8a2d8f729abca647b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Linkiewicz?= Date: Thu, 31 Jul 2025 17:50:12 +0200 Subject: [PATCH 1/2] UPDATE: FFmpeg mtl_common.h in ecosystem UPDATE: FFmpeg mtl_common.h in ecosystem FIX: Implementation allows usage of redundancy device in FFmpeg plugin. --- ecosystem/ffmpeg_plugin/mtl_common.h | 62 ++++++++++++++++------------ 1 file changed, 36 insertions(+), 26 deletions(-) diff --git a/ecosystem/ffmpeg_plugin/mtl_common.h b/ecosystem/ffmpeg_plugin/mtl_common.h index 2b98a2ea8..f63827751 100644 --- a/ecosystem/ffmpeg_plugin/mtl_common.h +++ b/ecosystem/ffmpeg_plugin/mtl_common.h @@ -83,27 +83,32 @@ #define MTL_RX_DEV_ARGS \ {"p_port", "mtl p port", OFFSET(devArgs.port[MTL_PORT_P]), \ + AV_OPT_TYPE_STRING, {.str = NULL}, .flags = DEC}, \ + {"r_port", "mtl r port", OFFSET(devArgs.port[MTL_PORT_R]), \ AV_OPT_TYPE_STRING, {.str = NULL}, .flags = DEC}, \ {"p_sip", "mtl local ip", OFFSET(devArgs.sip[MTL_PORT_P]), AV_OPT_TYPE_STRING, \ {.str = NULL}, .flags = DEC}, \ + {"r_sip", "mtl local r ip", OFFSET(devArgs.sip[MTL_PORT_R]), AV_OPT_TYPE_STRING, \ + {.str = NULL}, .flags = DEC}, \ {"dma_dev", "mtl dma dev", OFFSET(devArgs.dma_dev), \ AV_OPT_TYPE_STRING, {.str = NULL}, .flags = DEC}, \ - {"rx_queues", \ - "mtl device amount of rx queues", \ - OFFSET(devArgs.rx_queues_cnt[MTL_PORT_P]), \ - AV_OPT_TYPE_INT, \ - {.i64 = 16}, \ - -1, \ - INT_MAX, \ - DEC}, \ - { \ - "tx_queues", "mtl device amount of tx queues", \ - OFFSET(devArgs.tx_queues_cnt[MTL_PORT_P]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ - INT_MAX, DEC \ - } + {"rx_queues", "mtl device amount of rx queues", \ + OFFSET(devArgs.rx_queues_cnt[MTL_PORT_P]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ + INT_MAX, DEC}, \ + {"r_rx_queues", "mtl r_port device amount of rx queues", \ + OFFSET(devArgs.rx_queues_cnt[MTL_PORT_R]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ + INT_MAX, DEC}, \ + {"tx_queues", "mtl device amount of tx queues", \ + OFFSET(devArgs.tx_queues_cnt[MTL_PORT_P]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ + INT_MAX, DEC}, \ + {"r_tx_queues", "mtl r_port device amount of tx queues", \ + OFFSET(devArgs.tx_queues_cnt[MTL_PORT_R]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ + INT_MAX, DEC} #define MTL_RX_PORT_ARGS \ {"p_rx_ip", "p rx ip", OFFSET(portArgs.sip[MTL_SESSION_PORT_P]), \ + AV_OPT_TYPE_STRING, {.str = NULL}, .flags = DEC}, \ + {"r_rx_ip", "r rx ip", OFFSET(portArgs.sip[MTL_SESSION_PORT_R]), \ AV_OPT_TYPE_STRING, {.str = NULL}, .flags = DEC}, \ {"udp_port", \ "UDP port", \ @@ -120,27 +125,32 @@ #define MTL_TX_DEV_ARGS \ {"p_port", "mtl p port", OFFSET(devArgs.port[MTL_PORT_P]), \ + AV_OPT_TYPE_STRING, {.str = NULL}, .flags = ENC}, \ + {"r_port", "mtl r port", OFFSET(devArgs.port[MTL_PORT_R]), \ AV_OPT_TYPE_STRING, {.str = NULL}, .flags = ENC}, \ {"p_sip", "mtl local ip", OFFSET(devArgs.sip[MTL_PORT_P]), AV_OPT_TYPE_STRING, \ {.str = NULL}, .flags = ENC}, \ + {"r_sip", "mtl local r ip", OFFSET(devArgs.sip[MTL_PORT_R]), AV_OPT_TYPE_STRING, \ + {.str = NULL}, .flags = ENC}, \ {"dma_dev", "mtl dma dev", OFFSET(devArgs.dma_dev), \ AV_OPT_TYPE_STRING, {.str = NULL}, .flags = ENC}, \ - {"rx_queues", \ - "mtl device amount of rx queues", \ - OFFSET(devArgs.rx_queues_cnt[MTL_PORT_P]), \ - AV_OPT_TYPE_INT, \ - {.i64 = 16}, \ - -1, \ - INT_MAX, \ - ENC}, \ - { \ - "tx_queues", "mtl device amount of rx queues", \ - OFFSET(devArgs.tx_queues_cnt[MTL_PORT_P]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ - INT_MAX, ENC \ - } + {"rx_queues", "mtl device amount of rx queues", \ + OFFSET(devArgs.rx_queues_cnt[MTL_PORT_P]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ + INT_MAX, ENC}, \ + {"r_rx_queues", "mtl r_port device amount of rx queues", \ + OFFSET(devArgs.rx_queues_cnt[MTL_PORT_R]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ + INT_MAX, ENC}, \ + {"tx_queues", "mtl device amount of tx queues", \ + OFFSET(devArgs.tx_queues_cnt[MTL_PORT_P]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ + INT_MAX, ENC}, \ + {"r_tx_queues", "mtl r_port device amount of tx queues", \ + OFFSET(devArgs.tx_queues_cnt[MTL_PORT_R]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ + INT_MAX, ENC} #define MTL_TX_PORT_ARGS \ {"p_tx_ip", "p tx ip", OFFSET(portArgs.dip[MTL_SESSION_PORT_P]), \ + AV_OPT_TYPE_STRING, {.str = NULL}, .flags = ENC}, \ + {"r_tx_ip", "r tx ip", OFFSET(portArgs.dip[MTL_SESSION_PORT_R]), \ AV_OPT_TYPE_STRING, {.str = NULL}, .flags = ENC}, \ {"udp_port", \ "UDP port", \ From b5851720fe25397636b90c72c7f9bef2085a4427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Linkiewicz?= Date: Thu, 31 Jul 2025 18:07:14 +0200 Subject: [PATCH 2/2] Update mtl_common.h --- ecosystem/ffmpeg_plugin/mtl_common.h | 80 +++++++++++++++++++--------- 1 file changed, 56 insertions(+), 24 deletions(-) diff --git a/ecosystem/ffmpeg_plugin/mtl_common.h b/ecosystem/ffmpeg_plugin/mtl_common.h index f63827751..1a1b37364 100644 --- a/ecosystem/ffmpeg_plugin/mtl_common.h +++ b/ecosystem/ffmpeg_plugin/mtl_common.h @@ -92,18 +92,35 @@ {.str = NULL}, .flags = DEC}, \ {"dma_dev", "mtl dma dev", OFFSET(devArgs.dma_dev), \ AV_OPT_TYPE_STRING, {.str = NULL}, .flags = DEC}, \ - {"rx_queues", "mtl device amount of rx queues", \ - OFFSET(devArgs.rx_queues_cnt[MTL_PORT_P]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ - INT_MAX, DEC}, \ - {"r_rx_queues", "mtl r_port device amount of rx queues", \ - OFFSET(devArgs.rx_queues_cnt[MTL_PORT_R]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ - INT_MAX, DEC}, \ - {"tx_queues", "mtl device amount of tx queues", \ - OFFSET(devArgs.tx_queues_cnt[MTL_PORT_P]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ - INT_MAX, DEC}, \ - {"r_tx_queues", "mtl r_port device amount of tx queues", \ - OFFSET(devArgs.tx_queues_cnt[MTL_PORT_R]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ - INT_MAX, DEC} + {"r_rx_queues", \ + "mtl r_port device amount of rx queues", \ + OFFSET(devArgs.rx_queues_cnt[MTL_PORT_R]), \ + AV_OPT_TYPE_INT, \ + {.i64 = 16}, \ + -1, \ + INT_MAX, \ + DEC}, \ + {"r_tx_queues", \ + "mtl r_port device amount of tx queues", \ + OFFSET(devArgs.tx_queues_cnt[MTL_PORT_R]), \ + AV_OPT_TYPE_INT, \ + {.i64 = 16}, \ + -1, \ + INT_MAX, \ + DEC}, \ + {"rx_queues", \ + "mtl device amount of rx queues", \ + OFFSET(devArgs.rx_queues_cnt[MTL_PORT_P]), \ + AV_OPT_TYPE_INT, \ + {.i64 = 16}, \ + -1, \ + INT_MAX, \ + DEC}, \ + { \ + "tx_queues", "mtl device amount of tx queues", \ + OFFSET(devArgs.tx_queues_cnt[MTL_PORT_P]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ + INT_MAX, DEC \ + } #define MTL_RX_PORT_ARGS \ {"p_rx_ip", "p rx ip", OFFSET(portArgs.sip[MTL_SESSION_PORT_P]), \ @@ -134,18 +151,33 @@ {.str = NULL}, .flags = ENC}, \ {"dma_dev", "mtl dma dev", OFFSET(devArgs.dma_dev), \ AV_OPT_TYPE_STRING, {.str = NULL}, .flags = ENC}, \ - {"rx_queues", "mtl device amount of rx queues", \ - OFFSET(devArgs.rx_queues_cnt[MTL_PORT_P]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ - INT_MAX, ENC}, \ - {"r_rx_queues", "mtl r_port device amount of rx queues", \ - OFFSET(devArgs.rx_queues_cnt[MTL_PORT_R]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ - INT_MAX, ENC}, \ - {"tx_queues", "mtl device amount of tx queues", \ - OFFSET(devArgs.tx_queues_cnt[MTL_PORT_P]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ - INT_MAX, ENC}, \ - {"r_tx_queues", "mtl r_port device amount of tx queues", \ - OFFSET(devArgs.tx_queues_cnt[MTL_PORT_R]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ - INT_MAX, ENC} + {"r_rx_queues", "mtl r_port device amount of rx queues", \ + OFFSET(devArgs.rx_queues_cnt[MTL_PORT_R]), \ + AV_OPT_TYPE_INT, \ + {.i64 = 16}, \ + -1, \ + INT_MAX, \ + ENC}, \ + {"r_tx_queues", "mtl r_port device amount of tx queues", \ + OFFSET(devArgs.tx_queues_cnt[MTL_PORT_R]), \ + AV_OPT_TYPE_INT, \ + {.i64 = 16}, \ + -1, \ + INT_MAX, \ + ENC}, \ + {"rx_queues", \ + "mtl device amount of rx queues", \ + OFFSET(devArgs.rx_queues_cnt[MTL_PORT_P]), \ + AV_OPT_TYPE_INT, \ + {.i64 = 16}, \ + -1, \ + INT_MAX, \ + ENC}, \ + { \ + "tx_queues", "mtl device amount of rx queues", \ + OFFSET(devArgs.tx_queues_cnt[MTL_PORT_P]), AV_OPT_TYPE_INT, {.i64 = 16}, -1, \ + INT_MAX, ENC \ + } #define MTL_TX_PORT_ARGS \ {"p_tx_ip", "p tx ip", OFFSET(portArgs.dip[MTL_SESSION_PORT_P]), \