OpenVisualCloud / Media-Transport-Library

A real-time media transport(DPDK, AF_XDP, RDMA) stack for both raw and compressed video based on COTS hardware.
BSD 3-Clause "New" or "Revised" License
171 stars 55 forks source link

Cannot receive the same 2110-20 stream in two different sessions #982

Closed DianaEs2 closed 2 months ago

DianaEs2 commented 2 months ago

I want to replicate a 2110-20 stream and receive it in two different rx_sessions. Is it possible to achieve?

Here is the config used for the test: ./build/app/RxTxApp -config_file ./config/rx_2v.json rx_2v.json

And this is the result I got: RxTxApp.log

_iavf_fdir_add(): Failed to add rule request due to the rule is already existed iavf_flow_create(): Failed to create flow MTL: Error: rte_rx_flow_create(0), rte_flowcreate fail for queue 0, Failed to create parser engine.

Is this a known limitation of the MTL? Or it just needs a specific setup for this config file.

frankdjx commented 2 months ago

There is no support. The alternation is replicating at the application level.

Another option is to use two virtual interfaces in the JSON file and redirect the second ST20P session to the second VF port, which joins the same multicast address.

    "interfaces": [
        {
            "name": "0000:12:01.0",
            "ip": "10.26.9.10"
        },
        {
            "name": "0000:12:01.1",
            "ip": "10.26.9.10"
        },
    ],
    ...
            "ip": [
                "239.234.20.20"
            ],
            "interface": [
                0
            ],
   ...
            "ip": [
                "239.234.20.20"
            ],
            "interface": [
                1
            ],
DianaEs2 commented 2 months ago

This idea of using the second VF port works well. Thank you very much.

After updating the config file I got this error from the library: app_args_json, json_file /home/desaulov/dev/Media-Transport-Library/config/rx_2v.json succ MTL: 2024-09-24 10:04:21, Error: mt_user_params_check, same ip 10.26.9.10 for port 1 and 0 MTL: 2024-09-24 10:04:21, Error: mtl_init, mt_user_params_check fail -22

But once this error was suppressed then RxTxApp received both streams.

The actual request is to make it work with Source Specific Multicast. And I believe it should be working now.

frankdjx commented 2 months ago

For Source Specific Multicast, it has one item in json to config. Example: https://github.com/OpenVisualCloud/Media-Transport-Library/blob/dbb4cd6a93a83c22bce4b4c3892700c6fbad855f/tests/script/loop_json/multicast_source_1v_1a_1anc.json#L67

Not sure if my understanding is right, anyway.

DianaEs2 commented 2 months ago

I tested SSM with this config. rx_2v_ssm.json

In this test, two different sources transmitted two different video streams. The streams were sent to the same multicast address and port. It was expected that two different video streams would be displayed. The result was that the same content was shown for both sessions. Besides, the stream itself was not correctly filtered by the source IP (occasionally a frame from another source flickered). The log captured here mtl_ssm.log

Note, SSM works correctly in a separate session. It's the same config file but one rx_session was removed
rx_1v_ssm.json

frankdjx commented 2 months ago

The two virtual functions, 0000:12:01.0 and 0000:12:01.1, are bound to the same physical NIC 0000:12:00.0. In reality, both streams are directed to the physical card 0000:12:00.0, that is the cause here. Typically, the E810 features two or more ports for one card. If you have connected both ports to the switch, please redirect the second session to a VF(0000:12:11.0 or others) which backed by a different physical port instance:

    "interfaces": [
        {
            "name": "0000:12:01.0",
            "ip": "10.26.9.10"
        },
        {
            "name": "0000:12:11.0",
            "ip": "10.26.9.10"
        },
    ],