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 252A645AAD; Fri, 4 Oct 2024 13:55:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1540840E5E; Fri, 4 Oct 2024 13:55:48 +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 D0FEC4027F for ; Fri, 4 Oct 2024 13:55:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728042946; 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=gugxJPozwcomJ89Jdy1dh2Ghx/t3WFctAdFr0K+aQVw=; b=RrnMzRJQmnvXdifUVT9SqZLBIN6fiVonPEkQp2LHP/7kZbMTazZWVJEoh1Cm0zMAl/f6WB ponjHb5ZIu5ExJXcg1e9ki55ymklnhgUt4M3vJ2oc0i2LLLCUZHaIHkHtqUg28Icnzs4Ng FcqYdkTifPlxNMtp3tNxaBJhYfa7MPc= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-639-2Hd_EzOeOfaAVvm_pD8iww-1; Fri, 04 Oct 2024 07:55:45 -0400 X-MC-Unique: 2Hd_EzOeOfaAVvm_pD8iww-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-42cb6f3c476so15291095e9.0 for ; Fri, 04 Oct 2024 04:55:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728042944; x=1728647744; h=in-reply-to:references:user-agent:from:cc:subject:to:message-id :date:content-transfer-encoding:mime-version:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=4jJYqSiArCQyDtaixT3nYPN9g8B+2dngFMdy2B+SpPw=; b=dBL6A3EGoDL/PDyqjfJ4rAP6JpRz0rvwn8p5FHIU6+WK3x+/6IIpxW5fG3JVKBr7e0 EfZMbZIsTp8Cm9JPDNp2MMTRMnzHIxMI1HF658Sy1IFwDI3w4JbfZEuM78Cge0cx4Zrs +itMIRuOeywFhOrzXkZd375x0104d/xUwhhvJYiMhFc13zLjbcAH44jLLiXQ1hEOjDCx FsYhSnAabQEfBwa8iVhcRyEYH9jVKwgOZWU95sIIDwhRmhAtOSdkrfgpAVNWIzMIC9HW soebiHHIlbppN2FrR2ycyEsDbtKOl+yUXRdUKKVRSRoZePVomDWgy79ME48emhQy4XC3 ohgg== X-Gm-Message-State: AOJu0Yw22IXquqxI8QfShQNbTadmdSTvgBIXTmLrpHiVs5fintPjAVrM 3tDO5oUYNiVw3ZzIdfTqHalvmeDCMuZ/FRA6Mmjbvqe4UkRfY/lGdYrwgg7uPZpaeV4tdM1b2Pd Rp/hnciKElV4ZnsJq+wVFW9gr4IMtefkVmtJx8X3NQIdkbbwh X-Received: by 2002:a05:600c:3b96:b0:42f:6878:a696 with SMTP id 5b1f17b1804b1-42f85ab9c1amr18037555e9.21.1728042944042; Fri, 04 Oct 2024 04:55:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFw8tjNec8J7MnEcStbqkjMcVdPPLo3vj0qPNWyTk4QEynPb2zW8DbkI7mwhr1aM68fdNqA8w== X-Received: by 2002:a05:600c:3b96:b0:42f:6878:a696 with SMTP id 5b1f17b1804b1-42f85ab9c1amr18037365e9.21.1728042943614; Fri, 04 Oct 2024 04:55:43 -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-42f86a205absm13895625e9.19.2024.10.04.04.55.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Oct 2024 04:55:42 -0700 (PDT) Mime-Version: 1.0 Date: Fri, 04 Oct 2024 13:55:42 +0200 Message-Id: To: "Stephen Hemminger" Subject: Re: [PATCH dpdk v2 09/16] pipeline: use ipv6 addr struct Cc: , "Cristian Dumitrescu" From: "Robin Jarry" User-Agent: aerc/0.18.2-74-g7e4ac1a5f54c References: <20240821162516.610624-17-rjarry@redhat.com> <20241001081728.301272-1-rjarry@redhat.com> <20241001081728.301272-10-rjarry@redhat.com> <20241003162313.75ce163b@hermes.local> In-Reply-To: <20241003162313.75ce163b@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:23: > On Tue, 1 Oct 2024 10:17:21 +0200 > Robin Jarry wrote: > >> diff --git a/examples/ip_pipeline/cli.c b/examples/ip_pipeline/cli.c >> index e8269ea90c11..66fdeac8f501 100644 >> --- a/examples/ip_pipeline/cli.c >> +++ b/examples/ip_pipeline/cli.c >> @@ -3540,8 +3540,8 @@ parse_table_action_encap(char **tokens, >> =09=09=09=09parser_read_uint8(&hop_limit, tokens[5])) >> =09=09=09=09return 0; >> =20 >> -=09=09=09memcpy(a->encap.vxlan.ipv6.sa, sa.s6_addr, 16); >> -=09=09=09memcpy(a->encap.vxlan.ipv6.da, da.s6_addr, 16); >> +=09=09=09memcpy(&a->encap.vxlan.ipv6.sa, sa.s6_addr, 16); >> +=09=09=09memcpy(&a->encap.vxlan.ipv6.da, da.s6_addr, 16); >> =09=09=09a->encap.vxlan.ipv6.flow_label =3D flow_label; >> =09=09=09a->encap.vxlan.ipv6.dscp =3D dscp; >> =09=09=09a->encap.vxlan.ipv6.hop_limit =3D hop_limit; >> @@ -3615,7 +3615,7 @@ parse_table_action_nat(char **tokens, >> =09=09=09return 0; >> =20 >> =09=09a->nat.ip_version =3D 0; >> -=09=09memcpy(a->nat.addr.ipv6, addr.s6_addr, 16); >> +=09=09memcpy(&a->nat.addr.ipv6, addr.s6_addr, 16); > > Why keep the memcpy when you just introduced an address copy routine? > Or use assignment here. These are two different types. The cmdline library uses POSIX struct=20 in6_addr and I cannot assign them without risking alignment issues.