[dpdk-dev] net/virtio: fix Rx and Tx handler selection for arm32

Message ID 20171214143213.28577-1-olivier.matz@6wind.com (mailing list archive)
State Accepted, archived
Delegated to: Yuanhan Liu
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Olivier Matz Dec. 14, 2017, 2:32 p.m. UTC
  From: Samuel Gauthier <samuel.gauthier@6wind.com>

On arm32, we were always selecting the simple handler, but it is only
available if neon is present.

This is due to a typo in the name of the config option.
CONFIG_RTE_ARCH_ARM is for Makefiles. One should use RTE_ARCH_ARM.

Fixes: 2d7c37194ee4 ("net/virtio: add NEON based Rx handler")
Cc: stable@dpdk.org

Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
---
 drivers/net/virtio/virtio_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Maxime Coquelin Dec. 14, 2017, 2:45 p.m. UTC | #1
Hi Olivier,

On 12/14/2017 03:32 PM, Olivier Matz wrote:
> From: Samuel Gauthier<samuel.gauthier@6wind.com>
> 
> On arm32, we were always selecting the simple handler, but it is only
> available if neon is present.
> 
> This is due to a typo in the name of the config option.
> CONFIG_RTE_ARCH_ARM is for Makefiles. One should use RTE_ARCH_ARM.
> 
> Fixes: 2d7c37194ee4 ("net/virtio: add NEON based Rx handler")
> Cc:stable@dpdk.org
> 
> Signed-off-by: Samuel Gauthier<samuel.gauthier@6wind.com>
> ---
>   drivers/net/virtio/virtio_ethdev.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks!
Maxime
  
Yuanhan Liu Jan. 26, 2018, 3:28 p.m. UTC | #2
On Thu, Dec 14, 2017 at 03:45:04PM +0100, Maxime Coquelin wrote:
> Hi Olivier,
> 
> On 12/14/2017 03:32 PM, Olivier Matz wrote:
> >From: Samuel Gauthier<samuel.gauthier@6wind.com>
> >
> >On arm32, we were always selecting the simple handler, but it is only
> >available if neon is present.
> >
> >This is due to a typo in the name of the config option.
> >CONFIG_RTE_ARCH_ARM is for Makefiles. One should use RTE_ARCH_ARM.
> >
> >Fixes: 2d7c37194ee4 ("net/virtio: add NEON based Rx handler")
> >Cc:stable@dpdk.org
> >
> >Signed-off-by: Samuel Gauthier<samuel.gauthier@6wind.com>
> >---
> >  drivers/net/virtio/virtio_ethdev.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Applied to dpdk-next-virtio.

Thanks.

	--yliu
  

Patch

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index e0328f61d..c0ba83b06 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1784,7 +1784,7 @@  virtio_dev_configure(struct rte_eth_dev *dev)
 	hw->use_simple_rx = 1;
 	hw->use_simple_tx = 1;
 
-#if defined RTE_ARCH_ARM64 || defined CONFIG_RTE_ARCH_ARM
+#if defined RTE_ARCH_ARM64 || defined RTE_ARCH_ARM
 	if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_NEON)) {
 		hw->use_simple_rx = 0;
 		hw->use_simple_tx = 0;