patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Shani Peretz <shperetz@nvidia.com>
To: David Marchand <david.marchand@redhat.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	dpdk stable <stable@dpdk.org>
Subject: patch 'net/tap: fix build with LTO' has been queued to stable release 23.11.6
Date: Sun, 21 Dec 2025 16:57:07 +0200	[thread overview]
Message-ID: <20251221145746.763179-79-shperetz@nvidia.com> (raw)
In-Reply-To: <20251221145746.763179-1-shperetz@nvidia.com>

Hi,

FYI, your patch has been queued to stable release 23.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/26/25. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/shanipr/dpdk-stable

This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/4f83e9a5d1a8051ce5837585c983a1ace8a35090

Thanks.

Shani

---
From 4f83e9a5d1a8051ce5837585c983a1ace8a35090 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 29 Oct 2025 15:27:50 +0100
Subject: [PATCH] net/tap: fix build with LTO

[ upstream commit adb95cc6644103d055609f5bcae5df91afea02ab ]

The compiler has trouble understanding that the code is actually pointing
at the data in the message past the nh struct.

Update the tap_nlattr_add* helpers and the NLMSG_TAIL macro passing a
pointer to msg.

Bugzilla ID: 1511
Fixes: 7c25284e30c2 ("net/tap: add netlink back-end for flow API")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/tap/tap_flow.c    | 124 +++++++++++++---------------------
 drivers/net/tap/tap_netlink.c |  24 +++----
 drivers/net/tap/tap_netlink.h |  10 +--
 drivers/net/tap/tap_tcmsgs.c  |   6 +-
 4 files changed, 68 insertions(+), 96 deletions(-)

diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
index 79cd6a12ca..b32ad7eaa5 100644
--- a/drivers/net/tap/tap_flow.c
+++ b/drivers/net/tap/tap_flow.c
@@ -539,20 +539,16 @@ tap_flow_create_eth(const struct rte_flow_item *item, void *data)
 		return 0;
 	msg = &flow->msg;
 	if (!rte_is_zero_ether_addr(&mask->hdr.dst_addr)) {
-		tap_nlattr_add(&msg->nh, TCA_FLOWER_KEY_ETH_DST,
-			RTE_ETHER_ADDR_LEN,
-			   &spec->hdr.dst_addr.addr_bytes);
-		tap_nlattr_add(&msg->nh,
-			   TCA_FLOWER_KEY_ETH_DST_MASK, RTE_ETHER_ADDR_LEN,
-			   &mask->hdr.dst_addr.addr_bytes);
+		tap_nlattr_add(msg, TCA_FLOWER_KEY_ETH_DST, RTE_ETHER_ADDR_LEN,
+			&spec->hdr.dst_addr.addr_bytes);
+		tap_nlattr_add(msg, TCA_FLOWER_KEY_ETH_DST_MASK, RTE_ETHER_ADDR_LEN,
+			&mask->hdr.dst_addr.addr_bytes);
 	}
 	if (!rte_is_zero_ether_addr(&mask->hdr.src_addr)) {
-		tap_nlattr_add(&msg->nh, TCA_FLOWER_KEY_ETH_SRC,
-			RTE_ETHER_ADDR_LEN,
+		tap_nlattr_add(msg, TCA_FLOWER_KEY_ETH_SRC, RTE_ETHER_ADDR_LEN,
 			&spec->hdr.src_addr.addr_bytes);
-		tap_nlattr_add(&msg->nh,
-			   TCA_FLOWER_KEY_ETH_SRC_MASK, RTE_ETHER_ADDR_LEN,
-			   &mask->hdr.src_addr.addr_bytes);
+		tap_nlattr_add(msg, TCA_FLOWER_KEY_ETH_SRC_MASK, RTE_ETHER_ADDR_LEN,
+			&mask->hdr.src_addr.addr_bytes);
 	}
 	return 0;
 }
@@ -608,11 +604,9 @@ tap_flow_create_vlan(const struct rte_flow_item *item, void *data)
 		uint8_t vid = VLAN_ID(tci);
 
 		if (prio)
-			tap_nlattr_add8(&msg->nh,
-					TCA_FLOWER_KEY_VLAN_PRIO, prio);
+			tap_nlattr_add8(msg, TCA_FLOWER_KEY_VLAN_PRIO, prio);
 		if (vid)
-			tap_nlattr_add16(&msg->nh,
-					 TCA_FLOWER_KEY_VLAN_ID, vid);
+			tap_nlattr_add16(msg, TCA_FLOWER_KEY_VLAN_ID, vid);
 	}
 	return 0;
 }
@@ -655,20 +649,15 @@ tap_flow_create_ipv4(const struct rte_flow_item *item, void *data)
 	if (!spec)
 		return 0;
 	if (mask->hdr.dst_addr) {
-		tap_nlattr_add32(&msg->nh, TCA_FLOWER_KEY_IPV4_DST,
-			     spec->hdr.dst_addr);
-		tap_nlattr_add32(&msg->nh, TCA_FLOWER_KEY_IPV4_DST_MASK,
-			     mask->hdr.dst_addr);
+		tap_nlattr_add32(msg, TCA_FLOWER_KEY_IPV4_DST, spec->hdr.dst_addr);
+		tap_nlattr_add32(msg, TCA_FLOWER_KEY_IPV4_DST_MASK, mask->hdr.dst_addr);
 	}
 	if (mask->hdr.src_addr) {
-		tap_nlattr_add32(&msg->nh, TCA_FLOWER_KEY_IPV4_SRC,
-			     spec->hdr.src_addr);
-		tap_nlattr_add32(&msg->nh, TCA_FLOWER_KEY_IPV4_SRC_MASK,
-			     mask->hdr.src_addr);
+		tap_nlattr_add32(msg, TCA_FLOWER_KEY_IPV4_SRC, spec->hdr.src_addr);
+		tap_nlattr_add32(msg, TCA_FLOWER_KEY_IPV4_SRC_MASK, mask->hdr.src_addr);
 	}
 	if (spec->hdr.next_proto_id)
