Loading pkgs/by-name/dp/dpdk/package.nix +2 −10 Original line number Diff line number Diff line Loading @@ -33,11 +33,11 @@ stdenv.mkDerivation rec { pname = "dpdk"; version = "24.07"; version = "25.03"; src = fetchurl { url = "https://fast.dpdk.org/rel/dpdk-${version}.tar.xz"; sha256 = "sha256-mUT35fJo56ybQZPizVTvbZj24dfd3JZ8d65PZhbW+70="; sha256 = "sha256-akCnMTKChuvXloWxj/pZkua3cME4Q9Zf0NEVfPzP9j0="; }; nativeBuildInputs = [ Loading Loading @@ -69,14 +69,6 @@ stdenv.mkDerivation rec { libbsd ]; patches = [ (fetchpatch { name = "CVE-2024-11614.patch"; url = "https://git.dpdk.org/dpdk-stable/patch/?id=fdf13ea6fede07538fbe5e2a46fa6d4b2368fa81"; hash = "sha256-lD2mhPm5r1tWZb4IpzHa2SeK1DyQ3rwjzArRTpAgZAY="; }) ]; postPatch = '' patchShebangs config/arm buildtools ''; Loading pkgs/by-name/od/odp-dpdk/dpdk_25.03.patch 0 → 100644 +46 −0 Original line number Diff line number Diff line diff --git a/lib/eal/include/rte_bitops.h b/lib/eal/include/rte_bitops.h index deb1fd43f2..0f63ebe1d5 100644 --- a/lib/eal/include/rte_bitops.h +++ b/lib/eal/include/rte_bitops.h @@ -525,10 +525,12 @@ __rte_bit_ ## variant ## flip ## size(qualifier uint ## size ## _t *addr, unsign __RTE_GEN_BIT_OPS(,, size) \ __RTE_GEN_BIT_OPS(v_, volatile, size) +#ifndef __cplusplus #ifdef ALLOW_EXPERIMENTAL_API __RTE_GEN_BIT_OPS_SIZE(32) __RTE_GEN_BIT_OPS_SIZE(64) #endif +#endif #define __RTE_GEN_BIT_ATOMIC_TEST(variant, qualifier, size) \ __rte_experimental \ @@ -653,10 +655,12 @@ __rte_bit_atomic_ ## variant ## test_and_assign ## size( \ __RTE_GEN_BIT_ATOMIC_OPS(,, size) \ __RTE_GEN_BIT_ATOMIC_OPS(v_, volatile, size) +#ifndef __cplusplus #ifdef ALLOW_EXPERIMENTAL_API __RTE_GEN_BIT_ATOMIC_OPS_SIZE(32) __RTE_GEN_BIT_ATOMIC_OPS_SIZE(64) #endif +#endif /*------------------------ 32-bit relaxed operations ------------------------*/ @@ -1485,6 +1489,7 @@ rte_bit_ ## family ## fun(qualifier uint ## size ## _t *addr, arg1_type arg1_nam __RTE_BIT_OVERLOAD_SZ_4R(family, fun, qualifier, 64, ret_type, arg1_type, arg1_name, \ arg2_type, arg2_name, arg3_type, arg3_name) +#ifndef __cplusplus #ifdef ALLOW_EXPERIMENTAL_API __RTE_BIT_OVERLOAD_2R(, test, const, bool, unsigned int, nr) __RTE_BIT_OVERLOAD_2(, set,, unsigned int, nr) @@ -1502,6 +1507,7 @@ __RTE_BIT_OVERLOAD_3R(atomic_, test_and_clear,, bool, unsigned int, nr, int, mem __RTE_BIT_OVERLOAD_4R(atomic_, test_and_assign,, bool, unsigned int, nr, bool, value, int, memory_order) #endif +#endif #endif pkgs/by-name/od/odp-dpdk/odp-dpdk_25.03.patch 0 → 100644 +50 −0 Original line number Diff line number Diff line diff --git a/platform/linux-dpdk/odp_packet_dpdk.c b/platform/linux-dpdk/odp_packet_dpdk.c index cd95ba0f9..7e8b7e3f1 100644 --- a/platform/linux-dpdk/odp_packet_dpdk.c +++ b/platform/linux-dpdk/odp_packet_dpdk.c @@ -372,13 +372,18 @@ static void prepare_rss_conf(pktio_entry_t *pktio_entry, uint64_t rss_hf_capa; pkt_dpdk_t *pkt_dpdk = pkt_priv(pktio_entry); uint16_t port_id = pkt_dpdk->port_id; + int ret; memset(&pkt_dpdk->rss_conf, 0, sizeof(struct rte_eth_rss_conf)); if (!p->hash_enable) return; - rte_eth_dev_info_get(port_id, &dev_info); + ret = rte_eth_dev_info_get(port_id, &dev_info); + if (ret) { + _ODP_ERR("Failed to read device info: %d\n", ret); + return; + } rss_hf_capa = dev_info.flow_type_rss_offloads; /* Print debug info about unsupported hash protocols */ @@ -842,7 +847,11 @@ static int dpdk_start(pktio_entry_t *pktio_entry) pktio_entry->state == PKTIO_STATE_STOP_PENDING) rte_eth_dev_stop(pkt_dpdk->port_id); - rte_eth_dev_info_get(port_id, &dev_info); + ret = rte_eth_dev_info_get(port_id, &dev_info); + if (ret) { + _ODP_ERR("Failed to read device info: %d\n", ret); + return -1; + } /* Pcap driver reconfiguration may fail if number of rx/tx queues is set to zero */ if (!strncmp(dev_info.driver_name, PCAP_DRV_NAME, strlen(PCAP_DRV_NAME))) { @@ -1258,7 +1267,11 @@ static uint32_t _dpdk_vdev_mtu(uint16_t port_id) int ret; int sockfd; - rte_eth_dev_info_get(port_id, &dev_info); + ret = rte_eth_dev_info_get(port_id, &dev_info); + if (ret) { + _ODP_ERR("Failed to read device info: %d\n", ret); + return 0; + } if_indextoname(dev_info.if_index, ifr.ifr_name); sockfd = socket(AF_INET, SOCK_DGRAM, 0); ret = ioctl(sockfd, SIOCGIFMTU, &ifr); pkgs/by-name/od/odp-dpdk/package.nix +9 −1 Original line number Diff line number Diff line Loading @@ -29,13 +29,21 @@ stdenv.mkDerivation rec { hash = "sha256-9stWGupRSQwUXOdPEQ9Rhkim22p5BBA5Z+2JCYS7Za0="; }; patches = [ ./odp-dpdk_25.03.patch ]; nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ dpdk (dpdk.overrideAttrs { patches = [ ./dpdk_25.03.patch ]; }) libconfig libpcap numactl Loading pkgs/by-name/pk/pktgen/package.nix +2 −2 Original line number Diff line number Diff line Loading @@ -18,13 +18,13 @@ stdenv.mkDerivation rec { pname = "pktgen"; version = "23.10.0"; version = "24.10.3"; src = fetchFromGitHub { owner = "pktgen"; repo = "Pktgen-DPDK"; rev = "pktgen-${version}"; sha256 = "sha256-eujVEU+XkxF1kIGQJoBW3oXXNSqBEzx6mwR2XYoHinM="; sha256 = "sha256-6KC1k+LWNSU/mdwcUKjCaq8pGOcO+dFzeXX4PJm0QgE="; }; nativeBuildInputs = [ Loading Loading
pkgs/by-name/dp/dpdk/package.nix +2 −10 Original line number Diff line number Diff line Loading @@ -33,11 +33,11 @@ stdenv.mkDerivation rec { pname = "dpdk"; version = "24.07"; version = "25.03"; src = fetchurl { url = "https://fast.dpdk.org/rel/dpdk-${version}.tar.xz"; sha256 = "sha256-mUT35fJo56ybQZPizVTvbZj24dfd3JZ8d65PZhbW+70="; sha256 = "sha256-akCnMTKChuvXloWxj/pZkua3cME4Q9Zf0NEVfPzP9j0="; }; nativeBuildInputs = [ Loading Loading @@ -69,14 +69,6 @@ stdenv.mkDerivation rec { libbsd ]; patches = [ (fetchpatch { name = "CVE-2024-11614.patch"; url = "https://git.dpdk.org/dpdk-stable/patch/?id=fdf13ea6fede07538fbe5e2a46fa6d4b2368fa81"; hash = "sha256-lD2mhPm5r1tWZb4IpzHa2SeK1DyQ3rwjzArRTpAgZAY="; }) ]; postPatch = '' patchShebangs config/arm buildtools ''; Loading
pkgs/by-name/od/odp-dpdk/dpdk_25.03.patch 0 → 100644 +46 −0 Original line number Diff line number Diff line diff --git a/lib/eal/include/rte_bitops.h b/lib/eal/include/rte_bitops.h index deb1fd43f2..0f63ebe1d5 100644 --- a/lib/eal/include/rte_bitops.h +++ b/lib/eal/include/rte_bitops.h @@ -525,10 +525,12 @@ __rte_bit_ ## variant ## flip ## size(qualifier uint ## size ## _t *addr, unsign __RTE_GEN_BIT_OPS(,, size) \ __RTE_GEN_BIT_OPS(v_, volatile, size) +#ifndef __cplusplus #ifdef ALLOW_EXPERIMENTAL_API __RTE_GEN_BIT_OPS_SIZE(32) __RTE_GEN_BIT_OPS_SIZE(64) #endif +#endif #define __RTE_GEN_BIT_ATOMIC_TEST(variant, qualifier, size) \ __rte_experimental \ @@ -653,10 +655,12 @@ __rte_bit_atomic_ ## variant ## test_and_assign ## size( \ __RTE_GEN_BIT_ATOMIC_OPS(,, size) \ __RTE_GEN_BIT_ATOMIC_OPS(v_, volatile, size) +#ifndef __cplusplus #ifdef ALLOW_EXPERIMENTAL_API __RTE_GEN_BIT_ATOMIC_OPS_SIZE(32) __RTE_GEN_BIT_ATOMIC_OPS_SIZE(64) #endif +#endif /*------------------------ 32-bit relaxed operations ------------------------*/ @@ -1485,6 +1489,7 @@ rte_bit_ ## family ## fun(qualifier uint ## size ## _t *addr, arg1_type arg1_nam __RTE_BIT_OVERLOAD_SZ_4R(family, fun, qualifier, 64, ret_type, arg1_type, arg1_name, \ arg2_type, arg2_name, arg3_type, arg3_name) +#ifndef __cplusplus #ifdef ALLOW_EXPERIMENTAL_API __RTE_BIT_OVERLOAD_2R(, test, const, bool, unsigned int, nr) __RTE_BIT_OVERLOAD_2(, set,, unsigned int, nr) @@ -1502,6 +1507,7 @@ __RTE_BIT_OVERLOAD_3R(atomic_, test_and_clear,, bool, unsigned int, nr, int, mem __RTE_BIT_OVERLOAD_4R(atomic_, test_and_assign,, bool, unsigned int, nr, bool, value, int, memory_order) #endif +#endif #endif
pkgs/by-name/od/odp-dpdk/odp-dpdk_25.03.patch 0 → 100644 +50 −0 Original line number Diff line number Diff line diff --git a/platform/linux-dpdk/odp_packet_dpdk.c b/platform/linux-dpdk/odp_packet_dpdk.c index cd95ba0f9..7e8b7e3f1 100644 --- a/platform/linux-dpdk/odp_packet_dpdk.c +++ b/platform/linux-dpdk/odp_packet_dpdk.c @@ -372,13 +372,18 @@ static void prepare_rss_conf(pktio_entry_t *pktio_entry, uint64_t rss_hf_capa; pkt_dpdk_t *pkt_dpdk = pkt_priv(pktio_entry); uint16_t port_id = pkt_dpdk->port_id; + int ret; memset(&pkt_dpdk->rss_conf, 0, sizeof(struct rte_eth_rss_conf)); if (!p->hash_enable) return; - rte_eth_dev_info_get(port_id, &dev_info); + ret = rte_eth_dev_info_get(port_id, &dev_info); + if (ret) { + _ODP_ERR("Failed to read device info: %d\n", ret); + return; + } rss_hf_capa = dev_info.flow_type_rss_offloads; /* Print debug info about unsupported hash protocols */ @@ -842,7 +847,11 @@ static int dpdk_start(pktio_entry_t *pktio_entry) pktio_entry->state == PKTIO_STATE_STOP_PENDING) rte_eth_dev_stop(pkt_dpdk->port_id); - rte_eth_dev_info_get(port_id, &dev_info); + ret = rte_eth_dev_info_get(port_id, &dev_info); + if (ret) { + _ODP_ERR("Failed to read device info: %d\n", ret); + return -1; + } /* Pcap driver reconfiguration may fail if number of rx/tx queues is set to zero */ if (!strncmp(dev_info.driver_name, PCAP_DRV_NAME, strlen(PCAP_DRV_NAME))) { @@ -1258,7 +1267,11 @@ static uint32_t _dpdk_vdev_mtu(uint16_t port_id) int ret; int sockfd; - rte_eth_dev_info_get(port_id, &dev_info); + ret = rte_eth_dev_info_get(port_id, &dev_info); + if (ret) { + _ODP_ERR("Failed to read device info: %d\n", ret); + return 0; + } if_indextoname(dev_info.if_index, ifr.ifr_name); sockfd = socket(AF_INET, SOCK_DGRAM, 0); ret = ioctl(sockfd, SIOCGIFMTU, &ifr);
pkgs/by-name/od/odp-dpdk/package.nix +9 −1 Original line number Diff line number Diff line Loading @@ -29,13 +29,21 @@ stdenv.mkDerivation rec { hash = "sha256-9stWGupRSQwUXOdPEQ9Rhkim22p5BBA5Z+2JCYS7Za0="; }; patches = [ ./odp-dpdk_25.03.patch ]; nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ dpdk (dpdk.overrideAttrs { patches = [ ./dpdk_25.03.patch ]; }) libconfig libpcap numactl Loading
pkgs/by-name/pk/pktgen/package.nix +2 −2 Original line number Diff line number Diff line Loading @@ -18,13 +18,13 @@ stdenv.mkDerivation rec { pname = "pktgen"; version = "23.10.0"; version = "24.10.3"; src = fetchFromGitHub { owner = "pktgen"; repo = "Pktgen-DPDK"; rev = "pktgen-${version}"; sha256 = "sha256-eujVEU+XkxF1kIGQJoBW3oXXNSqBEzx6mwR2XYoHinM="; sha256 = "sha256-6KC1k+LWNSU/mdwcUKjCaq8pGOcO+dFzeXX4PJm0QgE="; }; nativeBuildInputs = [ Loading