DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] Segmentation fault with -msse3
@ 2021-03-04 16:57 nicolas.neel
  2021-03-04 17:27 ` Das, Surajit
  0 siblings, 1 reply; 4+ messages in thread
From: nicolas.neel @ 2021-03-04 16:57 UTC (permalink / raw)
  To: users

Hello dpdk users, 

 

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 : 

 

static uint64_t get_rss_function(int port_id){

                int ret;

                struct rte_eth_rss_conf rss_conf;

 

                ret = rte_eth_dev_rss_hash_conf_get(port_id,&rss_conf);

                if(ret < 0){

                               printf("No supported rss\n");

                               return 0;

                }

                return rss_conf.rss_hf;

}

 

I use dpdk version 20.11 and my code is compiled with the following flags (I
'm following the tips of the doc) : 

CXXFLAGS += -mssse3 -mfma -mcx16 -msse4.1 -msse4.2 -mpopcnt -mavx -mavx2
-DALLOW_EXPERIMENTAL_API

 

I have a segmentation fault calling ret =
rte_eth_dev_rss_hash_conf_get(port_id,&rss_conf) ; and the coredump tell an
issue with __memcpy_ssse3().

 

If I remove the -mssse3 I don't have the crash.

 

Can you help me to identify the reason of the segmentation fault and tell me
if I can easily remove the < -mssse3 > flag ?

 

(Sorry for my english)

Regards 

Nicolas


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-users] Segmentation fault with -msse3
  2021-03-04 16:57 [dpdk-users] Segmentation fault with -msse3 nicolas.neel
@ 2021-03-04 17:27 ` Das, Surajit
  2021-03-05 11:25   ` nicolas.neel
  0 siblings, 1 reply; 4+ messages in thread
From: Das, Surajit @ 2021-03-04 17:27 UTC (permalink / raw)
  To: nicolas.neel, users

Hi Nicolas,

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.

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.

Regards,
Surajit

From: users <users-bounces@dpdk.org> On Behalf Of nicolas.neel@allentis.eu
Sent: Thursday, March 4, 2021 10:27 PM
To: users@dpdk.org
Subject: [dpdk-users] Segmentation fault with -msse3

Hello dpdk users, 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 : static uint64_t get_rss_function(int port_id){ int ret; struct rte
Caution (External, nicolas.neel@allentis.eu<mailto:nicolas.neel@allentis.eu>)
First-Time Sender   Details<https://shared.outlook.inky.com/details?id=Y29tbXNjb3BlL3N1cmFqaXQuZGFzQGNvbW1zY29wZS5jb20vNjQxYTEzNjExYzE5MDE4YTRmNjdmNGM4NzAxZjFkNTcvMTYxNDg3NzA2Mi4zOA==#key=0d6d90ea2c04f62ddfb3edae57dd7e6c>
  Report This Email<https://shared.outlook.inky.com/report?id=Y29tbXNjb3BlL3N1cmFqaXQuZGFzQGNvbW1zY29wZS5jb20vNjQxYTEzNjExYzE5MDE4YTRmNjdmNGM4NzAxZjFkNTcvMTYxNDg3NzA2Mi4zOA==#key=0d6d90ea2c04f62ddfb3edae57dd7e6c>  FAQ<https://www.inky.com/banner-faq/>  Protection by INKY<https://www.inky.com>


Hello dpdk users,





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 :





static uint64_t get_rss_function(int port_id){



                int ret;



                struct rte_eth_rss_conf rss_conf;





                ret = rte_eth_dev_rss_hash_conf_get(port_id,&rss_conf);



                if(ret < 0){



                               printf("No supported rss\n");



                               return 0;



                }



                return rss_conf.rss_hf;



}





I use dpdk version 20.11 and my code is compiled with the following flags (I

'm following the tips of the doc) :



CXXFLAGS += -mssse3 -mfma -mcx16 -msse4.1 -msse4.2 -mpopcnt -mavx -mavx2

-DALLOW_EXPERIMENTAL_API





I have a segmentation fault calling ret =

rte_eth_dev_rss_hash_conf_get(port_id,&rss_conf) ; and the coredump tell an

issue with __memcpy_ssse3().





If I remove the -mssse3 I don't have the crash.





Can you help me to identify the reason of the segmentation fault and tell me

if I can easily remove the < -mssse3 > flag ?





(Sorry for my english)



Regards



Nicolas



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-users] Segmentation fault with -msse3
  2021-03-04 17:27 ` Das, Surajit