-		tap_nlattr_add8(&msg->nh, TCA_FLOWER_KEY_IP_PROTO,
-			    spec->hdr.next_proto_id);
+		tap_nlattr_add8(msg, TCA_FLOWER_KEY_IP_PROTO, spec->hdr.next_proto_id);
 	return 0;
 }
 
@@ -711,20 +700,19 @@ tap_flow_create_ipv6(const struct rte_flow_item *item, void *data)
 	if (!spec)
 		return 0;
 	if (memcmp(mask->hdr.dst_addr, empty_addr, 16)) {
-		tap_nlattr_add(&msg->nh, TCA_FLOWER_KEY_IPV6_DST,
-			   sizeof(spec->hdr.dst_addr), &spec->hdr.dst_addr);
-		tap_nlattr_add(&msg->nh, TCA_FLOWER_KEY_IPV6_DST_MASK,
-			   sizeof(mask->hdr.dst_addr), &mask->hdr.dst_addr);
+		tap_nlattr_add(msg, TCA_FLOWER_KEY_IPV6_DST, sizeof(spec->hdr.dst_addr),
+			&spec->hdr.dst_addr);
+		tap_nlattr_add(msg, TCA_FLOWER_KEY_IPV6_DST_MASK, sizeof(mask->hdr.dst_addr),
+			&mask->hdr.dst_addr);
 	}
 	if (memcmp(mask->hdr.src_addr, empty_addr, 16)) {
-		tap_nlattr_add(&msg->nh, TCA_FLOWER_KEY_IPV6_SRC,
-			   sizeof(spec->hdr.src_addr), &spec->hdr.src_addr);
-		tap_nlattr_add(&msg->nh, TCA_FLOWER_KEY_IPV6_SRC_MASK,
-			   sizeof(mask->hdr.src_addr), &mask->hdr.src_addr);
+		tap_nlattr_add(msg, TCA_FLOWER_KEY_IPV6_SRC, sizeof(spec->hdr.src_addr),
+			&spec->hdr.src_addr);
+		tap_nlattr_add(msg, TCA_FLOWER_KEY_IPV6_SRC_MASK, sizeof(mask->hdr.src_addr),
+			&mask->hdr.src_addr);
 	}
 	if (spec->hdr.proto)
-		tap_nlattr_add8(&msg->nh,
-				TCA_FLOWER_KEY_IP_PROTO, spec->hdr.proto);
+		tap_nlattr_add8(msg, TCA_FLOWER_KEY_IP_PROTO, spec->hdr.proto);
 	return 0;
 }
 
@@ -762,15 +750,13 @@ tap_flow_create_udp(const struct rte_flow_item *item, void *data)
 	if (!flow)
 		return 0;
 	msg = &flow->msg;
-	tap_nlattr_add8(&msg->nh, TCA_FLOWER_KEY_IP_PROTO, IPPROTO_UDP);
+	tap_nlattr_add8(msg, TCA_FLOWER_KEY_IP_PROTO, IPPROTO_UDP);
 	if (!spec)
 		return 0;
 	if (mask->hdr.dst_port)
-		tap_nlattr_add16(&msg->nh, TCA_FLOWER_KEY_UDP_DST,
-			     spec->hdr.dst_port);
+		tap_nlattr_add16(msg, TCA_FLOWER_KEY_UDP_DST, spec->hdr.dst_port);
 	if (mask->hdr.src_port)
-		tap_nlattr_add16(&msg->nh, TCA_FLOWER_KEY_UDP_SRC,
-			     spec->hdr.src_port);
+		tap_nlattr_add16(msg, TCA_FLOWER_KEY_UDP_SRC, spec->hdr.src_port);
 	return 0;
 }
 
@@ -808,15 +794,13 @@ tap_flow_create_tcp(const struct rte_flow_item *item, void *data)
 	if (!flow)
 		return 0;
 	msg = &flow->msg;
-	tap_nlattr_add8(&msg->nh, TCA_FLOWER_KEY_IP_PROTO, IPPROTO_TCP);
+	tap_nlattr_add8(msg, TCA_FLOWER_KEY_IP_PROTO, IPPROTO_TCP);
 	if (!spec)
 		return 0;
 	if (mask->hdr.dst_port)
-		tap_nlattr_add16(&msg->nh, TCA_FLOWER_KEY_TCP_DST,
-			     spec->hdr.dst_port);
+		tap_nlattr_add16(msg, TCA_FLOWER_KEY_TCP_DST, spec->hdr.dst_port);
 	if (mask->hdr.src_port)
-		tap_nlattr_add16(&msg->nh, TCA_FLOWER_KEY_TCP_SRC,
-			     spec->hdr.src_port);
+		tap_nlattr_add16(msg, TCA_FLOWER_KEY_TCP_SRC, spec->hdr.src_port);
 	return 0;
 }
 
@@ -924,35 +908,27 @@ add_action(struct rte_flow *flow, size_t *act_index, struct action_data *adata)
 	if (tap_nlattr_nested_start(msg, (*act_index)++) < 0)
 		return -1;
 
