Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,13 @@ endif

dpdk_dep = dependency(
'libdpdk',
version : '>= 24.11.1',
version : '>= 25.11',
fallback: ['dpdk', 'dpdk_dep'],
default_options: [
'c_std=c11',
'werror=false',
'enable_kmods=false',
'tests=false',
'enable_drivers=net/virtio,net/vhost,net/i40e,net/ice,common/iavf,net/iavf,net/ixgbe,net/null,net/tap,common/mlx5,net/mlx5,bus/auxiliary,net/vmxnet3',
'enable_drivers=net/virtio,net/vhost,net/i40e,net/ice,net/iavf,net/ixgbe,net/null,net/tap,common/mlx5,net/mlx5,bus/auxiliary,net/vmxnet3',
'enable_libs=graph,hash,fib,rib,pcapng,gso,vhost,cryptodev,dmadev,security',
'disable_apps=*',
'enable_docs=false',
Expand Down
2 changes: 1 addition & 1 deletion modules/dhcp/control/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ struct dhcp_packet {
uint8_t file[128];
rte_be32_t magic;
uint8_t options[];
} __rte_packed;
} __attribute__((packed));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

DPDK 25.11 release notes __rte_packed removed

💡 Result:

Yes — the old __rte_packed macro was removed (replaced by the begin/end pair). DPDK now uses __rte_packed_begin / __rte_packed_end (change announced in release notes/patches and reflected in 25.11 headers). [1][2][3]

Sources

  • DPDK release notes (noting replacement of __rte_packed with __rte_packed_begin / __rte_packed_end). [1]
  • Dev mailing-list patch discussion and plan to remove __rte_packed (targeted for 25.11). [2]
  • DPDK API/header (rte_common.h) showing __rte_packed deprecated and the begin/end macros in 25.11 tree. [3]

Replace __attribute__((packed)) with DPDK's __rte_packed_begin / __rte_packed_end macros.

While __rte_packed was removed in DPDK 25.11, the replacement should use __rte_packed_begin and __rte_packed_end as recommended in DPDK release notes. Using raw __attribute__((packed)) bypasses DPDK's macro layer and may cause portability issues.

🤖 Prompt for AI Agents
In modules/dhcp/control/client.h around line 82, the struct closure uses the raw
GCC attribute "__attribute__((packed))"; replace it with DPDK's recommended
packing macros by wrapping the struct declaration with __rte_packed_begin before
the struct and __rte_packed_end after the struct (or use the pair around the
typedef) so the compiler packing is applied via DPDK's portability layer; update
the surrounding include/guards if necessary to ensure those macros are
available.


#define DHCP_MAGIC RTE_BE32(0x63825363) // RFC 2131 section 3
#define BOOTREQUEST 1
Expand Down
3 changes: 2 additions & 1 deletion modules/infra/control/graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ int worker_graph_reload_all(gr_vec struct iface_info_port **ports) {

// these port_rx and port_tx clones are now not referenced in any graph
// we can safely delete them
// FIXME: call rte_node_free on each one of them when updating to DPDK 25.11
gr_vec_foreach (rte_node_t node, unused_nodes)
rte_node_free(node);
gr_vec_free(unused_nodes);

return 0;
Expand Down
26 changes: 13 additions & 13 deletions modules/infra/datapath/gr_icmp6.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,44 +36,44 @@ struct icmp6 {
icmp6_type_t type;
uint8_t code;
rte_be16_t cksum;
} __rte_packed;
} __attribute__((packed));

// ICMP6_ERR_DEST_UNREACH
struct icmp6_err_dest_unreach {
uint32_t __unused;
} __rte_packed;
} __attribute__((packed));

// ICMP6_ERR_PKT_TOO_BIG
struct icmp6_err_pkt_too_big {
rte_be32_t mtu;
} __rte_packed;
} __attribute__((packed));

// ICMP6_ERR_TTL_EXCEEDED
struct icmp6_err_ttl_exceeded {
uint32_t __unused;
} __rte_packed;
} __attribute__((packed));