@ 2021-03-05 11:25   ` nicolas.neel
  2021-03-05 12:38     ` Das, Surajit
  0 siblings, 1 reply; 4+ messages in thread
From: nicolas.neel @ 2021-03-05 11:25 UTC (permalink / raw)
  To: Das, Surajit, users

Hi Surajit,

 

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.

 

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

 

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  « -march=znver2 » 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.

 

May be I miss something, a flag ? a library ? , if someone could help me ?
I don't have many experiance about CPU instructions/optimisations. 

Any help will be appreciate.

Best regards

Nicolas

 

De : Das, Surajit <Surajit.Das@commscope.com> 
Envoyé : jeudi 4 mars 2021 18:28
À : nicolas.neel@allentis.eu; users@dpdk.org
Objet : RE: [dpdk-users] Segmentation fault with -msse3

 

Hi Nicolas,

 

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.

 

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.

 

Regards,

Surajit

 

From: users <users-bounces@dpdk.org <mailto:users-bounces@dpdk.org> > On
Behalf Of nicolas.neel@allentis.eu <mailto:nicolas.neel@allentis.eu> 
Sent: Thursday, March 4, 2021 10:27 PM
To: users@dpdk.org <mailto:users@dpdk.org> 
Subject: [dpdk-users] Segmentation fault with -msse3

 

 

Hello dpdk users, 

 

 

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 : 

 

 

static uint64_t get_rss_function(int port_id){

 

                int ret;

 

                struct rte_eth_rss_conf rss_conf;

 

 

                ret = rte_eth_dev_rss_hash_conf_get(port_id,&rss_conf);

 

                if(ret < 0){

 

                               printf("No supported rss\n");

 

                               return 0;

 

                }

 

                return rss_conf.rss_hf;

 

}

 

 

I use dpdk version 20.11 and my code is compiled with the following flags (I

'm following the tips of the doc) : 

 

CXXFLAGS += -mssse3 -mfma -mcx16 -msse4.1 -msse4.2 -mpopcnt -mavx -mavx2

-DALLOW_EXPERIMENTAL_API

 

 

I have a segmentation fault calling ret =

rte_eth_dev_rss_hash_conf_get(port_id,&rss_conf) ; and the coredump tell an

issue with __memcpy_ssse3().

 

 

If I remove the -mssse3 I don't have the crash.

 

 

Can you help me to identify the reason of the segmentation fault and tell me

if I can easily remove the < -mssse3 > flag ?

 

 

(Sorry for my english)

 

Regards 

 

Nicolas

 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-users] Segmentation fault with -msse3
  2021-03-05 11:25   ` nicolas.neel
@ 2021-03-05 12:38     ` Das, Surajit
  0 siblings, 0 replies; 4+ messages in thread
From: Das, Surajit @ 2021-03-05 12:38 UTC (permalink / raw)
  To: nicolas.neel, users

Hi Nicolas,

I do not have experience of running DPDK on AMD CPUs.

I can however suggest this:
Please try compiling the kernel modules that you attach to the NICs you are going to use on the same machine.
The kernel module is igb_uio.ko.
Your issue could be because the kernel module/driver was not compiled for this CPU.
If you have compiled your dpdk sdk, then the kernel module should be present here:
./build/build/kernel/linux/igb_uio/igb_uio.ko
./build/kmod/igb_uio.ko

