Skip to content

Commit a16fd08

Browse files
Add: Deprecate UDP Transport Module message (#1396)
Depracate the UDP transport module by moving its source files to a deprecated directory.
1 parent 69d0027 commit a16fd08

File tree

16 files changed

+34
-24
lines changed

16 files changed

+34
-24
lines changed

doc/udp.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# UDP Introduction
22

3-
Starting from version 23.04, the Media Transport Library provides an efficient user-space UDP stack that is POSIX-compatible, enabling users to adopt it without any changes to their code logic. The stack features an LD preload layer that intercepts UDP socket API calls and replaces them with our implementation, allowing for deployment without code changes or the need for rebuilding.
3+
> **Deprecation notice:** The user-space UDP stack described in this document is scheduled for removal in a future Media Transport Library release. New deployments should avoid relying on it, and existing deployments should begin planning a migration back to the standard kernel UDP path or to vendor-supported alternatives. Maintenance updates from now on focus on security fixes only.
4+
5+
Starting from version 23.04, the Media Transport Library provides an efficient user-space UDP stack that is POSIX-compatible, enabling users to adopt it without any changes to their code logic.
6+
The stack features an LD preload layer that intercepts UDP socket API calls and replaces them with our implementation, allowing for deployment without code changes or the need for rebuilding.
7+
Although the implementation remains available for legacy users, it no longer receives feature enhancements and will be fully deprecated once the removal timeline is announced.
48

59
In the Media Transport Library, data plane traffic is handled directly within the socket API under the current thread context, resulting in extremely high performance and low latency. Other user-space UDP stacks typically use a client-service architecture, which introduces cross-core message costs that can negatively impact performance and add extra latency.
610

include/meson.build

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22
# Copyright 2022 Intel Corporation
33

4+
mtl_deprecated_header_files = files(
5+
'deprecated/mudp_api.h',
6+
'deprecated/mudp_sockfd_api.h',
7+
'deprecated/mudp_sockfd_internal.h',
8+
'deprecated/mudp_win.h',
9+
)
10+
411
mtl_header_files = files('mtl_api.h', 'st_api.h', 'st_convert_api.h', 'st_convert_internal.h',
5-
'st_pipeline_api.h', 'st20_api.h', 'st30_api.h', 'st40_api.h', 'st41_api.h',
6-
'mudp_api.h', 'mudp_sockfd_api.h', 'mudp_sockfd_internal.h', 'mtl_lcore_shm_api.h',
7-
'mtl_sch_api.h', 'st30_pipeline_api.h', 'st40_pipeline_api.h')
12+
'st_pipeline_api.h', 'st20_api.h', 'st30_api.h', 'st40_api.h', 'st41_api.h', 'mtl_lcore_shm_api.h',
13+
'mtl_sch_api.h', 'st30_pipeline_api.h', 'st40_pipeline_api.h') + mtl_deprecated_header_files
814

915
if is_windows
1016
mtl_header_files += files('mudp_win.h')

lib/src/datapath/mt_dp_socket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "../mt_stat.h"
1111
#include "../mt_util.h"
1212
#ifndef WINDOWSENV
13-
#include "mudp_api.h"
13+
#include "deprecated/mudp_api.h"
1414
#endif
1515

1616
#define MT_RX_DP_SOCKET_PREFIX "SR_"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
#include "udp_main.h"
66

7-
#include "../mt_log.h"
8-
#include "../mt_stat.h"
7+
#include "../../mt_log.h"
8+
#include "../../mt_stat.h"
99
#include "udp_rxq.h"
1010

1111
#ifndef UDP_SEGMENT
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
#ifndef _MT_LIB_UDP_MAIN_H_
66
#define _MT_LIB_UDP_MAIN_H_
77

8-
#include "../mt_mcast.h"
8+
#include "../../mt_mcast.h"
99
#include "udp_rxq.h"
1010

1111
// clang-format off
1212
#ifdef WINDOWSENV
13-
#include "mudp_win.h"
13+
#include "deprecated/mudp_win.h"
1414
#endif
15-
#include "mudp_api.h"
15+
#include "deprecated/mudp_api.h"
1616
// clang-format on
1717

1818
/* On error, -1 is returned, and errno is set appropriately. */

0 commit comments

Comments
 (0)