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 82D6F45AA4; Fri, 4 Oct 2024 01:24:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E29CC40678; Fri, 4 Oct 2024 01:24:44 +0200 (CEST) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id A711440674 for ; Fri, 4 Oct 2024 01:24:42 +0200 (CEST) Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-20b0b2528d8so17234095ad.2 for ; Thu, 03 Oct 2024 16:24:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727997882; x=1728602682; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=DfuI32Mlqnjmx7laybEqirfs779bGYwq3pjzAGtLaT4=; b=noHt5ZFli2dVRJ7QF5mJQMZTQubQtRGUwHn53Ij0bmv/zVXMrXXM5b/fVEu2uD4y5w UCvv6yNTol1Js3agbOdycdA1ylWNkE+JKhm9I2p3ZUfMph+FXB+1e+4vLdtMn0isxk5L GrOAmKwVBTlFa972QJpKkDxtdPhdSslTqIW8QyAfAfiXc0sq/2KAfCl+KgOLrV9nCw5h T8fFf6M+j4fdaF7MUNbFEsstiEJqGk3i7PAlumXJfU2Ibn0KT6HuHzwRhILl9nIAGm/J ZR5CFQbxqCsRpX+f0f076fErX+xdWV493ali8q6f5SQkVJds3lMJ2n7Iz0NBwFo92TKC rORw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727997882; x=1728602682; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DfuI32Mlqnjmx7laybEqirfs779bGYwq3pjzAGtLaT4=; b=Lz0Xn6twsGx00sd8+MQ+i6TlwoIJmJg3i2TDSmvSU4Wgm1sAfYxyrTJ5yipmV1nV3G Ty7xFUeXBHeNq/LN9nN2fb1QjOWndHPhZunrB+JH9mn3IjZsF6en5BVeVoPiOonbkxz4 zijDhbLiQvdG4VwRu60awqPyncMd2i0YR4lKlQZuc3JFIg+3E6eBDzTz9Fefcu8Ow5+L t9L940qQU5/8Snx/s2N9aD+MxjUhDdfpsO8MXHugai2AIaI/dDbNPeVd98WU0y3UKymL hhKOEn+F74p4AglOXJkJqlZHDhk7b9Nk6LahWsRGP/ABLRkbC7E3eC2qIDS7pGQ7NJTU caOg== X-Gm-Message-State: AOJu0YzjGBdwQIze5VbD5zPNjG5dJ3NZa0W2hhYpuB8fY5YhMMxFHt0n SKmPHPWa6i04M1FSmfotyQI0DEJOM6xYZz3wZsPgghdXELvIZIHj1G4sPVjRLsI= X-Google-Smtp-Source: AGHT+IFN40DeYAroffHK13vLvnQgOBzsNIP2yWb2fnrWUho1lwAqEmwI4DI3dnvc6VBpBIeqfENyGQ== X-Received: by 2002:a17:902:eccd:b0:20b:6f1b:c5a5 with SMTP id d9443c01a7336-20bfdf6ae8emr9452555ad.10.1727997881921; Thu, 03 Oct 2024 16:24:41 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7e9dcb5cdc1sm1099317a12.86.2024.10.03.16.24.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2024 16:24:41 -0700 (PDT) Date: Thu, 3 Oct 2024 16:18:40 -0700 From: Stephen Hemminger To: Robin Jarry Cc: dev@dpdk.org Subject: Re: [PATCH dpdk v2 03/16] net: add structure for ipv6 addresses Message-ID: <20241003161840.4177a172@hermes.local> In-Reply-To: <20241001081728.301272-4-rjarry@redhat.com> References: <20240821162516.610624-17-rjarry@redhat.com> <20241001081728.301272-1-rjarry@redhat.com> <20241001081728.301272-4-rjarry@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Tue, 1 Oct 2024 10:17:15 +0200 Robin Jarry wrote: > 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]; > +}; > + Why is RTE_IPV6_MAX_DEPTH here, it is not really a property of the address itself. Not sure if using a union (like struct in6_addr does) might be better to encourage compiler alignment and allow simpler faster comparison.