diff options
-rw-r--r-- | build/external/mlx_rdma_dpdk_matrix.txt | 1 | ||||
-rw-r--r-- | build/external/packages/dpdk.mk | 9 | ||||
-rw-r--r-- | src/plugins/dpdk/device/common.c | 8 | ||||
-rw-r--r-- | src/plugins/dpdk/device/device.c | 4 | ||||
-rw-r--r-- | src/plugins/dpdk/device/flow.c | 30 | ||||
-rw-r--r-- | src/plugins/dpdk/device/format.c | 4 | ||||
-rw-r--r-- | src/plugins/dpdk/device/init.c | 4 |
7 files changed, 43 insertions, 17 deletions
diff --git a/build/external/mlx_rdma_dpdk_matrix.txt b/build/external/mlx_rdma_dpdk_matrix.txt index d43c95fb7ee..184a2bede1e 100644 --- a/build/external/mlx_rdma_dpdk_matrix.txt +++ b/build/external/mlx_rdma_dpdk_matrix.txt @@ -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 diff --git a/build/external/packages/dpdk.mk b/build/external/packages/dpdk.mk index 88051da8851..da6802e480b 100644 --- a/build/external/packages/dpdk.mk +++ b/build/external/packages/dpdk.mk @@ -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) \ diff --git a/src/plugins/dpdk/device/common.c b/src/plugins/dpdk/device/common.c index 7a49c5aaef2..d6eed5441b4 100644 --- a/src/plugins/dpdk/device/common.c +++ b/src/plugins/dpdk/device/common.c @@ -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, diff --git a/src/plugins/dpdk/device/device.c b/src/plugins/dpdk/device/device.c index 0ba59562838..c5abbd5f727 100644 --- a/src/plugins/dpdk/device/device.c +++ b/src/plugins/dpdk/device/device.c @@ -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) diff --git a/src/plugins/dpdk/device/flow.c b/src/plugins/dpdk/device/flow.c index 635f6f37ebf..95be9e230be 100644 --- a/src/plugins/dpdk/device/flow.c +++ b/src/plugins/dpdk/device/flow.c @@ -85,6 +85,20 @@ (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; \ diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c index c4170c20329..fd301da8ea5 100644 --- a/src/plugins/dpdk/device/format.c +++ b/src/plugins/dpdk/device/format.c @@ -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, diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c index ec9e6045de7..aaa2c1f4a68 100644 --- a/src/plugins/dpdk/device/init.c +++ b/src/plugins/dpdk/device/init.c @@ -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) { |