dpdk: bump to DPDK 24.11.1 21/42121/9
authorVladimir Smirnov <[email protected]>
Thu, 9 Jan 2025 15:39:22 +0000 (16:39 +0100)
committerDamjan Marion <[email protected]>
Tue, 21 Jan 2025 12:31:13 +0000 (12:31 +0000)
Bump DPDK version to 24.11.1.

Reason behind going for 24.11.1 is that 24.11 was affected by
CVE-2024-11614 which was fixed in the point release.

Type: feature

Change-Id: Ic49a35fe7ac782679df39145e3adfd06f047b031
Signed-off-by: Vladimir Smirnov <[email protected]>
build/external/mlx_rdma_dpdk_matrix.txt
build/external/packages/dpdk.mk
src/plugins/dpdk/device/common.c
src/plugins/dpdk/device/device.c
src/plugins/dpdk/device/flow.c
src/plugins/dpdk/device/format.c
src/plugins/dpdk/device/init.c

index d43c95f..184a2be 100644 (file)
@@ -1,3 +1,4 @@
 rdma=49.0 dpdk=23.11
 rdma=51.0 dpdk=24.03
 rdma=55.0 dpdk=24.07
+rdma=55.0 dpdk=24.11.1
index 88051da..da6802e 100644 (file)
@@ -21,10 +21,11 @@ DPDK_MLX_IBV_LINK            ?= static
 # On most of the systems, default value for max lcores is 128
 DPDK_MAX_LCORES              ?=
 
-dpdk_version                 ?= 24.07
+dpdk_version                 ?= 24.11.1
 dpdk_base_url                ?= http://fast.dpdk.org/rel
 dpdk_tarball                 := dpdk-$(dpdk_version).tar.xz
-dpdk_tarball_sha256sum_24.07 := 9944f7e5f268e7ac9b4193e2cd54ef6d98f6e1d7dddc967c77ae4f6616d6fbbd
+
+dpdk_tarball_sha256sum_24.11.1 := bcae7d42c449fc456dfb279feabcbe0599a29bebb2fe2905761e187339d96b8e
 
 dpdk_tarball_sha256sum       := $(dpdk_tarball_sha256sum_$(dpdk_version))
 dpdk_url                     := $(dpdk_base_url)/$(dpdk_tarball)
@@ -198,8 +199,8 @@ define dpdk_config_cmds
        mkdir -p ../dpdk-meson-venv && \
        python3 -m venv ../dpdk-meson-venv && \
        source ../dpdk-meson-venv/bin/activate && \
-       (if ! ls $(PIP_DOWNLOAD_DIR)meson* ; then pip3 download -d $(PIP_DOWNLOAD_DIR) -f $(DL_CACHE_DIR) meson==0.55.3 setuptools wheel pyelftools; fi) && \
-       pip3 install --no-index --find-links=$(PIP_DOWNLOAD_DIR) meson==0.55.3 pyelftools && \
+       (if ! ls $(PIP_DOWNLOAD_DIR)meson* ; then pip3 download -d $(PIP_DOWNLOAD_DIR) -f $(DL_CACHE_DIR) meson==0.57.2 setuptools wheel pyelftools; fi) && \
+       pip3 install --no-index --find-links=$(PIP_DOWNLOAD_DIR) meson==0.57.2 pyelftools && \
        PKG_CONFIG_PATH=$(dpdk_install_dir)/lib/pkgconfig meson setup $(dpdk_src_dir) \
                $(dpdk_build_dir) \
                $(DPDK_MESON_ARGS) \
index 7a49c5a..d6eed54 100644 (file)
@@ -80,7 +80,9 @@ dpdk_device_setup (dpdk_device_t * xd)
       dpdk_device_stop (xd);
     }
 
-  rte_eth_dev_info_get (xd->port_id, &dev_info);
+  rv = rte_eth_dev_info_get (xd->port_id, &dev_info);
+  if (rv)
+    dpdk_device_error (xd, "rte_eth_dev_info_get", rv);
 
   dpdk_log_debug ("[%u] configuring device %U", xd->port_id,
                  format_dpdk_rte_device, dev_info.device);
