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 F176645AAD; Fri, 4 Oct 2024 13:59:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E183E40E5E; Fri, 4 Oct 2024 13:59:07 +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 863984027F for ; Fri, 4 Oct 2024 13:59:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728043146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+IdFVbDOy8OrG2MIsJqEPqZxMVwRRHzBKPlJpQorwQU=; b=OO/iSFeeh09uXrKTVY9NNSwvYLZDS23If8qBZueIaN03kqb9eQhiWy3rVkOUuIfyXNOaQ3 kpKRu32dZt1/deIxCEWLgL+iz4gGZVehw7XrnjQ8ZDqBe8rXTFeFDsuXSU+f4KVoqtOkKi op9GXQZrfnz6GeG0Dbj6FXStbHozbKU= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-131-gSSH2KctMNaYCRsVG788pQ-1; Fri, 04 Oct 2024 07:59:05 -0400 X-MC-Unique: gSSH2KctMNaYCRsVG788pQ-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-42cbcf60722so14946335e9.1 for ; Fri, 04 Oct 2024 04:59:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728043144; x=1728647944; h=in-reply-to:references:user-agent:subject:to:from:cc:message-id :date:content-transfer-encoding:mime-version:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=30SXu0q+G91ky4Vtdkh4426YjyGiY5bfhcm8eeO3iD4=; b=IE7uO4oqsQIht4FeiGqOVLDvFlpLhL3ZBFRH51YSXy7kYuUMZDjR1zkRwn7Ug+vRcJ x6PmVHEjVUIIgmNtnRNw4j4bRTow5T/20+0U7CG3Cwq85QP5IUuK6ba5XmwNloO09EG8 qGneCh/FFwsRrOdnjhoD83T4CsmOJqQk+PtKdIqfPwG1PKmE6d4ic3/qH6HRTfysg6UU 2t0AKAz/rlrRckZmpfCnMl0vFEk2QIxXlHAfnmnZ8DyYJsRJFziETfFUaJRMIzC1TT3t 0WQDIJ8gnPoIkB/JAouwFfXa4hCIBzCN79v9KNhB4fsYz2DfgzNr/2enakj7XFSiGeFg yqPw== X-Gm-Message-State: AOJu0YxeB48jck4aWsufvwK1hgu+M+ZzdI88zKNGaZYfEL1t4kkTYWRs LgjrwuPE2yl8KH37YmzRjPMEfV569/vceuVpW+Gaka9m9cmQm7Aoia+wOlkyFgxIMJygNp2r8hG 6MHLZcZJWD8GLpICEHbhG6lOM/cw2XJRvwfs1QddmSHAjAg8O X-Received: by 2002:a05:600c:46c6:b0:42c:e0da:f15c with SMTP id 5b1f17b1804b1-42f85ab8695mr17729365e9.20.1728043143659; Fri, 04 Oct 2024 04:59:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFA2qdz7PuOI7Znyu40krIIigrpQhu7hFkMLJSMtzghR4e80KT08JivuGF6Ad2QRmnNd+z8Ug== X-Received: by 2002:a05:600c:46c6:b0:42c:e0da:f15c with SMTP id 5b1f17b1804b1-42f85ab8695mr17729225e9.20.1728043143276; Fri, 04 Oct 2024 04:59:03 -0700 (PDT) Received: from localhost (2a01cb00025433006239e1f47a0b2371.ipv6.abo.wanadoo.fr. [2a01:cb00:254:3300:6239:e1f4:7a0b:2371]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42f8599487fsm17663375e9.0.2024.10.04.04.59.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Oct 2024 04:59:03 -0700 (PDT) Mime-Version: 1.0 Date: Fri, 04 Oct 2024 13:59:02 +0200 Message-Id: Cc: From: "Robin Jarry" To: "Stephen Hemminger" Subject: Re: [PATCH dpdk v2 03/16] net: add structure for ipv6 addresses User-Agent: aerc/0.18.2-74-g7e4ac1a5f54c References: <20240821162516.610624-17-rjarry@redhat.com> <20241001081728.301272-1-rjarry@redhat.com> <20241001081728.301272-4-rjarry@redhat.com> <20241003161840.4177a172@hermes.local> In-Reply-To: <20241003161840.4177a172@hermes.local> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; format=Flowed 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 Stephen Hemminger, Oct 04, 2024 at 01:18: > 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. >>=20 >> Signed-off-by: Robin Jarry >> --- >> lib/net/rte_ip6.h | 10 ++++++++++ >> 1 file changed, 10 insertions(+) >>=20 >> 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 >> =20 >> +#define RTE_IPV6_ADDR_SIZE 16 >> +#define RTE_IPV6_MAX_DEPTH 128 >> + >> +/** >> + * IPv6 Address >> + */ >> +struct rte_ipv6_addr { >> +=09unsigned char a[RTE_IPV6_ADDR_SIZE]; >> +}; >> + > > Why is RTE_IPV6_MAX_DEPTH here, it is not really a property > of the address itself. It is used in the next commits. I will move it where it belongs. > Not sure if using a union (like struct in6_addr does) might be better > to encourage compiler alignment and allow simpler faster comparison. I didn't use a union to ensure the type is 1 byte aligned. This is the=20 very reason why I didn't re-use in6_addr which would have been more=20 elegant (and shorter).