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 778ED45834; Wed, 21 Aug 2024 18:26:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 60583427CD; Wed, 21 Aug 2024 18:26:08 +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 B1EC74279D for ; Wed, 21 Aug 2024 18:26:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724257561; 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=R5DCg9mhjMgWiCI/gDtLSq3E1PxW/SzvPd9AdQet6k8=; b=I/W/jvs1KFHTEAhuBXJBapr0Y7wDXgyQZSR7ZdYO7iph711z7+B3eO6fyWL0JfeBtgHkuN WNLNG1Bm4La63kHo1kpEVv1ML/AOMLzwuEDPj6XUwNq5EzHLMOLqhyVoRmAatO9neMp6hc 1qdZ9XlxQb/ywu28AA6oTu5MTE7VL6E= Received: from mx-prod-mc-02.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-443-Jul9cLwGMu6zYgtIS2XQXA-1; Wed, 21 Aug 2024 12:25:59 -0400 X-MC-Unique: Jul9cLwGMu6zYgtIS2XQXA-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D922F18EB22C for ; Wed, 21 Aug 2024 16:25:58 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.208.21]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BE4A419560AD; Wed, 21 Aug 2024 16:25:57 +0000 (UTC) From: Robin Jarry To: dev@dpdk.org Subject: [PATCH dpdk v1 03/15] net: add structure for ipv6 addresses Date: Wed, 21 Aug 2024 18:25:20 +0200 Message-ID: <20240821162516.610624-20-rjarry@redhat.com> In-Reply-To: <20240821162516.610624-17-rjarry@redhat.com> References: <20240821162516.610624-17-rjarry@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 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 9ed737d5eb81..f948f95db7ca 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.0