@@ -443,6 +445,7 @@ dpdk_port_state_callback_inline (dpdk_portid_t port_id,
                                 enum rte_eth_event_type type, void *param)
 {
   struct rte_eth_link link;
+  CLIB_UNUSED (int rv);
 
   RTE_SET_USED (param);
   if (type != RTE_ETH_EVENT_INTR_LSC)
@@ -451,7 +454,8 @@ dpdk_port_state_callback_inline (dpdk_portid_t port_id,
       return -1;
     }
 
-  rte_eth_link_get_nowait (port_id, &link);
+  rv = rte_eth_link_get_nowait (port_id, &link);
+  ASSERT (rv == 0);
   u8 link_up = link.link_status;
   if (link_up)
     dpdk_log_info ("Port %d Link Up - speed %u Mbps - %s", port_id,
index 0ba5956..c5abbd5 100644 (file)
@@ -597,8 +597,10 @@ dpdk_interface_set_rss_queues (struct vnet_main_t *vnm,
   u16 valid_queue_count = 0;
   uint32_t i, j;
   uint32_t ret;
+  int __clib_unused rv;
 
-  rte_eth_dev_info_get (xd->port_id, &dev_info);
+  rv = rte_eth_dev_info_get (xd->port_id, &dev_info);
+  ASSERT (rv == 0);
 
   /* parameter check */
   if (clib_bitmap_count_set_bits (bitmap) == 0)
index 635f6f3..95be9e2 100644 (file)
    (f->type == VNET_FLOW_TYPE_IP6_IP4_N_TUPLE) ||                             \
    (f->type == VNET_FLOW_TYPE_IP6_IP6_N_TUPLE))
 
+/* get source addr from ipv6 header */
+#if (RTE_VERSION >= RTE_VERSION_NUM(24, 11, 0, 0))
+#define IP6_SRC_ADDR(ip6) ip6.hdr.src_addr.a
+#else
+#define IP6_SRC_ADDR(ip6) ip6.hdr.src_addr
+#endif
+
+/* get destination addr from ipv6 header */
+#if (RTE_VERSION >= RTE_VERSION_NUM(24, 11, 0, 0))
+#define IP6_DST_ADDR(ip6) ip6.hdr.dst_addr.a
+#else
+#define IP6_DST_ADDR(ip6) ip6.hdr.dst_addr
+#endif
+
 /* constant structs */
 static const struct rte_flow_attr ingress = {.ingress = 1 };
 
@@ -342,13 +356,13 @@ dpdk_flow_add (dpdk_device_t * xd, vnet_flow_t * f, dpdk_flow_entry_t * fe)
        }
       else
        {
-         clib_memcpy (ip6[0].hdr.src_addr, &ip6_ptr->src_addr.addr,
+         clib_memcpy (IP6_SRC_ADDR (ip6[0]), &ip6_ptr->src_addr.addr,
                       ARRAY_LEN (ip6_ptr->src_addr.addr.as_u8));
-         clib_memcpy (ip6[1].hdr.src_addr, &ip6_ptr->src_addr.mask,
+         clib_memcpy (IP6_SRC_ADDR (ip6[1]), &ip6_ptr->src_addr.mask,
                       ARRAY_LEN (ip6_ptr->src_addr.mask.as_u8));
-         clib_memcpy (ip6[0].hdr.dst_addr, &ip6_ptr->dst_addr.addr,
+         clib_memcpy (IP6_DST_ADDR (ip6[0]), &ip6_ptr->dst_addr.addr,
                       ARRAY_LEN (ip6_ptr->dst_addr.addr.as_u8));
-         clib_memcpy (ip6[1].hdr.dst_addr, &ip6_ptr->dst_addr.mask,
+         clib_memcpy (IP6_DST_ADDR (ip6[1]), &ip6_ptr->dst_addr.mask,
                       ARRAY_LEN (ip6_ptr->dst_addr.mask.as_u8));
          ip6[0].hdr.proto = ip6_ptr->protocol.prot;
          ip6[1].hdr.proto = ip6_ptr->protocol.mask;
@@ -505,13 +519,13 @@ dpdk_flow_add (dpdk_device_t * xd, vnet_flow_t * f, dpdk_flow_entry_t * fe)
        }                                                                     \
       else                                                                    \
        {                                                                     \
-         clib_memcpy (in_ip6[0].hdr.src_addr, &ptr->in_src_addr.addr,        \
+         clib_memcpy (IP6_SRC_ADDR (in_ip6[0]), &ptr->in_src_addr.addr,      \
                       ARRAY_LEN (ptr->in_src_addr.addr.as_u8));              \
-         clib_memcpy (in_ip6[1].hdr.src_addr, &ptr->in_src_addr.mask,        \
+         clib_memcpy (IP6_SRC_ADDR (in_ip6[1]), &ptr->in_src_addr.mask,      \
                       ARRAY_LEN (ptr->in_src_addr.mask.as_u8));              \
-         clib_memcpy (in_ip6[0].hdr.dst_addr, &ptr->in_dst_addr.addr,        \
+         clib_memcpy (IP6_DST_ADDR (in_ip6[0]), &ptr->in_dst_addr.addr,      \
                       ARRAY_LEN (ptr->in_dst_addr.addr.as_u8));              \
-         clib_memcpy (in_ip6[1].hdr.dst_addr, &ptr->in_dst_addr.mask,        \
+         clib_memcpy (IP6_DST_ADDR (in_ip6[1]), &ptr->in_dst_addr.mask,      \
                       ARRAY_LEN (ptr->in_dst_addr.mask.as_u8));              \
          item->spec = in_ip6;                                                \
          item->mask = in_ip6 + 1;                                            \
index c4170c2..fd301da 100644 (file)
@@ -423,10 +423,12 @@ format_dpdk_device (u8 * s, va_list * args)
   struct rte_eth_rss_conf rss_conf;
   int vlan_off;
   int retval;
+  int __clib_unused rv;
 
   dpdk_update_counters (xd, now);
   dpdk_update_link_state (xd, now);
-  rte_eth_dev_info_get (xd->port_id, &di);
+  rv = rte_eth_dev_info_get (xd->port_id, &di);
+  ASSERT (rv == 0);
 
   s = format (s, "%U\n%Ucarrier %U",
              format_dpdk_device_type, dev_instance,
index ec9e604..aaa2c1f 100644 (file)
@@ -1520,10 +1520,12 @@ dpdk_update_link_state (dpdk_device_t * xd, f64 now)
   struct rte_eth_link prev_link = xd->link;
   u32 hw_flags = 0;
   u8 hw_flags_chg = 0;
+  int __clib_unused rv;
 
   xd->time_last_link_update = now ? now : xd->time_last_link_update;
   clib_memset (&xd->link, 0, sizeof (xd->link));
-  rte_eth_link_get_nowait (xd->port_id, &xd->link);
+  rv = rte_eth_link_get_nowait (xd->port_id, &xd->link);
+  ASSERT (rv == 0);
 
   if (LINK_STATE_ELOGS)
     {