DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Robin Jarry" <rjarry@redhat.com>
To: "Stephen Hemminger" <stephen@networkplumber.org>
Cc: <dev@dpdk.org>, "Cristian Dumitrescu" <cristian.dumitrescu@intel.com>
Subject: Re: [PATCH dpdk v2 09/16] pipeline: use ipv6 addr struct
Date: Fri, 04 Oct 2024 13:55:42 +0200	[thread overview]
Message-ID: <D4N03KE04JT7.1GDDPAN3FOTS5@redhat.com> (raw)
In-Reply-To: <20241003162313.75ce163b@hermes.local>

Stephen Hemminger, Oct 04, 2024 at 01:23:
> On Tue,  1 Oct 2024 10:17:21 +0200
> Robin Jarry <rjarry@redhat.com> 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.

These are two different types. The cmdline library uses POSIX struct 
in6_addr and I cannot assign them without risking alignment issues.


  reply	other threads:[~2024-10-04 11:55 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-21 16:25 [PATCH dpdk v1 00/15] IPv6 APIs overhaul Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 01/15] net: split raw checksum functions in separate header Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 02/15] net: split ipv6 symbols " Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 03/15] net: add structure for ipv6 addresses Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 04/15] net: use ipv6 structure for header addresses Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 05/15] fib6,rib6,lpm6: use ipv6 addr struct Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 06/15] net: add ipv6 address utilities Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 07/15] fib6,rib6,lpm6: use ipv6 utils Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 08/15] graph,node: use ipv6 addr struct and utils Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 09/15] pipeline: use ipv6 addr struct Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 10/15] ipsec: " Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 11/15] thash: " Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 12/15] gro: " Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 13/15] rte_flow: " Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 14/15] rib6,fib6,lpm6: remove duplicate constants Robin Jarry
2024-08-21 16:25 ` [PATCH dpdk v1 15/15] net: add utilities for well known ipv6 address types Robin Jarry
2024-08-21 22:28 ` [PATCH dpdk v1 00/15] IPv6 APIs overhaul Morten Brørup
2024-08-22 14:13 ` Stephen Hemminger
2024-08-22 15:13   ` Morten Brørup
2024-08-22 15:27     ` Robin Jarry
2024-08-22 18:41       ` Morten Brørup
2024-08-22 15:14   ` Robin Jarry
2024-08-22 15:16   ` Robin Jarry
2024-10-01  8:17 ` [PATCH dpdk v2 00/16] " Robin Jarry
2024-10-01  8:17   ` [PATCH dpdk v2 01/16] net: split raw checksum functions in separate header Robin Jarry
2024-10-03 23:12     ` Stephen Hemminger
2024-10-01  8:17   ` [PATCH dpdk v2 02/16] net: split ipv6 symbols " Robin Jarry
2024-10-03 23:15     ` Stephen Hemminger
2024-10-01  8:17   ` [PATCH dpdk v2 03/16] net: add structure for ipv6 addresses Robin Jarry
2024-10-03 23:18     ` Stephen Hemminger
2024-10-04 11:59       ` Robin Jarry
2024-10-01  8:17   ` [PATCH dpdk v2 04/16] net: use ipv6 structure for header addresses Robin Jarry
2024-10-03 23:20     ` Stephen Hemminger
2024-10-04 18:01     ` Ferruh Yigit
2024-10-04 20:04       ` Robin Jarry
2024-10-01  8:17   ` [PATCH dpdk v2 05/16] fib6,rib6,lpm6: use ipv6 addr struct Robin Jarry
2024-10-03 23:21     ` Stephen Hemminger
2024-10-01  8:17   ` [PATCH dpdk v2 06/16] net: add ipv6 address utilities Robin Jarry
2024-10-01 15:35     ` Stephen Hemminger
2024-10-03 23:22     ` Stephen Hemminger
2024-10-01  8:17   ` [PATCH dpdk v2 07/16] fib6,rib6,lpm6: use ipv6 utils Robin Jarry
2024-10-01  8:17   ` [PATCH dpdk v2 08/16] graph,node: use ipv6 addr struct and utils Robin Jarry
2024-10-01  8:17   ` [PATCH dpdk v2 09/16] pipeline: use ipv6 addr struct Robin Jarry
2024-10-03 23:23     ` Stephen Hemminger
2024-10-04 11:55       ` Robin Jarry [this message]
2024-10-01  8:17   ` [PATCH dpdk v2 10/16] ipsec: " Robin Jarry
2024-10-01  8:17   ` [PATCH dpdk v2 11/16] thash: " Robin Jarry
2024-10-01  8:17   ` [PATCH dpdk v2 12/16] gro: " Robin Jarry
2024-10-01  8:17   ` [PATCH dpdk v2 13/16] rte_flow: " Robin Jarry
2024-10-01  8:17   ` [PATCH dpdk v2 14/16] rib6,fib6,lpm6: remove duplicate constants Robin Jarry
2024-10-03 23:12     ` Stephen Hemminger
2024-10-04 11:54       ` Robin Jarry
2024-10-04 16:16         ` Stephen Hemminger
2024-10-01  8:17   ` [PATCH dpdk v2 15/16] net: add utilities for well known ipv6 address types Robin Jarry
2024-10-03 23:24     ` Stephen Hemminger
2024-10-01  8:17   ` [PATCH dpdk v2 16/16] ipv6: add function to check ipv6 version Robin Jarry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D4N03KE04JT7.1GDDPAN3FOTS5@redhat.com \
    --to=rjarry@redhat.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).