Re: [dpdk-dev] [PATCH v4 1/3] eal/x86: run-time dispatch over memcpy

2017-10-03 Thread Li, Xiaoyun
OK. Got it. Thanks! > -Original Message- > From: Ananyev, Konstantin > Sent: Tuesday, October 3, 2017 20:12 > To: Li, Xiaoyun ; Richardson, Bruce > > Cc: Lu, Wenzhuo ; Zhang, Helin > ; dev@dpdk.org > Subject: RE: [PATCH v4 1/3] eal/x86: run-time dispatch over memcpy > > > > > > > Hi >

Re: [dpdk-dev] [PATCH v4 1/3] eal/x86: run-time dispatch over memcpy

2017-10-03 Thread Ananyev, Konstantin
> > Hi > You mean just use rte_memcpy_internal in rte_memcpy_avx2, rte_memcpy_avx512? Yes, exactly and for rte_memcpy_sse() too. Basically we for rte_memcpy_avx512() we force compiler to use AVX512F path inside rte_memcpy_iternal(), for rte_memcpy_avx2() we use AVX2 path inside rte_memcpy_inte

Re: [dpdk-dev] [PATCH v4 1/3] eal/x86: run-time dispatch over memcpy

2017-10-03 Thread Li, Xiaoyun
Hi You mean just use rte_memcpy_internal in rte_memcpy_avx2, rte_memcpy_avx512? But if RTE_MACHINE_CPUFLAGS_AVX2 means only whether the compiler supports avx2, then internal would only compiled With avx2 codes, then cannot choose other code path. What if the HW cannot support avx2? If RTE_MACHINE

Re: [dpdk-dev] [PATCH v4 1/3] eal/x86: run-time dispatch over memcpy

2017-10-03 Thread Ananyev, Konstantin
Hi, > > Hi > > > -Original Message- > > From: Ananyev, Konstantin > > Sent: Tuesday, October 3, 2017 00:39 > > To: Li, Xiaoyun ; Richardson, Bruce > > > > Cc: Lu, Wenzhuo ; Zhang, Helin > > ; dev@dpdk.org > > Subject: RE: [PATCH v4 1/3] eal/x86: run-time dispatch over memcpy > > > > > >

Re: [dpdk-dev] [PATCH v4 1/3] eal/x86: run-time dispatch over memcpy

2017-10-02 Thread Li, Xiaoyun
Hi > -Original Message- > From: Ananyev, Konstantin > Sent: Tuesday, October 3, 2017 00:39 > To: Li, Xiaoyun ; Richardson, Bruce > > Cc: Lu, Wenzhuo ; Zhang, Helin > ; dev@dpdk.org > Subject: RE: [PATCH v4 1/3] eal/x86: run-time dispatch over memcpy > > > > > -Original Message-

Re: [dpdk-dev] [PATCH v4 1/3] eal/x86: run-time dispatch over memcpy

2017-10-02 Thread Ananyev, Konstantin
> -Original Message- > From: Li, Xiaoyun > Sent: Monday, October 2, 2017 5:13 PM > To: Ananyev, Konstantin ; Richardson, Bruce > > Cc: Lu, Wenzhuo ; Zhang, Helin ; > dev@dpdk.org; Li, Xiaoyun > Subject: [PATCH v4 1/3] eal/x86: run-time dispatch over memcpy > > This patch dynamically

[dpdk-dev] [PATCH v4 1/3] eal/x86: run-time dispatch over memcpy

2017-10-02 Thread Xiaoyun Li
This patch dynamically selects functions of memcpy at run-time based on CPU flags that current machine supports. This patch uses function pointers which are bind to the relative functions at constrctor time. In addition, AVX512 instructions set would be compiled only if users config it enabled and