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 EF14F45B69; Fri, 18 Oct 2024 16:08:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F2B340DD7; Fri, 18 Oct 2024 16:07:01 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 9FD8D4042C for ; Fri, 18 Oct 2024 16:06:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729260416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aCVMQzoTQfaf2QZmOSsYVIT04czE0MQqCusnIxH++k4=; b=dZ9LH27DSVUB5KGZ5CdXtDk5t7MJZbpx4sLUSBX8Kad9B+Gv6HuEXmo4fZJYlnin1tmDlg 08D5MDfXm0yJVF9Td6Zs1+bfjc709SxhHryflNoshxIyGL+7KRjvl3uBmyo3qQaxeidOda 6NB/BScddOqRGRCApW7uGL8mtJ5Br7A= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-112-nq5ImcnMMDK10UjTjJDsAQ-1; Fri, 18 Oct 2024 10:06:53 -0400 X-MC-Unique: nq5ImcnMMDK10UjTjJDsAQ-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 11FAE1955DD2; Fri, 18 Oct 2024 14:06:51 +0000 (UTC) Received: from ringo.redhat.com (unknown [10.39.208.23]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E684B19560A2; Fri, 18 Oct 2024 14:06:49 +0000 (UTC) From: Robin Jarry To: dev@dpdk.org, Jiayu Hu Subject: [PATCH dpdk v5 14/17] gro: use IPv6 address structure Date: Fri, 18 Oct 2024 16:05:50 +0200 Message-ID: <20241018140553.79789-15-rjarry@redhat.com> In-Reply-To: <20241018140553.79789-1-rjarry@redhat.com> References: <20240821162516.610624-17-rjarry@redhat.com> <20241018140553.79789-1-rjarry@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 Update tcp6_flow_key to use rte_ipv6_addr structures instead of uint8_t[16] arrays. Signed-off-by: Robin Jarry --- doc/guides/rel_notes/deprecation.rst | 2 -- doc/guides/rel_notes/release_24_11.rst | 2 ++ lib/gro/gro_tcp6.c | 8 ++++---- lib/gro/gro_tcp6.h | 6 ++++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 005f8c3e66a1..bd2a7b877db0 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -70,8 +70,6 @@ Deprecation Notices - ``struct rte_flow_item_icmp6_nd_na`` - ``struct rte_flow_action_set_ipv6`` - ``struct rte_flow_tunnel`` - gro - - ``struct tcp6_flow_key`` * net, ethdev: The flow item ``RTE_FLOW_ITEM_TYPE_VXLAN_GPE`` is replaced with ``RTE_FLOW_ITEM_TYPE_VXLAN``. diff --git a/doc/guides/rel_notes/release_24_11.rst b/doc/guides/rel_notes/release_24_11.rst index fbde3d2ae826..bdedbc1f8a6f 100644 --- a/doc/guides/rel_notes/release_24_11.rst +++ b/doc/guides/rel_notes/release_24_11.rst @@ -299,6 +299,8 @@ API Changes - ``RTE_FIB6_MAXDEPTH`` (deprecated, replaced with ``RTE_IPV6_MAX_DEPTH``) hash - ``struct rte_ipv6_tuple`` + gro + - ``struct tcp6_flow_key`` ipsec - ``struct rte_ipsec_sadv6_key`` lpm diff --git a/lib/gro/gro_tcp6.c b/lib/gro/gro_tcp6.c index 6edfb6045cf6..ab4cd6c68bf0 100644 --- a/lib/gro/gro_tcp6.c +++ b/lib/gro/gro_tcp6.c @@ -99,8 +99,8 @@ insert_new_flow(struct gro_tcp6_tbl *tbl, dst = &(tbl->flows[flow_idx].key); ASSIGN_COMMON_TCP_KEY((&src->cmn_key), (&dst->cmn_key)); - memcpy(&dst->src_addr[0], &src->src_addr[0], sizeof(dst->src_addr)); - memcpy(&dst->dst_addr[0], &src->dst_addr[0], sizeof(dst->dst_addr)); + dst->src_addr = src->src_addr; + dst->dst_addr = src->dst_addr; dst->vtc_flow = src->vtc_flow; tbl->flows[flow_idx].start_index = item_idx; @@ -168,8 +168,8 @@ gro_tcp6_reassemble(struct rte_mbuf *pkt, rte_ether_addr_copy(&(eth_hdr->src_addr), &(key.cmn_key.eth_saddr)); rte_ether_addr_copy(&(eth_hdr->dst_addr), &(key.cmn_key.eth_daddr)); - memcpy(&key.src_addr[0], &ipv6_hdr->src_addr, sizeof(key.src_addr)); - memcpy(&key.dst_addr[0], &ipv6_hdr->dst_addr, sizeof(key.dst_addr)); + key.src_addr = ipv6_hdr->src_addr; + key.dst_addr = ipv6_hdr->dst_addr; key.cmn_key.src_port = tcp_hdr->src_port; key.cmn_key.dst_port = tcp_hdr->dst_port; key.cmn_key.recv_ack = tcp_hdr->recv_ack; diff --git a/lib/gro/gro_tcp6.h b/lib/gro/gro_tcp6.h index 073122f0ec84..acf3971bb6e9 100644 --- a/lib/gro/gro_tcp6.h +++ b/lib/gro/gro_tcp6.h @@ -5,6 +5,8 @@ #ifndef _GRO_TCP6_H_ #define _GRO_TCP6_H_ +#include + #include "gro_tcp.h" #define GRO_TCP6_TBL_MAX_ITEM_NUM (1024UL * 1024UL) @@ -12,8 +14,8 @@ /* Header fields representing a TCP/IPv6 flow */ struct tcp6_flow_key { struct cmn_tcp_key cmn_key; - uint8_t src_addr[16]; - uint8_t dst_addr[16]; + struct rte_ipv6_addr src_addr; + struct rte_ipv6_addr dst_addr; rte_be32_t vtc_flow; }; -- 2.47.0