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 1226745AA4; Fri, 4 Oct 2024 01:24:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B29B640268; Fri, 4 Oct 2024 01:24:33 +0200 (CEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id A18904021F for ; Fri, 4 Oct 2024 01:24:32 +0200 (CEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-71b8d10e990so1078030b3a.3 for ; Thu, 03 Oct 2024 16:24:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727997872; x=1728602672; 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=NclL2BbnI9Tl6vK+WDQ4tIqafMeiIGsv+r2iqsEBlUQ=; b=QpPqP8L5JApqsOWFK1qmQ8DpX7WJyD+oLltGFi0/tBaZ1nvUC4M8RK3IXQO7v9Ainm /LHJTVemKcMuDU0TKwMzUgLOd/ZSFKWVI0rWS1j4EmLmQiOM5nyKdjPWrrtQyUv4jvKO kS7HMGtgGuj5WHNx//qToToBBKMCJcUpdPoQJdAObHAUK0cogQdKP4qnOYQsa6x0l8m0 AfHNl/mI1MbUNcbXko3QGeAWkMrsJu3dhhzX2XHcKY3cFGD/HbSl9pEPlu0vjRAfScke +d9Ll67Sqy8aQUsYIT03s1tc1rtJQH2q7XijpeRdXgEkmcFADS33sV9iD8uH7rr59bRR SrMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727997872; x=1728602672; 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=NclL2BbnI9Tl6vK+WDQ4tIqafMeiIGsv+r2iqsEBlUQ=; b=aYBC7hc9U4YJrV0Mhe0h6hQN55rtXT3IWmfCC2JD22RupSsC9RAXPfOQXtff2pAf85 a8TTSgky0yntt2hfjhSeud88Jj1tGXzp1UWAAJrDRAWOFC1Xt316zcKw3D41rwZmeeiJ wtCe7NS+O9oeXtuHCyeJW+67dA43bQU9T1HnuCKAWR3wxOp/e1GH9ZWNE63aEzFRlCpO R//61+A70XhSTh8XMfDQgUyT5uhpQnbTAunwcnWR0G4Lxc9rxbqB40etBW1JWJYKcxLn 31+S16MTVuQKjGIyaBrIQEOTRTs/c9BwA36X0/Pi5u/GcX4WVbvzKt4nsmaBkRkOITh8 GvGg== X-Gm-Message-State: AOJu0Ywwa0qFoJmfnddEPPVYVD2/KOlNPOZ4X//xRp5ruTmbBp5QrG5M PJHHrUb/pVZywi9OKo/nzdrwEJ49gMxgChV9JUTJKdfj5CrM9Dq1pITlh7Ii8G8= X-Google-Smtp-Source: AGHT+IEvzoMxvzfivL6NH31BUhvAzkVcP6F9+9BN4292F9qDQeMqUYyne3ivxgEuAfBBdyLU2+LF3A== X-Received: by 2002:a05:6a00:2d11:b0:71c:5b8a:ae0b with SMTP id d2e1a72fcca58-71de245e89bmr1280295b3a.24.1727997871742; Thu, 03 Oct 2024 16:24:31 -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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2024 16:24:31 -0700 (PDT) Date: Thu, 3 Oct 2024 16:23:13 -0700 From: Stephen Hemminger To: Robin Jarry Cc: dev@dpdk.org, Cristian Dumitrescu Subject: Re: [PATCH dpdk v2 09/16] pipeline: use ipv6 addr struct Message-ID: <20241003162313.75ce163b@hermes.local> In-Reply-To: <20241001081728.301272-10-rjarry@redhat.com> References: <20240821162516.610624-17-rjarry@redhat.com> <20241001081728.301272-1-rjarry@redhat.com> <20241001081728.301272-10-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: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, > parser_read_uint8(&hop_limit, tokens[5])) > return 0; > > - memcpy(a->encap.vxlan.ipv6.sa, sa.s6_addr, 16); > - memcpy(a->encap.vxlan.ipv6.da, da.s6_addr, 16); > + memcpy(&a->encap.vxlan.ipv6.sa, sa.s6_addr, 16); > + memcpy(&a->encap.vxlan.ipv6.da, da.s6_addr, 16); > a->encap.vxlan.ipv6.flow_label = flow_label; > a->encap.vxlan.ipv6.dscp = dscp; > a->encap.vxlan.ipv6.hop_limit = hop_limit; > @@ -3615,7 +3615,7 @@ parse_table_action_nat(char **tokens, > return 0; > > a->nat.ip_version = 0; > - memcpy(a->nat.addr.ipv6, addr.s6_addr, 16); > + memcpy(&a->nat.addr.ipv6, addr.s6_addr, 16); Why keep the memcpy when you just introduced an address copy routine? Or use assignment here.