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 BA2E145A78; Tue, 1 Oct 2024 10:17:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A724540656; Tue, 1 Oct 2024 10:17:55 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 82C064060F for ; Tue, 1 Oct 2024 10:17:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727770673; 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=TfYbOLGr3zQOTxGsEm059ZqoXP4Uw0920CUxvI3pwmk=; b=IeJAKH1b2dzpaajV4runm3n6HV3hk/3BX+aqEGj8d5BD4bvzyDrApZzdJoC1it6GqRJRFA xEGoiYZ6NqE+LxZJzW1pScgh4FTspVoobjFTAIdFIuxMDk7NgxWJmOlhU6Q0yiA1Ueg16X 9olODLvVET2czFD/mwXE0B23QDpbuf4= Received: from mx-prod-mc-03.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-677-vGkt8i__MA-QM3dlPivA2g-1; Tue, 01 Oct 2024 04:17:51 -0400 X-MC-Unique: vGkt8i__MA-QM3dlPivA2g-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (unknown [10.30.177.15]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B4BD218D9F11 for ; Tue, 1 Oct 2024 08:17:50 +0000 (UTC) Received: from ringo.redhat.com (unknown [10.39.208.33]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2387B19065A0; Tue, 1 Oct 2024 08:17:45 +0000 (UTC) From: Robin Jarry To: dev@dpdk.org Subject: [PATCH dpdk v2 03/16] net: add structure for ipv6 addresses Date: Tue, 1 Oct 2024 10:17:15 +0200 Message-ID: <20241001081728.301272-4-rjarry@redhat.com> In-Reply-To: <20241001081728.301272-1-rjarry@redhat.com> References: <20240821162516.610624-17-rjarry@redhat.com> <20241001081728.301272-1-rjarry@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 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 There is currently no structure defined for IPv6 addresses. Introduce one that is simply a uint8_t array of 16 elements without any union. The idea is to ensure this structure alignment is 1 so that it can be mapped directly on unaligned packet memory. Signed-off-by: Robin Jarry --- lib/net/rte_ip6.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/net/rte_ip6.h b/lib/net/rte_ip6.h index 5ad1dd25db08..52c41088681e 100644 --- a/lib/net/rte_ip6.h +++ b/lib/net/rte_ip6.h @@ -35,6 +35,16 @@ extern "C" { #endif +#define RTE_IPV6_ADDR_SIZE 16 +#define RTE_IPV6_MAX_DEPTH 128 + +/** + * IPv6 Address + */ +struct rte_ipv6_addr { + unsigned char a[RTE_IPV6_ADDR_SIZE]; +}; + /** * IPv6 Header */ -- 2.46.1