Skip to content

Commit 58cc9cf

Browse files
author
dpdk-port-leader
committed
port: re-apply F-Stack DPDK patches missed in 14355bf (mlx5/i40e/dts)
Fills the 3 omissions vs upstream commit 5f3768c 'Sync DPDK's modifies': #2 mlx5: dlsym(RTLD_NEXT, if_indextoname) hijack in drivers/net/mlx5/linux/{mlx5_ethdev_os,mlx5_os}.c #3 i40e: add I40E_DEV_ID_10G_BASE_T_X722 to the SFP-X722 802.1ad-unsupported branch in drivers/net/i40e/i40e_ethdev.c #5 dts: replace 24.11.6 dpdk/dts/ with the actual upstream-23.11.5 backup tree (per user instruction; not a literal port of 5f3768c) Build sanity: ninja drivers/librte_net_{i40e,mlx5}.a both PASS.
1 parent 2edc4ba commit 58cc9cf

72 files changed

Lines changed: 4811 additions & 13248 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dpdk/drivers/net/i40e/i40e_ethdev.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1620,7 +1620,8 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
16201620
}
16211621
/* Firmware of SFP x722 does not support 802.1ad frames ability */
16221622
if (hw->device_id == I40E_DEV_ID_SFP_X722 ||
1623-
hw->device_id == I40E_DEV_ID_SFP_I_X722)
1623+
hw->device_id == I40E_DEV_ID_SFP_I_X722 ||
1624+
hw->device_id == I40E_DEV_ID_10G_BASE_T_X722)
16241625
hw->flags &= ~I40E_HW_FLAG_802_1AD_CAPABLE;
16251626

16261627
PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM %02d.%02d.%02d eetrack %04x",

dpdk/drivers/net/mlx5/linux/mlx5_ethdev_os.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <stdalign.h>
2424
#include <sys/un.h>
2525
#include <time.h>
26+
#include <dlfcn.h>
2627

2728
#include <ethdev_linux_ethtool.h>
2829
#include <ethdev_driver.h>
@@ -1004,6 +1005,7 @@ mlx5_sysfs_check_switch_info(bool device_dir,
10041005
* @return
10051006
* 0 on success, a negative errno value otherwise and rte_errno is set.
10061007
*/
1008+
static char *(*real_if_indextoname)(unsigned int, char *) = NULL;
10071009
int
10081010
mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)
10091011
{
@@ -1024,7 +1026,16 @@ mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)
10241026
char c;
10251027
ssize_t line_size;
10261028