Then load these kernel modules using:
modprobe uio
insmod ./build/kmod/igb_uio.ko

Now, bind the NICs you are going to use, to this driver using :
./usertools/dpdk-devbind.py --bind=igb_uio <pci_address_of_nic>

You can get the PCI addresses of the NICs using:
./usertools/dpdk-devbind.py --status-dev net

I hope this helps, but if it doesn't, someone with more hands on experience on DPDK + AMD should take a look.

Regards,
Surajit

From: nicolas.neel@allentis.eu <nicolas.neel@allentis.eu>
Sent: Friday, March 5, 2021 4:56 PM
To: Das, Surajit <Surajit.Das@commscope.com>; users@dpdk.org
Subject: [dpdk-users] Segmentation fault with -msse3

Hi Surajit, 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. flags : fpu vme de pse t
External (nicolas.neel@allentis.eu<mailto:nicolas.neel@allentis.eu>)
  Report This Email<https://shared.outlook.inky.com/report?id=Y29tbXNjb3BlL3N1cmFqaXQuZGFzQGNvbW1zY29wZS5jb20vYTk4MTY1ZDA2ZTRkN2JhOTM5MzA4ZTdhNTU5NGRhYTYvMTYxNDk0MzU0Ni42OA==#key=927b4809e2376d4e6d7847b69b8bb282>  FAQ<https://www.inky.com/banner-faq/>  Protection by INKY<https://www.inky.com>

Hi Surajit,

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.

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

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  « -march=znver2 » 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.

May be I miss something, a flag ? a library ? , if someone could help me ?  I don't have many experiance about CPU instructions/optimisations.
Any help will be appreciate.
Best regards
Nicolas

De : Das, Surajit <Surajit.Das@commscope.com<mailto:Surajit.Das@commscope.com>>
Envoyé : jeudi 4 mars 2021 18:28
À : nicolas.neel@allentis.eu<mailto:nicolas.neel@allentis.eu>; users@dpdk.org<mailto:users@dpdk.org>
Objet : RE: [dpdk-users] Segmentation fault with -msse3

Hi Nicolas,

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.

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.

Regards,
Surajit

From: users <users-bounces@dpdk.org<mailto:users-bounces@dpdk.org>> On Behalf Of nicolas.neel@allentis.eu<mailto:nicolas.neel@allentis.eu>
Sent: Thursday, March 4, 2021 10:27 PM
To: users@dpdk.org<mailto:users@dpdk.org>
Subject: [dpdk-users] Segmentation fault with -msse3



Hello dpdk users,





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 :





static uint64_t get_rss_function(int port_id){



                int ret;



                struct rte_eth_rss_conf rss_conf;





                ret = rte_eth_dev_rss_hash_conf_get(port_id,&rss_conf);



                if(ret < 0){



                               printf("No supported rss\n");



                               return 0;



                }



                return rss_conf.rss_hf;



}





I use dpdk version 20.11 and my code is compiled with the following flags (I

'm following the tips of the doc) :



CXXFLAGS += -mssse3 -mfma -mcx16 -msse4.1 -msse4.2 -mpopcnt -mavx -mavx2

-DALLOW_EXPERIMENTAL_API





I have a segmentation fault calling ret =

rte_eth_dev_rss_hash_conf_get(port_id,&rss_conf) ; and the coredump tell an

issue with __memcpy_ssse3().





If I remove the -mssse3 I don't have the crash.





Can you help me to identify the reason of the segmentation fault and tell me

if I can easily remove the < -mssse3 > flag ?





(Sorry for my english)



Regards



Nicolas



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-05 12:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04 16:57 [dpdk-users] Segmentation fault with -msse3 nicolas.neel
2021-03-04 17:27 ` Das, Surajit
2021-03-05 11:25   ` nicolas.neel
2021-03-05 12:38     ` Das, Surajit

DPDK usage discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ https://inbox.dpdk.org/users \
		users@dpdk.org
	public-inbox-index users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git