-	tap_nlattr_add(&msg->nh, TCA_ACT_KIND,
-				strlen(adata->id) + 1, adata->id);
+	tap_nlattr_add(msg, TCA_ACT_KIND, strlen(adata->id) + 1, adata->id);
 	if (tap_nlattr_nested_start(msg, TCA_ACT_OPTIONS) < 0)
 		return -1;
 	if (strcmp("gact", adata->id) == 0) {
-		tap_nlattr_add(&msg->nh, TCA_GACT_PARMS, sizeof(adata->gact),
-			   &adata->gact);
+		tap_nlattr_add(msg, TCA_GACT_PARMS, sizeof(adata->gact), &adata->gact);
 	} else if (strcmp("mirred", adata->id) == 0) {
 		if (adata->mirred.eaction == TCA_EGRESS_MIRROR)
 			adata->mirred.action = TC_ACT_PIPE;
 		else /* REDIRECT */
 			adata->mirred.action = TC_ACT_STOLEN;
-		tap_nlattr_add(&msg->nh, TCA_MIRRED_PARMS,
-			   sizeof(adata->mirred),
-			   &adata->mirred);
+		tap_nlattr_add(msg, TCA_MIRRED_PARMS, sizeof(adata->mirred), &adata->mirred);
 	} else if (strcmp("skbedit", adata->id) == 0) {
-		tap_nlattr_add(&msg->nh, TCA_SKBEDIT_PARMS,
-			   sizeof(adata->skbedit.skbedit),
-			   &adata->skbedit.skbedit);
-		tap_nlattr_add16(&msg->nh, TCA_SKBEDIT_QUEUE_MAPPING,
-			     adata->skbedit.queue);
+		tap_nlattr_add(msg, TCA_SKBEDIT_PARMS, sizeof(adata->skbedit.skbedit),
+			&adata->skbedit.skbedit);
+		tap_nlattr_add16(msg, TCA_SKBEDIT_QUEUE_MAPPING, adata->skbedit.queue);
 	} else if (strcmp("bpf", adata->id) == 0) {
-		tap_nlattr_add32(&msg->nh, TCA_ACT_BPF_FD, adata->bpf.bpf_fd);
-		tap_nlattr_add(&msg->nh, TCA_ACT_BPF_NAME,
-			   strlen(adata->bpf.annotation) + 1,
-			   adata->bpf.annotation);
-		tap_nlattr_add(&msg->nh, TCA_ACT_BPF_PARMS,
-			   sizeof(adata->bpf.bpf),
-			   &adata->bpf.bpf);
+		tap_nlattr_add32(msg, TCA_ACT_BPF_FD, adata->bpf.bpf_fd);
+		tap_nlattr_add(msg, TCA_ACT_BPF_NAME, strlen(adata->bpf.annotation) + 1,
+			adata->bpf.annotation);
+		tap_nlattr_add(msg, TCA_ACT_BPF_PARMS, sizeof(adata->bpf.bpf),
+			&adata->bpf.bpf);
 	} else {
 		return -1;
 	}
@@ -1082,7 +1058,7 @@ priv_flow_process(struct pmd_internals *pmd,
 				TC_H_MAKE(MULTIQ_MAJOR_HANDLE, 0);
 		}
 		/* use flower filter type */
