[dpdk-dev,v4,1/2] net/ixgbe: add SSE4.1 support to vPMD's minimum requirement
Checks
Commit Message
x86 vPMD will be disabled if currently platform does not support SSE4.1.
This is the prework to enable vPMD ptype offload where SSE4.1 instrunctions
will be involved.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 4 ++++
1 file changed, 4 insertions(+)
Comments
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qi Zhang
> Sent: Tuesday, June 13, 2017 9:58 AM
> To: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>
> Cc: dev@dpdk.org; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Zhang, Helin
> <helin.zhang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: [dpdk-dev] [PATCH v4 1/2] net/ixgbe: add SSE4.1 support to vPMD's
> minimum requirement
>
> x86 vPMD will be disabled if currently platform does not support SSE4.1.
> This is the prework to enable vPMD ptype offload where SSE4.1
> instrunctions will be involved.
>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
> drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
> b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
> index a7bc199..fbbd872 100644
> --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
> +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
> @@ -652,5 +652,9 @@ ixgbe_txq_vec_setup(struct ixgbe_tx_queue *txq) int
> __attribute__((cold)) ixgbe_rx_vec_dev_conf_condition_check(struct
> rte_eth_dev *dev) {
> + /* need SSE4.1 support */
> + if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_SSE4_1))
> + return -1;
> +
> return ixgbe_rx_vec_dev_conf_condition_check_default(dev);
> }
Quite a few things for DPDK on x86 and x86_64 depend on SSE4.x now. I think we should just up the minimum supported x86 CPU architecture for DPDK to require SSE4.2 and be done with it. SSE4.2 has been around for almost a decade now (https://en.wikipedia.org/wiki/SSE4#SSE4.2), and so I would consider it unlikely that anyone wants to use DPDK on a machine which does not have that instruction set supported.
Doing so would mean we remove all conditional compilation settings for our x86 vector drivers to add -msse flags, and can replace these runtime checks in each driver with a single check in EAL init to ensure the CPU supports SSE4.2. Possibly other cleanup could be done as well.
Thoughts? any objections?
/Bruce
> -----Original Message-----
> From: Richardson, Bruce
> Sent: Tuesday, June 13, 2017 5:31 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Ananyev, Konstantin <konstantin.ananyev@intel.com>; Yigit, Ferruh <ferruh.yigit@intel.com>
> Cc: dev@dpdk.org; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Zhang, Helin <helin.zhang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: RE: [dpdk-dev] [PATCH v4 1/2] net/ixgbe: add SSE4.1 support to vPMD's minimum requirement
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qi Zhang
> > Sent: Tuesday, June 13, 2017 9:58 AM
> > To: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Yigit, Ferruh
> > <ferruh.yigit@intel.com>
> > Cc: dev@dpdk.org; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Zhang, Helin
> > <helin.zhang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> > Subject: [dpdk-dev] [PATCH v4 1/2] net/ixgbe: add SSE4.1 support to vPMD's
> > minimum requirement
> >
> > x86 vPMD will be disabled if currently platform does not support SSE4.1.
> > This is the prework to enable vPMD ptype offload where SSE4.1
> > instrunctions will be involved.
> >
> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> > ---
> > drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
> > b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
> > index a7bc199..fbbd872 100644
> > --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
> > +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
> > @@ -652,5 +652,9 @@ ixgbe_txq_vec_setup(struct ixgbe_tx_queue *txq) int
> > __attribute__((cold)) ixgbe_rx_vec_dev_conf_condition_check(struct
> > rte_eth_dev *dev) {
> > + /* need SSE4.1 support */
> > + if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_SSE4_1))
> > + return -1;
> > +
> > return ixgbe_rx_vec_dev_conf_condition_check_default(dev);
> > }
>
> Quite a few things for DPDK on x86 and x86_64 depend on SSE4.x now. I think we should just up the minimum supported x86 CPU
> architecture for DPDK to require SSE4.2 and be done with it. SSE4.2 has been around for almost a decade now
> (https://en.wikipedia.org/wiki/SSE4#SSE4.2), and so I would consider it unlikely that anyone wants to use DPDK on a machine which does
> not have that instruction set supported.
>
> Doing so would mean we remove all conditional compilation settings for our x86 vector drivers to add -msse flags, and can replace these
> runtime checks in each driver with a single check in EAL init to ensure the CPU supports SSE4.2. Possibly other cleanup could be done as
> well.
>
> Thoughts? any objections?
+1 to bump min supported HW to sse4.2
Konstantin
On 6/13/2017 9:58 AM, Qi Zhang wrote:
> x86 vPMD will be disabled if currently platform does not support SSE4.1.
> This is the prework to enable vPMD ptype offload where SSE4.1 instrunctions
> will be involved.
>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Series applied to dpdk-next-net/master, thanks.
(Kept original Ack from Konstantin.)
On 6/15/2017 11:26 AM, Ferruh Yigit wrote:
> On 6/13/2017 9:58 AM, Qi Zhang wrote:
>> x86 vPMD will be disabled if currently platform does not support SSE4.1.
>> This is the prework to enable vPMD ptype offload where SSE4.1 instrunctions
>> will be involved.
>>
>> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
>
> Series applied to dpdk-next-net/master, thanks.
>
> (Kept original Ack from Konstantin.)
This check is no more required because of Bruce's patchset [1] increases
minimum required support to SSE4.2, thanks Thomas for catching this.
Patch will be dropped from next-net.
[1]
http://dpdk.org/ml/archives/dev/2017-June/thread.html#68237
@@ -652,5 +652,9 @@ ixgbe_txq_vec_setup(struct ixgbe_tx_queue *txq)
int __attribute__((cold))
ixgbe_rx_vec_dev_conf_condition_check(struct rte_eth_dev *dev)
{
+ /* need SSE4.1 support */
+ if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_SSE4_1))
+ return -1;
+
return ixgbe_rx_vec_dev_conf_condition_check_default(dev);
}