From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3CC2D45B6C; Fri, 18 Oct 2024 22:11:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C722240267; Fri, 18 Oct 2024 22:11:24 +0200 (CEST) Received: from fout-a3-smtp.messagingengine.com (fout-a3-smtp.messagingengine.com [103.168.172.146]) by mails.dpdk.org (Postfix) with ESMTP id E0A2C4025C for ; Fri, 18 Oct 2024 22:11:22 +0200 (CEST) Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfout.phl.internal (Postfix) with ESMTP id 658E713801B8; Fri, 18 Oct 2024 16:11:22 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-07.internal (MEProxy); Fri, 18 Oct 2024 16:11:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm2; t=1729282282; x=1729368682; bh=GZghRGUpvzBlVUUCkTLRF pHDWMfoPtqodc+jK1o4ESs=; b=GJfsnGMFfqWhM93NEmYIQMuK4SnTFJsMOSh/i Rj96+WhlAYr1zNVZuYLeCXtrVgBMLImxN8IwN1aMb5m94NoXhTykXzGtXer41zTW 6O54aCWPdJHyani6OwujRtFnG/z+vv8GxQo4TEKzrvTD4TB5857DkASRtWNRQ9MT hnbN/1G5lvWV+nzQgiyRlYSFmkOclW6WvWh3SWG83dtUWOO95wJ+S1oG7+1+Pnen FZHZ5jlgAZ+d/1Ln/bRR/TmEJANyK+Y9Ebn1iU/ImkB0eoXaY6TCsl1RQbg7RATa 1jfKBSslpWHb0l5LOr1rucq3E1plZrdel1Wa6dhB+Mwk95w6Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1729282282; x=1729368682; bh=GZghRGUpvzBlVUUCkTLRFpHDWMfo Ptqodc+jK1o4ESs=; b=eNUcYNEkLsv6ijd6EsDfDAMKhSy4FMuKcJ0/HYA0vjbI 9YSKd1OLs4PQ+DW7RNjQcztHEARiwxrt2rZKA224ULVH9/6/jRdLFbEbzM4aYhS+ OADPS6wp2Yud4FCPkf6INrPtD3aBhykC3xxVf1y7zs1bVyUk1oJgwJuoCNZ6ES9g KnRBx0W7UsVhY0P5lTEYIw6OFk1byQSlGQU7v1h4yx5HaLT3UuIZe3xrGeQVuoXr MPbYkWYLSb0Emu9/7UbnX15fQyexqOYRn4Up5V6rQ6d0Bvaqbe7CexIFSl16BDoi YBt6AyX+I4csp58iblAWNhiwpCKt/Q/SCEzF8ibzTQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdehfedgudeggecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecu hfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlh honhdrnhgvtheqnecuggftrfgrthhtvghrnhepveevfeevieeihfetudekgeekleeigeff ueekveduteeuffeiudevteeiudekfeelnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvthdpnhgs pghrtghpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepuggvvhesug hpughkrdhorhhgpdhrtghpthhtoheplhhirhhonhhhsehmrghrvhgvlhhlrdgtohhmpdhr tghpthhtoheprhhjrghrrhihsehrvgguhhgrthdrtghomh X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 18 Oct 2024 16:11:21 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: Liron Himi , Robin Jarry Subject: [PATCH] net/mvpp2: fix build with IPv6 address structure Date: Fri, 18 Oct 2024 22:11:12 +0200 Message-ID: <20241018201112.159332-1-thomas@monjalon.net> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org A structure has been created for IPv6 addresses replacing the byte arrays of the IPv6 header. This change was failing the compilation: mrvl_flow.c:1055:29: error: incompatible type for argument 1 of 'memcmp' Instead of adapting the memcmp call, a new function is used to compare an IPv6 address with an unspec (zero) address. Fixes: 89b5642d0d45 ("net: use IPv6 address structure for packet headers") Signed-off-by: Thomas Monjalon --- drivers/net/mvpp2/mrvl_flow.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/mvpp2/mrvl_flow.c b/drivers/net/mvpp2/mrvl_flow.c index 098523ada6..9932e28edc 100644 --- a/drivers/net/mvpp2/mrvl_flow.c +++ b/drivers/net/mvpp2/mrvl_flow.c @@ -1031,7 +1031,6 @@ mrvl_parse_ip6(const struct rte_flow_item *item, struct rte_flow_error *error) { const struct rte_flow_item_ipv6 *spec = NULL, *mask = NULL; - struct rte_ipv6_hdr zero; uint32_t flow_mask; int ret; @@ -1043,8 +1042,6 @@ mrvl_parse_ip6(const struct rte_flow_item *item, if (ret) return ret; - memset(&zero, 0, sizeof(zero)); - if (mask->hdr.payload_len || mask->hdr.hop_limits) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, @@ -1052,15 +1049,13 @@ mrvl_parse_ip6(const struct rte_flow_item *item, return -rte_errno; } - if (memcmp(mask->hdr.src_addr, - zero.src_addr, sizeof(mask->hdr.src_addr))) { + if (!rte_ipv6_addr_is_unspec(&mask->hdr.src_addr)) { ret = mrvl_parse_ip6_sip(spec, mask, flow); if (ret) goto out; } - if (memcmp(mask->hdr.dst_addr, - zero.dst_addr, sizeof(mask->hdr.dst_addr))) { + if (!rte_ipv6_addr_is_unspec(&mask->hdr.dst_addr)) { ret = mrvl_parse_ip6_dip(spec, mask, flow); if (ret) goto out; -- 2.46.0