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 8EBF3A0547 for ; Fri, 5 Mar 2021 12:25:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D3904069B; Fri, 5 Mar 2021 12:25:38 +0100 (CET) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by mails.dpdk.org (Postfix) with ESMTP id F2DC140147 for ; Fri, 5 Mar 2021 12:25:37 +0100 (CET) X-Originating-IP: 88.120.5.225 Received: from DESKTOPDFIJDS2 (unknown [88.120.5.225]) (Authenticated sender: nicolas.neel@allentis.eu) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 31F5640002; Fri, 5 Mar 2021 11:25:36 +0000 (UTC) From: To: "'Das, Surajit'" , References: <011601d71117$7076e8c0$5164ba40$@allentis.eu> In-Reply-To: Date: Fri, 5 Mar 2021 12:25:34 +0100 Message-ID: <000201d711b2$4451a050$ccf4e0f0$@allentis.eu> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQGeUNaDHZb2ZkP/FVUZS97UBVGGlgHV1pDkqtfZg9A= Content-Language: fr Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [dpdk-users] Segmentation fault with -msse3 X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" Hi Surajit, =20 Thanks for your reactivity and your help. Like you, I thought the cpu has no ssse3 instruction, but if you take a = look on the CPU flags, the SSSE3 flag is present. =20 flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge = mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc art rep_good nopl nonstop_tsc extd_apicid aperfmperf eagerfpu pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm = extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_l2 cpb cat_l3 cdp_l3 = hw_pstate sme retpoline_amd ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep = bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf = xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif umip overflow_recov succor smca =20 I build my programm on a vitual machine (with a intel cpu) and run it on = a physical machine with a AMD cpu. I use the =AB -march=3Dznver2 =BB to = generate instructions for the AMD Cpu (AMD EPYC 7402P). I need to have a maximum of performance, so, if I could do some = instruction in CPU instead in the software. =20 May be I miss something, a flag ? a library ? , if someone could help me = ? I don't have many experiance about CPU instructions/optimisations.=20 Any help will be appreciate. Best regards Nicolas =20 De : Das, Surajit =20 Envoy=E9 : jeudi 4 mars 2021 18:28 =C0 : nicolas.neel@allentis.eu; users@dpdk.org Objet : RE: [dpdk-users] Segmentation fault with -msse3 =20 Hi Nicolas, =20 Looks like the CPU you are running on does not have the instruction = ssse3. To check the list of flags available of your cpu, you can run: lscpu | grep Flags You will find that in the list of flags, ssse3 is not available on your = cpu. =20 You can compile and run your app with the flag removed without = functional issues. Only difference will be that a bunch of instructions that could have = been done faster in CPU hardware using ssse3, will now be done in software. =20 Regards, Surajit =20 From: users > On Behalf Of nicolas.neel@allentis.eu =20 Sent: Thursday, March 4, 2021 10:27 PM To: users@dpdk.org =20 Subject: [dpdk-users] Segmentation fault with -msse3 =20 =20 Hello dpdk users,=20 =20 =20 I'm a newbie to dpdk and I try to get the list of the rss hash functions = for a given port with the following code :=20 =20 =20 static uint64_t get_rss_function(int port_id){ =20 int ret; =20 struct rte_eth_rss_conf rss_conf; =20 =20 ret =3D = rte_eth_dev_rss_hash_conf_get(port_id,&rss_conf); =20 if(ret < 0){ =20 printf("No supported rss\n"); =20 return 0; =20 } =20 return rss_conf.rss_hf; =20 } =20 =20 I use dpdk version 20.11 and my code is compiled with the following = flags (I 'm following the tips of the doc) :=20 =20 CXXFLAGS +=3D -mssse3 -mfma -mcx16 -msse4.1 -msse4.2 -mpopcnt -mavx = -mavx2 -DALLOW_EXPERIMENTAL_API =20 =20 I have a segmentation fault calling ret =3D rte_eth_dev_rss_hash_conf_get(port_id,&rss_conf) ; and the coredump tell = an issue with __memcpy_ssse3(). =20 =20 If I remove the -mssse3 I don't have the crash. =20 =20 Can you help me to identify the reason of the segmentation fault and = tell me if I can easily remove the < -mssse3 > flag ? =20 =20 (Sorry for my english) =20 Regards=20 =20 Nicolas =20