-		tap_nlattr_add(&flow->msg.nh, TCA_KIND, sizeof("flower"), "flower");
+		tap_nlattr_add(&flow->msg, TCA_KIND, sizeof("flower"), "flower");
 		if (tap_nlattr_nested_start(&flow->msg, TCA_OPTIONS) < 0) {
 			rte_flow_error_set(error, ENOMEM, RTE_FLOW_ERROR_TYPE_ACTION,
 					   actions, "could not allocated netlink msg");
@@ -1122,15 +1098,11 @@ priv_flow_process(struct pmd_internals *pmd,
 	}
 	if (flow) {
 		if (data.vlan) {
-			tap_nlattr_add16(&flow->msg.nh, TCA_FLOWER_KEY_ETH_TYPE,
-				     htons(ETH_P_8021Q));
-			tap_nlattr_add16(&flow->msg.nh,
-				     TCA_FLOWER_KEY_VLAN_ETH_TYPE,
-				     data.eth_type ?
-				     data.eth_type : htons(ETH_P_ALL));
+			tap_nlattr_add16(&flow->msg, TCA_FLOWER_KEY_ETH_TYPE, htons(ETH_P_8021Q));
+			tap_nlattr_add16(&flow->msg, TCA_FLOWER_KEY_VLAN_ETH_TYPE,
+				data.eth_type ?  data.eth_type : htons(ETH_P_ALL));
 		} else if (data.eth_type) {
-			tap_nlattr_add16(&flow->msg.nh, TCA_FLOWER_KEY_ETH_TYPE,
-				     data.eth_type);
+			tap_nlattr_add16(&flow->msg, TCA_FLOWER_KEY_ETH_TYPE, data.eth_type);
 		}
 	}
 	if (mirred && flow) {
@@ -1923,13 +1895,13 @@ static int rss_enable(struct pmd_internals *pmd,
 		msg->t.tcm_info = TC_H_MAKE(prio << 16, msg->t.tcm_info);
 		msg->t.tcm_parent = TC_H_MAKE(MULTIQ_MAJOR_HANDLE, 0);
 
-		tap_nlattr_add(&msg->nh, TCA_KIND, sizeof("bpf"), "bpf");
+		tap_nlattr_add(msg, TCA_KIND, sizeof("bpf"), "bpf");
 		if (tap_nlattr_nested_start(msg, TCA_OPTIONS) < 0)
 			return -1;
-		tap_nlattr_add32(&msg->nh, TCA_BPF_FD, pmd->bpf_fd[i]);
+		tap_nlattr_add32(msg, TCA_BPF_FD, pmd->bpf_fd[i]);
 		snprintf(annotation, sizeof(annotation), "[%s%d]",
 			SEC_NAME_CLS_Q, i);
-		tap_nlattr_add(&msg->nh, TCA_BPF_NAME, strlen(annotation) + 1,
+		tap_nlattr_add(msg, TCA_BPF_NAME, strlen(annotation) + 1,
 			   annotation);
 		/* Actions */
 		{
diff --git a/drivers/net/tap/tap_netlink.c b/drivers/net/tap/tap_netlink.c
index c1f7ff56da..98f48a399a 100644
--- a/drivers/net/tap/tap_netlink.c
+++ b/drivers/net/tap/tap_netlink.c
@@ -292,18 +292,18 @@ retry:
  *   The data to append.
  */
 void
-tap_nlattr_add(struct nlmsghdr *nh, unsigned short type,
+tap_nlattr_add(struct nlmsg *msg, unsigned short type,
 	   unsigned int data_len, const void *data)
 {
 	/* see man 3 rtnetlink */
 	struct rtattr *rta;
 
-	rta = (struct rtattr *)NLMSG_TAIL(nh);
+	rta = (struct rtattr *)NLMSG_TAIL(msg);
 	rta->rta_len = RTA_LENGTH(data_len);
 	rta->rta_type = type;
 	if (data_len > 0)
 		memcpy(RTA_DATA(rta), data, data_len);
-	nh->nlmsg_len = NLMSG_ALIGN(nh->nlmsg_len) + RTA_ALIGN(rta->rta_len);
+	msg->nh.nlmsg_len = NLMSG_ALIGN(msg->nh.nlmsg_len) + RTA_ALIGN(rta->rta_len);
 }
 
 /**
@@ -317,9 +317,9 @@ tap_nlattr_add(struct nlmsghdr *nh, unsigned short type,
  *   The data to append.
  */
 void
-tap_nlattr_add8(struct nlmsghdr *nh, unsigned short type, uint8_t data)
+tap_nlattr_add8(struct nlmsg *msg, unsigned short type, uint8_t data)
 {
-	tap_nlattr_add(nh, type, sizeof(uint8_t), &data);
+	tap_nlattr_add(msg, type, sizeof(uint8_t), &data);
 }
 
 /**
@@ -333,9 +333,9 @@ tap_nlattr_add8(struct nlmsghdr *nh, unsigned short type, uint8_t data)
  *   The data to append.
  */
 void
-tap_nlattr_add16(struct nlmsghdr *nh, unsigned short type, uint16_t data)
+tap_nlattr_add16(struct nlmsg *msg, unsigned short type, uint16_t data)
 {
-	tap_nlattr_add(nh, type, sizeof(uint16_t), &data);
+	tap_nlattr_add(msg, type, sizeof(uint16_t), &data);
 }
 
 /**
@@ -349,9 +349,9 @@ tap_nlattr_add16(struct nlmsghdr *nh, unsigned short type, uint16_t data)
  *   The data to append.
  */
 void
-tap_nlattr_add32(struct nlmsghdr *nh, unsigned short type, uint32_t data)
+tap_nlattr_add32(struct nlmsg *msg, unsigned short type, uint32_t data)
 {
-	tap_nlattr_add(nh, type, sizeof(uint32_t), &data);
+	tap_nlattr_add(msg, type, sizeof(uint32_t), &data);
 }
 
 /**
@@ -378,9 +378,9 @@ tap_nlattr_nested_start(struct nlmsg *msg, uint16_t type)
 		return -1;
 	}
 
-	tail->tail = (struct rtattr *)NLMSG_TAIL(&msg->nh);
+	tail->tail = (struct rtattr *)NLMSG_TAIL(msg);
 
-	tap_nlattr_add(&msg->nh, type, 0, NULL);
+	tap_nlattr_add(msg, type, 0, NULL);
 
 	tail->prev = msg->nested_tails;
 
@@ -403,7 +403,7 @@ tap_nlattr_nested_finish(struct nlmsg *msg)
 {
 	struct nested_tail *tail = msg->nested_tails;
 
-	tail->tail->rta_len = (char *)NLMSG_TAIL(&msg->nh) - (char *)tail->tail;
+	tail->tail->rta_len = (char *)NLMSG_TAIL(msg) - (char *)tail->tail;
 
 	if (tail->prev)
 		msg->nested_tails = tail->prev;
diff --git a/drivers/net/tap/tap_netlink.h b/drivers/net/tap/tap_netlink.h
index faa73ba163..c1493b6bf0 100644
--- a/drivers/net/tap/tap_netlink.h
+++ b/drivers/net/tap/tap_netlink.h
@@ -23,7 +23,7 @@ struct nlmsg {
 	struct nested_tail *nested_tails;
 };
 
-#define NLMSG_TAIL(nlh) (void *)((char *)(nlh) + NLMSG_ALIGN((nlh)->nlmsg_len))
+#define NLMSG_TAIL(msg) (void *)((char *)(msg) + NLMSG_ALIGN((msg)->nh.nlmsg_len))
 
 int tap_nl_init(uint32_t nl_groups);
 int tap_nl_final(int nlsk_fd);
@@ -31,11 +31,11 @@ int tap_nl_send(int nlsk_fd, struct nlmsghdr *nh);
 int tap_nl_recv(int nlsk_fd, int (*callback)(struct nlmsghdr *, void *),
 		void *arg);
 int tap_nl_recv_ack(int nlsk_fd);
-void tap_nlattr_add(struct nlmsghdr *nh, unsigned short type,
+void tap_nlattr_add(struct nlmsg *msg, unsigned short type,
 		    unsigned int data_len, const void *data);
-void tap_nlattr_add8(struct nlmsghdr *nh, unsigned short type, uint8_t data);
-void tap_nlattr_add16(struct nlmsghdr *nh, unsigned short type, uint16_t data);
-void tap_nlattr_add32(struct nlmsghdr *nh, unsigned short type, uint32_t data);
+void tap_nlattr_add8(struct nlmsg *msg, unsigned short type, uint8_t data);
+void tap_nlattr_add16(struct nlmsg *msg, unsigned short type, uint16_t data);
+void tap_nlattr_add32(struct nlmsg *msg, unsigned short type, uint32_t data);
 int tap_nlattr_nested_start(struct nlmsg *msg, uint16_t type);
 void tap_nlattr_nested_finish(struct nlmsg *msg);
 
diff --git a/drivers/net/tap/tap_tcmsgs.c b/drivers/net/tap/tap_tcmsgs.c
index 24a0423a0e..f811deef24 100644
--- a/drivers/net/tap/tap_tcmsgs.c
+++ b/drivers/net/tap/tap_tcmsgs.c
@@ -123,8 +123,8 @@ qdisc_add_multiq(int nlsk_fd, unsigned int ifindex)
 		    NLM_F_REQUEST | NLM_F_ACK | NLM_F_EXCL | NLM_F_CREATE);
 	msg.t.tcm_handle = TC_H_MAKE(MULTIQ_MAJOR_HANDLE, 0);
 	msg.t.tcm_parent = TC_H_ROOT;
-	tap_nlattr_add(&msg.nh, TCA_KIND, sizeof("multiq"), "multiq");
-	tap_nlattr_add(&msg.nh, TCA_OPTIONS, sizeof(opt), &opt);
+	tap_nlattr_add(&msg, TCA_KIND, sizeof("multiq"), "multiq");
+	tap_nlattr_add(&msg, TCA_OPTIONS, sizeof(opt), &opt);
 	if (tap_nl_send(nlsk_fd, &msg.nh) < 0)
 		return -1;
 	if (tap_nl_recv_ack(nlsk_fd) < 0)
@@ -152,7 +152,7 @@ qdisc_add_ingress(int nlsk_fd, unsigned int ifindex)
 		    NLM_F_REQUEST | NLM_F_ACK | NLM_F_EXCL | NLM_F_CREATE);
 	msg.t.tcm_handle = TC_H_MAKE(TC_H_INGRESS, 0);
 	msg.t.tcm_parent = TC_H_INGRESS;
-	tap_nlattr_add(&msg.nh, TCA_KIND, sizeof("ingress"), "ingress");
+	tap_nlattr_add(&msg, TCA_KIND, sizeof("ingress"), "ingress");
 	if (tap_nl_send(nlsk_fd, &msg.nh) < 0)
 		return -1;
 	if (tap_nl_recv_ack(nlsk_fd) < 0)
-- 
2.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-12-21 16:54:21.113834822 +0200
+++ 0079-net-tap-fix-build-with-LTO.patch	2025-12-21 16:54:17.344060000 +0200
@@ -1 +1 @@
-From adb95cc6644103d055609f5bcae5df91afea02ab Mon Sep 17 00:00:00 2001
+From 4f83e9a5d1a8051ce5837585c983a1ace8a35090 Mon Sep 17 00:00:00 2001
@@ -3 +3 @@
-Date: Mon, 22 Sep 2025 09:30:43 +0200
+Date: Wed, 29 Oct 2025 15:27:50 +0100
@@ -5,0 +6,2 @@
+[ upstream commit adb95cc6644103d055609f5bcae5df91afea02ab ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
- drivers/net/tap/tap_flow.c    | 117 +++++++++++++---------------------
+ drivers/net/tap/tap_flow.c    | 124 +++++++++++++---------------------
@@ -23 +24 @@
- 4 files changed, 65 insertions(+), 92 deletions(-)
+ 4 files changed, 68 insertions(+), 96 deletions(-)
@@ -26 +27 @@
-index 373b773e2d..9d4ef27a8a 100644
+index 79cd6a12ca..b32ad7eaa5 100644
@@ -29 +30 @@
-@@ -430,20 +430,16 @@ tap_flow_create_eth(const struct rte_flow_item *item, struct convert_data *info)
+@@ -539,20 +539,16 @@ tap_flow_create_eth(const struct rte_flow_item *item, void *data)
@@ -57 +58 @@
-@@ -498,11 +494,9 @@ tap_flow_create_vlan(const struct rte_flow_item *item, struct convert_data *info
+@@ -608,11 +604,9 @@ tap_flow_create_vlan(const struct rte_flow_item *item, void *data)
@@ -71 +72 @@
-@@ -544,20 +538,15 @@ tap_flow_create_ipv4(const struct rte_flow_item *item, struct convert_data *info
+@@ -655,20 +649,15 @@ tap_flow_create_ipv4(const struct rte_flow_item *item, void *data)
@@ -97 +98 @@
-@@ -599,20 +588,19 @@ tap_flow_create_ipv6(const struct rte_flow_item *item, struct convert_data *info
+@@ -711,20 +700,19 @@ tap_flow_create_ipv6(const struct rte_flow_item *item, void *data)
@@ -100 +101 @@
- 	if (memcmp(&mask->hdr.dst_addr, empty_addr, 16)) {
+ 	if (memcmp(mask->hdr.dst_addr, empty_addr, 16)) {
@@ -110 +111 @@
- 	if (memcmp(&mask->hdr.src_addr, empty_addr, 16)) {
+ 	if (memcmp(mask->hdr.src_addr, empty_addr, 16)) {
@@ -127 +128 @@
-@@ -649,15 +637,13 @@ tap_flow_create_udp(const struct rte_flow_item *item, struct convert_data *info)
+@@ -762,15 +750,13 @@ tap_flow_create_udp(const struct rte_flow_item *item, void *data)
@@ -146 +147 @@
-@@ -694,15 +680,13 @@ tap_flow_create_tcp(const struct rte_flow_item *item, struct convert_data *info)
+@@ -808,15 +794,13 @@ tap_flow_create_tcp(const struct rte_flow_item *item, void *data)
@@ -165 +166 @@
-@@ -810,37 +794,30 @@ add_action(struct rte_flow *flow, size_t *act_index, struct action_data *adata)
+@@ -924,35 +908,27 @@ add_action(struct rte_flow *flow, size_t *act_index, struct action_data *adata)
@@ -189 +190,4 @@
--			   sizeof(adata->skbedit.skbedit), &adata->skbedit.skbedit);
+-			   sizeof(adata->skbedit.skbedit),
+-			   &adata->skbedit.skbedit);
+-		tap_nlattr_add16(&msg->nh, TCA_SKBEDIT_QUEUE_MAPPING,
+-			     adata->skbedit.queue);
@@ -192,6 +196 @@
- 		if (adata->skbedit.mark)
--			tap_nlattr_add32(&msg->nh, TCA_SKBEDIT_MARK, adata->skbedit.mark);
-+			tap_nlattr_add32(msg, TCA_SKBEDIT_MARK, adata->skbedit.mark);
- 		else
--			tap_nlattr_add16(&msg->nh, TCA_SKBEDIT_QUEUE_MAPPING, adata->skbedit.queue);
-+			tap_nlattr_add16(msg, TCA_SKBEDIT_QUEUE_MAPPING, adata->skbedit.queue);
++		tap_nlattr_add16(msg, TCA_SKBEDIT_QUEUE_MAPPING, adata->skbedit.queue);
@@ -199 +197,0 @@
- #ifdef HAVE_BPF_RSS
@@ -210,3 +208,3 @@
-+		tap_nlattr_add(msg, TCA_ACT_BPF_PARMS, sizeof(adata->bpf.bpf), &adata->bpf.bpf);
- #else
- 		TAP_LOG(ERR, "Internal error: bpf requested but not supported");
++		tap_nlattr_add(msg, TCA_ACT_BPF_PARMS, sizeof(adata->bpf.bpf),
++			&adata->bpf.bpf);
+ 	} else {
@@ -214 +212,2 @@
-@@ -975,7 +952,7 @@ priv_flow_process(struct pmd_internals *pmd,
+ 	}
+@@ -1082,7 +1058,7 @@ priv_flow_process(struct pmd_internals *pmd,
@@ -223 +222 @@
-@@ -1015,15 +992,11 @@ priv_flow_process(struct pmd_internals *pmd,
+@@ -1122,15 +1098,11 @@ priv_flow_process(struct pmd_internals *pmd,
@@ -242,0 +242,17 @@
+@@ -1923,13 +1895,13 @@ static int rss_enable(struct pmd_internals *pmd,
+ 		msg->t.tcm_info = TC_H_MAKE(prio << 16, msg->t.tcm_info);
+ 		msg->t.tcm_parent = TC_H_MAKE(MULTIQ_MAJOR_HANDLE, 0);
+ 
+-		tap_nlattr_add(&msg->nh, TCA_KIND, sizeof("bpf"), "bpf");
++		tap_nlattr_add(msg, TCA_KIND, sizeof("bpf"), "bpf");
+ 		if (tap_nlattr_nested_start(msg, TCA_OPTIONS) < 0)
+ 			return -1;
+-		tap_nlattr_add32(&msg->nh, TCA_BPF_FD, pmd->bpf_fd[i]);
++		tap_nlattr_add32(msg, TCA_BPF_FD, pmd->bpf_fd[i]);
+ 		snprintf(annotation, sizeof(annotation), "[%s%d]",
+ 			SEC_NAME_CLS_Q, i);
+-		tap_nlattr_add(&msg->nh, TCA_BPF_NAME, strlen(annotation) + 1,
++		tap_nlattr_add(msg, TCA_BPF_NAME, strlen(annotation) + 1,
+ 			   annotation);
+ 		/* Actions */
+ 		{
@@ -244 +260 @@
-index 8a57c9242c..5ff60f41d4 100644
+index c1f7ff56da..98f48a399a 100644
@@ -247 +263 @@
-@@ -293,18 +293,18 @@ retry:
+@@ -292,18 +292,18 @@ retry:
@@ -252 +268 @@
-+tap_nlattr_add(struct tap_nlmsg *msg, unsigned short type,
++tap_nlattr_add(struct nlmsg *msg, unsigned short type,
@@ -269 +285 @@
-@@ -318,9 +318,9 @@ tap_nlattr_add(struct nlmsghdr *nh, unsigned short type,
+@@ -317,9 +317,9 @@ tap_nlattr_add(struct nlmsghdr *nh, unsigned short type,
@@ -274 +290 @@
-+tap_nlattr_add8(struct tap_nlmsg *msg, unsigned short type, uint8_t data)
++tap_nlattr_add8(struct nlmsg *msg, unsigned short type, uint8_t data)
@@ -281 +297 @@
-@@ -334,9 +334,9 @@ tap_nlattr_add8(struct nlmsghdr *nh, unsigned short type, uint8_t data)
+@@ -333,9 +333,9 @@ tap_nlattr_add8(struct nlmsghdr *nh, unsigned short type, uint8_t data)
@@ -286 +302 @@
-+tap_nlattr_add16(struct tap_nlmsg *msg, unsigned short type, uint16_t data)
++tap_nlattr_add16(struct nlmsg *msg, unsigned short type, uint16_t data)
@@ -293 +309 @@
-@@ -350,9 +350,9 @@ tap_nlattr_add16(struct nlmsghdr *nh, unsigned short type, uint16_t data)
+@@ -349,9 +349,9 @@ tap_nlattr_add16(struct nlmsghdr *nh, unsigned short type, uint16_t data)
@@ -298 +314 @@
-+tap_nlattr_add32(struct tap_nlmsg *msg, unsigned short type, uint32_t data)
++tap_nlattr_add32(struct nlmsg *msg, unsigned short type, uint32_t data)
@@ -305 +321 @@
-@@ -379,9 +379,9 @@ tap_nlattr_nested_start(struct tap_nlmsg *msg, uint16_t type)
+@@ -378,9 +378,9 @@ tap_nlattr_nested_start(struct nlmsg *msg, uint16_t type)
@@ -317 +333 @@
-@@ -404,7 +404,7 @@ tap_nlattr_nested_finish(struct tap_nlmsg *msg)
+@@ -403,7 +403,7 @@ tap_nlattr_nested_finish(struct nlmsg *msg)
@@ -327 +343 @@
-index 466c47a6d7..5eff6edbb1 100644
+index faa73ba163..c1493b6bf0 100644
@@ -330 +346 @@
-@@ -23,7 +23,7 @@ struct tap_nlmsg {
+@@ -23,7 +23,7 @@ struct nlmsg {
@@ -344 +360 @@
-+void tap_nlattr_add(struct tap_nlmsg *msg, unsigned short type,
++void tap_nlattr_add(struct nlmsg *msg, unsigned short type,
@@ -349,5 +365,5 @@
-+void tap_nlattr_add8(struct tap_nlmsg *msg, unsigned short type, uint8_t data);
-+void tap_nlattr_add16(struct tap_nlmsg *msg, unsigned short type, uint16_t data);
-+void tap_nlattr_add32(struct tap_nlmsg *msg, unsigned short type, uint32_t data);
- int tap_nlattr_nested_start(struct tap_nlmsg *msg, uint16_t type);
- void tap_nlattr_nested_finish(struct tap_nlmsg *msg);
++void tap_nlattr_add8(struct nlmsg *msg, unsigned short type, uint8_t data);
++void tap_nlattr_add16(struct nlmsg *msg, unsigned short type, uint16_t data);
++void tap_nlattr_add32(struct nlmsg *msg, unsigned short type, uint32_t data);
+ int tap_nlattr_nested_start(struct nlmsg *msg, uint16_t type);
+ void tap_nlattr_nested_finish(struct nlmsg *msg);
@@ -356 +372 @@
-index caca9445c8..c32f0ff815 100644
+index 24a0423a0e..f811deef24 100644

  parent reply	other threads:[~2025-12-21 15:04 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-21 14:55 patch 'test/telemetry: fix test calling all commands' " Shani Peretz
2025-12-21 14:55 ` patch 'eal: fix plugin dir walk' " Shani Peretz
2025-12-21 14:55 ` patch 'cmdline: fix port list parsing' " Shani Peretz
2025-12-21 14:55 ` patch 'cmdline: fix highest bit " Shani Peretz
2025-12-21 14:55 ` patch 'tailq: fix lookup macro' " Shani Peretz
2025-12-21 14:55 ` patch 'hash: fix unaligned access in predictable RSS' " Shani Peretz
2025-12-21 14:55 ` patch 'graph: fix unaligned access in stats' " Shani Peretz
2025-12-21 14:55 ` patch 'eventdev: fix listing timer adapters with telemetry' " Shani Peretz
2025-12-21 14:55 ` patch 'cfgfile: fix section count with no name' " Shani Peretz
2025-12-21 14:55 ` patch 'net/gve: do not write zero-length descriptors' " Shani Peretz
2025-12-21 14:55 ` patch 'net/gve: validate Tx packet before sending' " Shani Peretz
2025-12-21 14:56 ` patch 'net/vmxnet3: fix mapping of mempools to queues' " Shani Peretz
2025-12-21 14:56 ` patch 'app/testpmd: increase size of set cores list command' " Shani Peretz
2025-12-21 14:56 ` patch 'net/dpaa2: fix shaper rate' " Shani Peretz
2025-12-21 14:56 ` patch 'app/testpmd: monitor state of primary process' " Shani Peretz
2025-12-21 14:56 ` patch 'net/gve: fix disabling interrupts on DQ' " Shani Peretz
2025-12-21 14:56 ` patch 'app/testpmd: fix conntrack action query' " Shani Peretz
2025-12-21 14:56 ` patch 'doc: add conntrack state inspect command to testpmd guide' " Shani Peretz
2025-12-21 14:56 ` patch 'net/gve: free Rx mbufs if allocation fails on ring setup' " Shani Peretz
2025-12-21 14:56 ` patch 'app/testpmd: validate DSCP and VLAN for meter creation' " Shani Peretz
2025-12-21 14:56 ` patch 'net/mlx5: fix min and max MTU reporting' " Shani Peretz
2025-12-21 14:56 ` patch 'net/mlx5: fix storage of shared Rx queues' " Shani Peretz
2025-12-21 14:56 ` patch 'net/mlx5/hws: fix ESP header match in strict mode' " Shani Peretz
2025-12-21 14:56 ` patch 'net/mlx5: fix unsupported flow rule port action' " Shani Peretz
2025-12-21 14:56 ` patch 'net/mlx5: fix non-template age rules flush' " Shani Peretz
2025-12-21 14:56 ` patch 'net/mlx5: fix connection tracking state item validation' " Shani Peretz
2025-12-21 14:56 ` patch 'net/mlx5/hws: fix TIR action support in FDB' " Shani Peretz
2025-12-21 14:56 ` patch 'net/mlx5: fix indirect flow age action handling' " Shani Peretz
2025-12-21 14:56 ` patch 'net/mlx5: fix Direct Verbs counter offset detection' " Shani Peretz
2025-12-21 14:56 ` patch 'net/mlx5: fix interface name parameter definition' " Shani Peretz
2025-12-21 14:56 ` patch 'net/iavf: fix Tx vector path selection logic' " Shani Peretz
2025-12-21 14:56 ` patch 'net/ice: fix vector Rx VLAN offload flags' " Shani Peretz
2025-12-21 14:56 ` patch 'net/intel: fix assumption about tag placement order' " Shani Peretz
2025-12-21 14:56 ` patch 'net/ice: fix VLAN tag reporting on Rx' " Shani Peretz
2025-12-21 14:56 ` patch 'net/ice/base: fix adding special words' " Shani Peretz
2025-12-21 14:56 ` patch 'net/ice/base: fix memory leak in HW profile handling' " Shani Peretz
2025-12-21 14:56 ` patch 'net/ice/base: fix memory leak in recipe " Shani Peretz
2025-12-21 14:56 ` patch 'gro: fix payload corruption in coalescing packets' " Shani Peretz
2025-12-21 14:56 ` patch 'eal: fix DMA mask validation with IOVA mode option' " Shani Peretz
2025-12-21 14:56 ` patch 'eal: fix MP socket cleanup' " Shani Peretz
2025-12-21 14:56 ` patch 'crypto/ipsec_mb: fix QP release in secondary' " Shani Peretz
2025-12-21 14:56 ` patch 'efd: fix AVX2 support' " Shani Peretz
2025-12-21 14:56 ` patch 'net/octeon_ep: fix device start' " Shani Peretz
2025-12-21 14:56 ` patch 'common/cnxk: fix async event handling' " Shani Peretz
2025-12-21 14:56 ` patch 'doc: fix feature list of ice driver' " Shani Peretz
2025-12-21 14:56 ` patch 'doc: fix feature list of iavf " Shani Peretz
2025-12-21 14:56 ` patch 'baseband/acc: fix exported header' " Shani Peretz
2025-12-21 14:56 ` patch 'eventdev: do not include driver header in DMA adapter' " Shani Peretz
2025-12-21 14:56 ` patch 'gpudev: fix driver header for Windows' " Shani Peretz
2025-12-21 14:56 ` patch 'drivers: fix some exported headers' " Shani Peretz
2025-12-21 14:56 ` patch 'test/debug: fix crash with mlx5 devices' " Shani Peretz
2025-12-21 14:56 ` patch 'bus/pci: fix build with MinGW 13' " Shani Peretz
2025-12-21 14:56 ` patch 'net/mlx5: " Shani Peretz
2025-12-21 14:56 ` patch 'dma/hisilicon: fix stop with pending transfers' " Shani Peretz
2025-12-21 14:56 ` patch 'test/dma: fix failure condition' " Shani Peretz
2025-12-21 14:56 ` patch 'eal/x86: enable timeout in AMD power monitor' " Shani Peretz
2025-12-21 14:56 ` patch 'fib6: fix tbl8 allocation check logic' " Shani Peretz
2025-12-21 14:56 ` patch 'vhost: add VDUSE virtqueue ready state polling workaround' " Shani Peretz
2025-12-21 14:56 ` patch 'vhost: fix virtqueue info init in VDUSE vring setup' " Shani Peretz
2025-12-21 14:56 ` patch 'vhost: fix double fetch when dequeue offloading' " Shani Peretz
2025-12-21 14:56 ` patch 'net/ice/base: fix integer overflow on NVM init' " Shani Peretz
2025-12-21 14:56 ` patch 'doc: fix display of commands in cpfl guide' " Shani Peretz
2025-12-21 14:56 ` patch 'net/ice: fix initialization with 8 ports' " Shani Peretz
2025-12-21 14:56 ` patch 'net/ice: remove indirection for FDIR filters' " Shani Peretz
2025-12-21 14:56 ` patch 'net/ice: fix memory leak in raw pattern parse' " Shani Peretz
2025-12-21 14:56 ` patch 'net/i40e: fix symmetric Toeplitz hashing for SCTP' " Shani Peretz
2025-12-21 14:56 ` patch 'net/mlx5/hws: fix ESP header match in strict mode' " Shani Peretz
2025-12-21 14:56 ` patch 'net/mlx5: fix ESP header match after UDP for group 0' " Shani Peretz
2025-12-21 14:56 ` patch 'net/mlx5: fix multicast' " Shani Peretz
2025-12-21 14:56 ` patch 'net/mlx5: fix indirect flow action memory leak' " Shani Peretz
2025-12-21 14:56 ` patch 'net/mlx5: fix MTU initialization' " Shani Peretz
2025-12-21 14:57 ` patch 'net/mlx5: fix leak of flow indexed pools' " Shani Peretz
2025-12-21 14:57 ` patch 'net/hns3: fix inconsistent lock' " Shani Peretz
2025-12-21 14:57 ` patch 'net/hns3: fix VLAN resources freeing' " Shani Peretz
2025-12-21 14:57 ` patch 'net/hns3: fix overwrite mbuf in vector path' " Shani Peretz
2025-12-21 14:57 ` patch 'net/af_packet: fix crash in secondary process' " Shani Peretz
2025-12-21 14:57 ` patch 'net/ark: remove double mbuf free' " Shani Peretz
2025-12-21 14:57 ` patch 'app/testpmd: stop forwarding in secondary process' " Shani Peretz
2025-12-21 14:57 ` Shani Peretz [this message]
2025-12-21 14:57 ` patch 'net/hns3: fix VLAN tag loss for short tunnel frame' " Shani Peretz
2025-12-21 14:57 ` patch 'ethdev: fix VLAN filter parameter description' " Shani Peretz
2025-12-21 14:57 ` patch 'net/enetfec: fix file descriptor leak on read error' " Shani Peretz
2025-12-21 14:57 ` patch 'net/enetfec: fix out-of-bounds access in UIO mapping' " Shani Peretz
2025-12-21 14:57 ` patch 'net/enetfec: fix buffer descriptor size configuration' " Shani Peretz
2025-12-21 14:57 ` patch 'net/enetfec: fix Tx queue free' " Shani Peretz
2025-12-21 14:57 ` patch 'net/enetfec: fix checksum flag handling and error return' " Shani Peretz
2025-12-21 14:57 ` patch 'net/enetfec: reject multi-queue configuration' " Shani Peretz
2025-12-21 14:57 ` patch 'net/enetfec: fix memory leak in Rx buffer cleanup' " Shani Peretz
2025-12-21 14:57 ` patch 'net/enetfec: reject Tx deferred queue' " Shani Peretz
2025-12-21 14:57 ` patch 'net/tap: fix interrupt callback crash after failed start' " Shani Peretz
2025-12-21 14:57 ` patch 'net/ena: fix PCI BAR mapping on 64K page size' " Shani Peretz
2025-12-21 14:57 ` patch 'net/ena/base: fix unsafe memcpy on invalid memory' " Shani Peretz
2025-12-21 14:57 ` patch 'net/dpaa2: fix uninitialized variable' " Shani Peretz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251221145746.763179-79-shperetz@nvidia.com \
    --to=shperetz@nvidia.com \
    --cc=david.marchand@redhat.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).