[dpdk-dev,v3,2/5] net/virtio: use simple path for Tx even if Rx mergeable

Message ID 20180607092616.27720-3-maxime.coquelin@redhat.com (mailing list archive)
State Superseded, archived
Delegated to: Maxime Coquelin
Headers
Series net/virtio: Tx path selection and offload improvements |

Checks

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

Commit Message

Maxime Coquelin June 7, 2018, 9:26 a.m. UTC
  Having Rx mergeable buffers feature enabled should not be
a reason to not use Tx simple path.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_ethdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
  

Comments

Tiwei Bie June 12, 2018, 6:18 a.m. UTC | #1
On Thu, Jun 07, 2018 at 11:26:13AM +0200, Maxime Coquelin wrote:
> Having Rx mergeable buffers feature enabled should not be
> a reason to not use Tx simple path.
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>

> ---
>  drivers/net/virtio/virtio_ethdev.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
> index 052dd056a..c6087d9b1 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -1948,10 +1948,8 @@ virtio_dev_configure(struct rte_eth_dev *dev)
>  		hw->use_simple_tx = 0;
>  	}
>  #endif
> -	if (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) {
> +	if (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF))
>  		hw->use_simple_rx = 0;
> -		hw->use_simple_tx = 0;
> -	}
>  
>  	if (rx_offloads & (DEV_RX_OFFLOAD_UDP_CKSUM |
>  			   DEV_RX_OFFLOAD_TCP_CKSUM))
> -- 
> 2.14.3
>
  

Patch

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 052dd056a..c6087d9b1 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1948,10 +1948,8 @@  virtio_dev_configure(struct rte_eth_dev *dev)
 		hw->use_simple_tx = 0;
 	}
 #endif
-	if (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) {
+	if (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF))
 		hw->use_simple_rx = 0;
-		hw->use_simple_tx = 0;
-	}
 
 	if (rx_offloads & (DEV_RX_OFFLOAD_UDP_CKSUM |
 			   DEV_RX_OFFLOAD_TCP_CKSUM))