Skip to contentSkip to conversation

common/cnxk: fix build failure with rhel

PATCH In review Anoob Joseph 2 participants 2 messages Oct 25, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common/cnxk: fix build failure with rhel

Fix compiler warning of uninitialized address.

Fixes a7033a2fb2bf ("common/cnxk: support custom UDP port values")
---
 drivers/common/cnxk/cnxk_security.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/common/cnxk/cnxk_security.c +4 -2
index 68ed0d08b4..85105472a1 100644
@@ -1269,10 +1269,12 @@ cnxk_on_ipsec_outb_sa_create(struct rte_security_ipsec_xform *ipsec,
 	}
 
 	ip4 = (struct rte_ipv4_hdr *)&template->ip4.ipv4_hdr;
+
+	sport = 4500;
+	dport = 4500;
+
 	/* If custom port values are provided, Overwrite default port values. */
 	if (ipsec->options.udp_encap) {
-		sport = 4500;
-		dport = 4500;
 
 		if (ipsec->udp.sport)
 			sport = ipsec->udp.sport;

--
2.25.1

#1 lore raw
Quoted 7 lines

Subject: [PATCH] common/cnxk: fix build failure with rhel

Fix compiler warning of uninitialized address.

Fixes a7033a2fb2bf ("common/cnxk: support custom UDP port values")

Squashed with original commit.
Thanks.