From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by dpdk.space (Postfix) with ESMTP id DCAABA00E6
	for <public@inbox.dpdk.org>; Thu, 16 May 2019 12:34:05 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 8A79358EC;
	Thu, 16 May 2019 12:34:04 +0200 (CEST)
Received: by dpdk.org (Postfix, from userid 33)
 id 834B158EC; Thu, 16 May 2019 12:34:02 +0200 (CEST)
From: bugzilla@dpdk.org
To: dev@dpdk.org
Date: Thu, 16 May 2019 10:34:02 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: DPDK
X-Bugzilla-Component: examples
X-Bugzilla-Version: 19.02
X-Bugzilla-Keywords: 
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mplaneta@os.inf.tu-dresden.de
X-Bugzilla-Status: CONFIRMED
X-Bugzilla-Resolution: 
X-Bugzilla-Priority: Normal
X-Bugzilla-Assigned-To: dev@dpdk.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags: 
X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform
 op_sys bug_status bug_severity priority component assigned_to reporter
 target_milestone
Message-ID: <bug-279-3@http.bugs.dpdk.org/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.dpdk.org/
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All
MIME-Version: 1.0
Subject: [dpdk-dev] [Bug 279] Unaligned memory access when reading ipv6
	header
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>
Message-ID: <20190516103402.lX0Mwv_Pt3gWpPdKVe24saqrKGEJu-B9s7HQSqkeq3Q@z>

https://bugs.dpdk.org/show_bug.cgi?id=3D279

            Bug ID: 279
           Summary: Unaligned memory access when reading ipv6 header
           Product: DPDK
           Version: 19.02
          Hardware: x86
                OS: Linux
            Status: CONFIRMED
          Severity: normal
          Priority: Normal
         Component: examples
          Assignee: dev@dpdk.org
          Reporter: mplaneta@os.inf.tu-dresden.de
  Target Milestone: ---

Hello,

I'm running l3fwd application in a following way:

sudo ./build/l3fwd -l 2-3 -n 2 --vdev=3Dnet_tap0  --vdev=3Dnet_tap1=20
--vdev=3Dnet_tap2    -- -p 0xe  -E --parse-ptype --config=3D"(1,0,3),(2,0,3=
)"

And it fails with following output:

EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: No free hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: PCI device 0000:00:1f.6 on NUMA socket -1
EAL:   Invalid NUMA socket, default to 0
EAL:   probe driver: 8086:15d8 net_e1000_em
soft parse-ptype is enabled

Skipping disabled port 0
Initializing port 1 ... Creating queues: nb_rxq=3D1 nb_txq=3D2...=20
Address:AE:00:CE:7A:B1:50, Destination:02:00:00:00:00:01, Allocated mbuf po=
ol
on socket 0
Hash: Adding 0x4 keys
txq=3D2,0,0 txq=3D3,1,0=20
Initializing port 2 ... Creating queues: nb_rxq=3D1 nb_txq=3D2...=20
Address:F6:CE:D9:39:29:D2, Destination:02:00:00:00:00:02, txq=3D2,0,0 txq=
=3D3,1,0=20
Initializing port 3 ... Creating queues: nb_rxq=3D0 nb_txq=3D2...=20
Address:92:18:9B:13:E1:EF, Destination:02:00:00:00:00:03, txq=3D2,0,0 txq=
=3D3,1,0=20

Initializing rx queues on lcore 2 ...=20
Initializing rx queues on lcore 3 ... rxq=3D1,0,0 rxq=3D2,0,0=20

Port 1: softly parse packet type info
Port 2: softly parse packet type info

Checking link statusdone
Port1 Link Up. Speed 10000 Mbps -full-duplex
Port2 Link Up. Speed 10000 Mbps -full-duplex
Port3 Link Up. Speed 10000 Mbps -full-duplex
L3FWD: entering main loop on lcore 3
L3FWD:  -- lcoreid=3D3 portid=3D1 rxqueueid=3D0
L3FWD:  -- lcoreid=3D3 portid=3D2 rxqueueid=3D0
L3FWD: lcore 2 has nothing to do
[1]    13769 segmentation fault  sudo ./build/l3fwd -l 2-3 -n 2 --vdev=3Dne=
t_tap0
--vdev=3Dnet_tap1 --vdev=3Dnet_tap

In the debugger I see that the reason point to unaligned memory access in
following instruction:

0x5555555de474 <em_get_ipv6_dst_port+12>        vmovdqa 0x14(%rdi),%xmm2

Where

p/x $rdi + 0x14
$3 =3D 0x100694162

The instruction point to following line of function em_get_ipv6_dst_port:

        key.xmm[1] =3D *(xmm_t *)data1;


I compiled DPDK with following command:

make -j4 install EXTRA_CFLAGS=3D"-ggdb3 -O0" T=3Dx86_64-native-linuxapp-gcc
DESTDIR=3D$(pwd)/../dpdk-install prefix=3D

And used the same CFLAGS for l3fwd

System information

$ lscpu=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
Address sizes:       39 bits physical, 48 bits virtual
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  2
Core(s) per socket:  2
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               142
Model name:          Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
Stepping:            9
CPU MHz:             915.480
CPU max MHz:         3100.0000
CPU min MHz:         400.0000
BogoMIPS:            5424.00
Virtualization:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            3072K
NUMA node0 CPU(s):   0-3
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge m=
ca
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl
xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64
monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2
x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm
3dnowprefetch cpuid_fault epb invpcid_single pti tpr_shadow vnmi flexpriori=
ty
ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rd=
seed
adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat=
 pln
pts hwp hwp_notify hwp_act_window hwp_epp

 $ gcc --version
gcc (Debian 8.2.0-14) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

--=20
You are receiving this mail because:
You are the assignee for the bug.=