// ICMP6_ERR_PARAM_PROBLEM
struct icmp6_err_param_problem {
rte_be32_t offset;
} __rte_packed;
} __attribute__((packed));

// ICMP6_TYPE_ECHO_REQUEST
struct icmp6_echo_request {
rte_be16_t ident;
rte_be16_t seqnum;
} __rte_packed;
} __attribute__((packed));

// ICMP6_TYPE_ECHO_REPLY
struct icmp6_echo_reply {
rte_be16_t ident;
rte_be16_t seqnum;
} __rte_packed;
} __attribute__((packed));

// ICMP6_TYPE_ROUTER_SOLICIT
struct icmp6_router_solicit {
uint32_t __reserved;
} __rte_packed;
} __attribute__((packed));

typedef enum : uint8_t {
ICMP6_RA_F_MANAGED_ADDR = GR_BIT8(0),
Expand All @@ -87,13 +87,13 @@ struct icmp6_router_advert {
rte_be16_t lifetime;
rte_be32_t reachable_time;
rte_be32_t retrans_timer;
} __rte_packed;
} __attribute__((packed));

// ICMP6_TYPE_NEIGH_SOLICIT
struct icmp6_neigh_solicit {
uint32_t __reserved;
struct rte_ipv6_addr target;
} __rte_packed;
} __attribute__((packed));

typedef enum : uint8_t {
ICMP6_NA_F_ROUTER = GR_BIT8(0),
Expand All @@ -107,7 +107,7 @@ struct icmp6_neigh_advert {
uint8_t __reserved;
uint16_t __reserved2;
struct rte_ipv6_addr target;
} __rte_packed;
} __attribute__((packed));

// ICMP6 options

Expand All @@ -123,7 +123,7 @@ typedef enum : uint8_t {
struct icmp6_opt {
icmp6_opt_t type;
uint8_t len;
} __rte_packed;
} __attribute__((packed));

// size of an option payload in units of 8 bytes
// (add 7 and truncate down to the next multiple of 8)
Expand All @@ -132,7 +132,7 @@ struct icmp6_opt {
// ICMP6_OPT_SRC_LLADDR | ICMP6_OPT_TARGET_LLADDR
struct icmp6_opt_lladdr {
struct rte_ether_addr mac;
} __rte_aligned(2) __rte_packed;
} __attribute__((packed)) __rte_aligned(2);

typedef enum {
ICMP6_OPT_INVAL = -1,
Expand Down
4 changes: 2 additions & 2 deletions modules/infra/datapath/gr_lacp.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct lacp_participant {
rte_be16_t port_number;
lacp_state_flags_t state;
uint8_t __padding[3];
} __rte_packed __rte_aligned(2);
} __attribute__((packed)) __rte_aligned(2);

struct lacp_pdu {
slow_subtype_t subtype; // LACP_SUBTYPE
Expand All @@ -96,7 +96,7 @@ struct lacp_pdu {
lacp_type_t terminator_type; // LACP_TYPE_TERMINATOR
uint8_t terminator_len; // LACP_LEN_TERMINATOR
uint8_t __padding[50]; // Pad to minimum frame size
} __rte_packed __rte_aligned(2);
} __attribute__((packed)) __rte_aligned(2);

// Standard LACP destination multicast address
#define LACP_DST_MAC ((struct rte_ether_addr) {{0x01, 0x80, 0xc2, 0x00, 0x00, 0x02}})
Expand Down
8 changes: 1 addition & 7 deletions subprojects/dpdk.wrap
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
[wrap-git]
url = https://github.com/DPDK/dpdk-stable
revision = v24.11.3
revision = v25.11
depth = 1
diff_files =
dpdk/0001-net-tap-add-netlink-helpers.patch,
dpdk/0002-net-tap-replace-ioctl-with-netlink.patch,
dpdk/0003-net-tap-detect-namespace-change.patch,
dpdk/0004-net-tap-configure-link-carrier.patch,
dpdk/net-ipv6-link-local-compliance-with-rfc-4291.diff

[provide]
dependency_names = libdpdk
Loading