Skip to content

Commit 3a75e33

Browse files
committed
Prepare to migrate to DPDK25.07
1 parent bddf3ce commit 3a75e33

11 files changed

+136
-162
lines changed

Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM --platform=${TARGETPLATFORM} debian:13-slim AS builder
33

44
ARG TARGETARCH
5-
ARG DPDK_VER=24.11.1
5+
ARG DPDK_VER=25.07
66
ARG DPDK_BUILDTYPE=release
77
ARG DPSERVICE_BUILDTYPE=debug
88
ARG DPSERVICE_FEATURES=""
@@ -52,17 +52,18 @@ ENV PATH="${PATH}:/usr/local/go/bin"
5252
ADD http://fast.dpdk.org/rel/dpdk-${DPDK_VER}.tar.xz dpdk.tar.xz
5353
RUN tar -xJf dpdk.tar.xz
5454

55-
ENV DPDK_DIR=/workspace/dpdk-stable-${DPDK_VER}
55+
ENV DPDK_DIR=/workspace/dpdk-${DPDK_VER}
5656

5757
# Copy DPDK patches
5858
COPY hack/*.patch hack/
59+
5960
RUN cd $DPDK_DIR \
60-
&& patch -p1 -R < ../hack/dpdk_24_11_mtu.patch \
61-
&& patch -p1 < ../hack/dpdk_24_11_fdb_def_rule.patch \
62-
&& patch -p1 < ../hack/dpdk_24_11_log.patch \
63-
&& patch -p1 < ../hack/dpdk_24_11_telemetry_key.patch \
64-
&& patch -p1 < ../hack/dpdk_24_11_no_pattern_template_validation.patch \
65-
&& patch -p1 < ../hack/dpdk_24_11_ethdev_conversion.patch
61+
&& patch -p1 < ../hack/dpdk_25_07_fdb_def_rule.patch \
62+
&& patch -p1 < ../hack/dpdk_25_07_log.patch \
63+
&& patch -p1 < ../hack/dpdk_25_07_telemetry_key.patch \
64+
&& patch -p1 < ../hack/dpdk_25_07_no_pattern_template_validation.patch \
65+
&& patch -p1 < ../hack/dpdk_25_07_ethdev_conversion.patch \
66+
&& patch -p1 < ../hack/dpdk_25_07_allow_outer_inner_ipip.patch
6667

6768
# Compile DPDK
6869
RUN cd $DPDK_DIR && meson setup -Dmax_ethports=132 -Dplatform=generic -Ddisable_drivers=common/dpaax,\

hack/dpdk_24_11_ethdev_conversion.patch

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

hack/dpdk_24_11_log.patch

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

hack/dpdk_24_11_mtu.patch

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

hack/dpdk_24_11_telemetry_key.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
2+
index 7b9e501..bc324ff 100644
3+
--- a/drivers/net/mlx5/mlx5_flow_dv.c
4+
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
5+
@@ -7927,13 +7927,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
6+
mlx5_flow_tunnel_ip_check(items, next_protocol,
7+
item_flags,
8+
&l3_tunnel_flag);
9+
- /*
10+
- * explicitly allow inner IPIP match
11+
- */
12+
- if (l3_tunnel_detection == l3_tunnel_outer) {
13+
- item_flags |= l3_tunnel_flag;
14+
- tunnel = 1;
15+
- }
16+
+
17+
ret = mlx5_flow_dv_validate_item_ipv4(dev, items,
18+
item_flags,
19+
last_item,
20+
@@ -7954,13 +7948,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
21+
mlx5_flow_tunnel_ip_check(items, next_protocol,
22+
item_flags,
23+
&l3_tunnel_flag);
24+
- /*
25+
- * explicitly allow inner IPIP match
26+
- */
27+
- if (l3_tunnel_detection == l3_tunnel_outer) {
28+
- item_flags |= l3_tunnel_flag;
29+
- tunnel = 1;
30+
- }
31+
+
32+
ret = mlx5_flow_validate_item_ipv6(dev, items,
33+
item_flags,
34+
last_item,
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
2+
index dd7c00b..044a802 100644
3+
--- a/lib/ethdev/rte_ethdev.c
4+
+++ b/lib/ethdev/rte_ethdev.c
5+
@@ -441,7 +441,7 @@ eth_is_valid_owner_id(uint64_t owner_id)
6+
}
7+
8+
RTE_EXPORT_SYMBOL(rte_eth_find_next_owned_by)
9+
-uint64_t
10+
+uint16_t
11+
rte_eth_find_next_owned_by(uint16_t port_id, const uint64_t owner_id)
12+
{
13+
port_id = rte_eth_find_next(port_id);
14+
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
15+
index f9fb6ae..f79c312 100644
16+
--- a/lib/ethdev/rte_ethdev.h
17+
+++ b/lib/ethdev/rte_ethdev.h
18+
@@ -2155,7 +2155,7 @@ struct rte_eth_dev_owner {
19+
* @return
20+
* Next valid port ID owned by owner_id, RTE_MAX_ETHPORTS if there is none.
21+
*/
22+
-uint64_t rte_eth_find_next_owned_by(uint16_t port_id,
23+
+uint16_t rte_eth_find_next_owned_by(uint16_t port_id,
24+
const uint64_t owner_id);
25+
26+
/**

hack/dpdk_24_11_fdb_def_rule.patch renamed to hack/dpdk_25_07_fdb_def_rule.patch

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
1-
This a patch to revert the effect of commit cf9a91c67b88071a03beb32a3ea9970e6ee00391.
2-
(https://github.com/DPDK/dpdk/commit/cf9a91c67b88071a03beb32a3ea9970e6ee00391)
3-
Before this commit, HA dpservice was able to run fine with fdb_def_rule_en=0.
4-
After this commit, it would require manually setting up complex rte_flow rules
5-
to achieve the same effect.
6-
This patch simply immitates the old behavior by skipping over one call.
7-
More details are to be found in the commit message.
8-
9-
101
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
11-
index 584a51b393..575ff03e8d 100644
2+
index 1321be7..8f3141d 100644
123
--- a/drivers/net/mlx5/mlx5.c
134
+++ b/drivers/net/mlx5/mlx5.c
14-
@@ -1439,7 +1439,12 @@ mlx5_dev_args_check_handler(const char *key, const char *val, void *opaque)
5+
@@ -1448,7 +1448,12 @@ mlx5_dev_args_check_handler(const char *key, const char *val, void *opaque)
156
} else if (strcmp(MLX5_ALLOW_DUPLICATE_PATTERN, key) == 0) {
167
config->allow_duplicate_pattern = !!tmp;
178
} else if (strcmp(MLX5_FDB_DEFAULT_RULE_EN, key) == 0) {
@@ -26,23 +17,23 @@ index 584a51b393..575ff03e8d 100644
2617
config->cnt_svc.service_core = tmp;
2718
} else if (strcmp(MLX5_HWS_CNT_CYCLE_TIME, key) == 0) {
2819
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
29-
index 55c29e31a2..382debdbfb 100644
20+
index c08894c..7913e5e 100644
3021
--- a/drivers/net/mlx5/mlx5.h
3122
+++ b/drivers/net/mlx5/mlx5.h
32-
@@ -377,7 +377,7 @@ struct mlx5_sh_config {
33-
uint32_t cycle_time; /* query cycle time in milli-second. */
34-
} cnt_svc; /* configure for HW steering's counter's service. */
23+
@@ -387,7 +387,7 @@ struct mlx5_sh_config {
24+
uint32_t allow_duplicate_pattern:1;
25+
uint32_t lro_allowed:1; /* Whether LRO is allowed. */
3526
/* Allow/Prevent the duplicate rules pattern. */
3627
- uint32_t fdb_def_rule:1; /* Create FDB default jump rule */
3728
+ uint32_t fdb_def_rule:2; /* Create FDB default jump rule */
3829
uint32_t repr_matching:1; /* Enable implicit vport matching in HWS FDB. */
39-
};
40-
30+
uint32_t txq_mem_algn; /* logarithm value of the TxQ address alignment. */
31+
struct {
4132
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
42-
index fe2c512c5c..0289efe3f1 100644
33+
index 6c6f228..d637fa2 100644
4334
--- a/drivers/net/mlx5/mlx5_trigger.c
4435
+++ b/drivers/net/mlx5/mlx5_trigger.c
45-
@@ -1523,7 +1523,7 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
36+
@@ -1622,7 +1622,7 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
4637
}
4738
mlx5_txq_release(dev, i);
4839
}

hack/dpdk_25_07_log.patch

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
diff --git a/lib/log/log.c b/lib/log/log.c
2+
index 8ad5250..30a893e 100644
3+
--- a/lib/log/log.c
4+
+++ b/lib/log/log.c
5+
@@ -91,6 +91,14 @@ rte_openlog_stream(FILE *f)
6+
return 0;
7+
}
8+
9+
+/* Change the print function that will be used by the logging system. */
10+
+RTE_EXPORT_SYMBOL(rte_log_set_print_func)
11+
+void
12+
+rte_log_set_print_func(int (*func)(FILE *stream, const char *format, va_list ap))
13+
+{
14+
+ rte_logs.print_func = func;
15+
+}
16+
+
17+
RTE_EXPORT_SYMBOL(rte_log_get_stream)
18+
FILE *
19+
rte_log_get_stream(void)
20+
diff --git a/lib/log/rte_log.h b/lib/log/rte_log.h
21+
index 3735137..f75cb06 100644
22+
--- a/lib/log/rte_log.h
23+
+++ b/lib/log/rte_log.h
24+
@@ -88,6 +88,18 @@ extern "C" {
25+
*/
26+
int rte_openlog_stream(FILE *f);
27+
28+
+ /**
29+
+ * Change the print function that will be used by the logging system.
30+
+ *
31+
+ * This can be done at any time. The func argument represents
32+
+ * the vfprintf-like function to be used to print the logs.
33+
+ * Without calling this function, the default (vfprintf) is used.
34+
+ *
35+
+ * @param func
36+
+ * Pointer to the print function.
37+
+ */
38+
+void rte_log_set_print_func(int (*func)(FILE *stream, const char *format, va_list ap));
39+
+
40+
/**
41+
* Retrieve the stream used by the logging system (see rte_openlog_stream()
42+
* to change it).

hack/dpdk_24_11_no_pattern_template_validation.patch renamed to hack/dpdk_25_07_no_pattern_template_validation.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
2-
index 50dbaa27ab..460ec07933 100644
2+
index 6dc16f8..3f21cd8 100644
33
--- a/drivers/net/mlx5/mlx5_flow_hw.c
44
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
5-
@@ -8838,6 +8838,8 @@ pattern_template_validate(struct rte_eth_dev *dev,
5+
@@ -8893,6 +8893,8 @@ pattern_template_validate(struct rte_eth_dev *dev,
66
uint32_t pt_num,
77
struct rte_flow_error *error)
88
{

0 commit comments

Comments
 (0)