1027-
if (!if_indextoname(ifindex, ifname)) {
1029+
// for ff tools
1030+
if (!real_if_indextoname) {
1031+
real_if_indextoname = __extension__ (char *(*)(unsigned int, char *))dlsym(RTLD_NEXT, "if_indextoname");
1032+
if (!real_if_indextoname) {
1033+
rte_errno = errno;
1034+
return -rte_errno;
1035+
}
1036+
}
1037+
1038+
if (!real_if_indextoname(ifindex, ifname)) {
10281039
rte_errno = errno;
10291040
return -rte_errno;
10301041
}

dpdk/drivers/net/mlx5/linux/mlx5_os.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <linux/sockios.h>
1515
#include <linux/ethtool.h>
1616
#include <fcntl.h>
17+
#include <dlfcn.h>
1718

1819
#include <rte_malloc.h>
1920
#include <ethdev_driver.h>
@@ -2211,6 +2212,7 @@ mlx5_nl_esw_multiport_get(struct rte_pci_addr *pci_addr, int *enabled)
22112212

22122213
#define SYSFS_MPESW_PARAM_MAX_LEN 16
22132214

2215+
static char *(*real_if_indextoname)(unsigned int, char *) = NULL;
22142216
static int
22152217
mlx5_sysfs_esw_multiport_get(struct ibv_device *ibv, struct rte_pci_addr *pci_addr, int *enabled)
22162218
{
@@ -2240,7 +2242,16 @@ mlx5_sysfs_esw_multiport_get(struct ibv_device *ibv, struct rte_pci_addr *pci_ad
22402242
ifindex = mlx5_nl_ifindex(nl_rdma, ibv->name, i);
22412243
if (!ifindex)
22422244
continue;
2243-
if (!if_indextoname(ifindex, ifname))
2245+
2246+
// for ff tools
2247+
if (!real_if_indextoname) {
2248+
real_if_indextoname = __extension__ (char *(*)(unsigned int, char *))dlsym(RTLD_NEXT, "if_indextoname");
2249+
if (!real_if_indextoname) {
2250+
rte_errno = errno;
2251+
return -rte_errno;
2252+
}
2253+
}
2254+
if (!real_if_indextoname(ifindex, ifname))
22442255
continue;
22452256
MKSTR(sysfs_if_path, "/sys/class/net/%s", ifname);
22462257
if (mlx5_get_pci_addr(sysfs_if_path, &if_pci_addr))

dpdk/dts/Dockerfile

Lines changed: 0 additions & 46 deletions
This file was deleted.

dpdk/dts/README.md

Lines changed: 0 additions & 81 deletions
This file was deleted.

dpdk/dts/conf.yaml

Lines changed: 20 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,67 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22
# Copyright 2022-2023 The DPDK contributors
3-
# Copyright 2023 Arm Limited
43

5-
test_runs:
6-
# define one test run environment
7-
- dpdk_build:
8-
dpdk_location:
9-
# dpdk_tree: Commented out because `tarball` is defined.
10-
tarball: dpdk-tarball.tar.xz
11-
# Either `dpdk_tree` or `tarball` can be defined, but not both.
12-
remote: false # Optional, defaults to false. If it's true, the `dpdk_tree` or `tarball`
13-
# is located on the SUT node, instead of the execution host.
14-
15-
# precompiled_build_dir: Commented out because `build_options` is defined.
16-
build_options:
17-
arch: x86_64
4+
executions:
5+
- build_targets:
6+
- arch: x86_64
187
os: linux
198
cpu: native
20-
# the combination of the following two makes CC="ccache gcc"
219
compiler: gcc
22-
compiler_wrapper: ccache # Optional.
23-
# If `precompiled_build_dir` is defined, DPDK has been pre-built and the build directory is
24-
# in a subdirectory of DPDK tree root directory. Otherwise, will be using the `build_options`
25-
# to build the DPDK from source. Either `precompiled_build_dir` or `build_options` can be
26-
# defined, but not both.
27-
perf: false # disable performance testing
28-
func: true # enable functional testing
29-
skip_smoke_tests: false # optional
30-
test_suites: # the following test suites will be run in their entirety
10+
compiler_wrapper: ccache
11+
perf: false
12+
func: true
13+
skip_smoke_tests: false # optional flag that allows you to skip smoke tests
14+
test_suites:
3115
- hello_world
32-
# The machine running the DPDK test executable
16+
- os_udp
3317
system_under_test_node:
3418
node_name: "SUT 1"
35-
vdevs: # optional; if removed, vdevs won't be used in the test run
19+
vdevs: # optional; if removed, vdevs won't be used in the execution
3620
- "crypto_openssl"
37-
# Traffic generator node to use for this test run
3821
traffic_generator_node: "TG 1"
3922
nodes:
40-
# Define a system under test node, having two network ports physically
41-
# connected to the corresponding ports in TG 1 (the peer node)
4223
- name: "SUT 1"
4324
hostname: sut1.change.me.localhost
4425
user: dtsuser
4526
arch: x86_64
4627
os: linux
47-
lcores: "" # use all the available logical cores
48-
use_first_core: false # tells DPDK to use any physical core
49-
memory_channels: 4 # tells DPDK to use 4 memory channels
50-
hugepages_2mb: # optional; if removed, will use system hugepage configuration
51-
number_of: 256
28+
lcores: ""
29+
use_first_core: false
30+
memory_channels: 4
31+
hugepages: # optional; if removed, will use system hugepage configuration
32+
amount: 256
5233
force_first_numa: false
5334
ports:
54-
# sets up the physical link between "SUT 1"@0000:00:08.0 and "TG 1"@0000:00:08.0
5535
- pci: "0000:00:08.0"
5636
os_driver_for_dpdk: vfio-pci # OS driver that DPDK will use
57-
os_driver: i40e # OS driver to bind when the tests are not running
37+
os_driver: i40e
5838
peer_node: "TG 1"
5939
peer_pci: "0000:00:08.0"
60-
# sets up the physical link between "SUT 1"@0000:00:08.1 and "TG 1"@0000:00:08.1
6140
- pci: "0000:00:08.1"
6241
os_driver_for_dpdk: vfio-pci
6342
os_driver: i40e
6443
peer_node: "TG 1"
6544
peer_pci: "0000:00:08.1"
66-
# Define a Scapy traffic generator node, having two network ports
67-
# physically connected to the corresponding ports in SUT 1 (the peer node).
6845
- name: "TG 1"
6946
hostname: tg1.change.me.localhost
7047
user: dtsuser
7148
arch: x86_64
7249
os: linux
50+
lcores: ""
7351
ports:
74-
# sets up the physical link between "TG 1"@0000:00:08.0 and "SUT 1"@0000:00:08.0
7552
- pci: "0000:00:08.0"
7653
os_driver_for_dpdk: rdma
7754
os_driver: rdma
7855
peer_node: "SUT 1"
7956
peer_pci: "0000:00:08.0"
80-
# sets up the physical link between "SUT 1"@0000:00:08.0 and "TG 1"@0000:00:08.0
8157
- pci: "0000:00:08.1"
8258
os_driver_for_dpdk: rdma
8359
os_driver: rdma
8460
peer_node: "SUT 1"
8561
peer_pci: "0000:00:08.1"
86-
hugepages_2mb: # optional; if removed, will use system hugepage configuration
87-
number_of: 256
62+
use_first_core: false
63+
hugepages: # optional; if removed, will use system hugepage configuration
64+
amount: 256
8865
force_first_numa: false
8966
traffic_generator:
9067
type: SCAPY

dpdk/dts/framework/__init__.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22
# Copyright(c) 2022 PANTHEON.tech s.r.o.
33
# Copyright(c) 2022 University of New Hampshire
4-
5-
"""Libraries and utilities for running DPDK Test Suite (DTS).
6-
7-
The various modules in the DTS framework offer:
8-
9-
* Connections to nodes, both interactive and non-interactive,
10-
* A straightforward way to add support for different operating systems of remote nodes,
11-
* Test suite setup, execution and teardown, along with test case setup, execution and teardown,
12-
* Pre-test suite setup and post-test suite teardown.
13-
"""

0 commit comments

Comments
 (0)