[dpdk-dev] [PATCH] examples/vhost: Fix vlan offload issue

2014-12-18 Thread Thomas Monjalon
2014-12-17 11:04, Thomas Monjalon:
> 2014-12-17 00:51, Ouyang, Changchun:
> > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> > > 2014-12-12 12:15, Ouyang Changchun:
> > > > The following commit break vm2vm hard mode test cases:
> > > > commit db4014f2b65cb31bf209cadd5bcec778ca137fe2
> > > > Author: Huawei Xie 
> > > > Date:   Thu Nov 13 06:34:07 2014 +0800
> > > > examples/vhost: use factorized default Rx/Tx configuration
> > > >
> > > > Investigation show that it needs enabling vlan offload since it is
> > > > turn off by default, and Tx need it, especially when vm2vm is in hard 
> > > > mode.
> > > 
> > > I missed something here. Where VLAN offload is disabled by default?
> > > Could you point the code, please?
> > 
> > Inside the function ixgbe_dev_info_get()
> > The txq_flags is assigned value of 
> > "ETH_TXQ_FLAGS_MULTISEGS|ETH_TXQ_FLAGS_NOOFFLOADS",
> > The ETH_TXQ_FLAGS_NOOFFLOADS  contain  ETH_TXQ_FLAGS_NOVLANOFFL.
> > so VLAN offload is disabled.
> > 
> > Do you think any incorrect in my original description?
> 
> Yes. You say VLAN offload is turned off by default.
> But it's the case only for ixgbe, i40e and vmxnet3.

Applied with this log change "turn off by default in some drivers"

Thanks
-- 
Thomas


[dpdk-dev] [PATCH] examples/vhost: Fix vlan offload issue

2014-12-17 Thread Thomas Monjalon
2014-12-17 00:51, Ouyang, Changchun:
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> > 2014-12-12 12:15, Ouyang Changchun:
> > > The following commit break vm2vm hard mode test cases:
> > > commit db4014f2b65cb31bf209cadd5bcec778ca137fe2
> > > Author: Huawei Xie 
> > > Date:   Thu Nov 13 06:34:07 2014 +0800
> > > examples/vhost: use factorized default Rx/Tx configuration
> > >
> > > Investigation show that it needs enabling vlan offload since it is
> > > turn off by default, and Tx need it, especially when vm2vm is in hard 
> > > mode.
> > 
> > I missed something here. Where VLAN offload is disabled by default?
> > Could you point the code, please?
> 
> Inside the function ixgbe_dev_info_get()
> The txq_flags is assigned value of 
> "ETH_TXQ_FLAGS_MULTISEGS|ETH_TXQ_FLAGS_NOOFFLOADS",
> The ETH_TXQ_FLAGS_NOOFFLOADS  contain  ETH_TXQ_FLAGS_NOVLANOFFL.
> so VLAN offload is disabled.
> 
> Do you think any incorrect in my original description?

Yes. You say VLAN offload is turned off by default.
But it's the case only for ixgbe, i40e and vmxnet3.

-- 
Thomas


[dpdk-dev] [PATCH] examples/vhost: Fix vlan offload issue

2014-12-17 Thread Ouyang, Changchun
Hi Thomas,

> -Original Message-
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Wednesday, December 17, 2014 12:37 AM
> To: Ouyang, Changchun
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] examples/vhost: Fix vlan offload issue
> 
> 2014-12-12 12:15, Ouyang Changchun:
> > The following commit break vm2vm hard mode test cases:
> > commit db4014f2b65cb31bf209cadd5bcec778ca137fe2
> > Author: Huawei Xie 
> > Date:   Thu Nov 13 06:34:07 2014 +0800
> > examples/vhost: use factorized default Rx/Tx configuration
> >
> > Investigation show that it needs enabling vlan offload since it is
> > turn off by default, and Tx need it, especially when vm2vm is in hard mode.
> 
> I missed something here. Where VLAN offload is disabled by default?
> Could you point the code, please?

Inside the function ixgbe_dev_info_get()
The txq_flags is assigned value of 
"ETH_TXQ_FLAGS_MULTISEGS|ETH_TXQ_FLAGS_NOOFFLOADS",
The ETH_TXQ_FLAGS_NOOFFLOADS  contain  ETH_TXQ_FLAGS_NOVLANOFFL.
so VLAN offload is disabled.

Do you think any incorrect in my original description?

Thanks and regards,
Changchun


[dpdk-dev] [PATCH] examples/vhost: Fix vlan offload issue

2014-12-16 Thread Thomas Monjalon
2014-12-12 12:15, Ouyang Changchun:
> The following commit break vm2vm hard mode test cases:
> commit db4014f2b65cb31bf209cadd5bcec778ca137fe2
> Author: Huawei Xie 
> Date:   Thu Nov 13 06:34:07 2014 +0800
> examples/vhost: use factorized default Rx/Tx configuration
> 
> Investigation show that it needs enabling vlan offload since it is turn off 
> by default,
> and Tx need it, especially when vm2vm is in hard mode.

I missed something here. Where VLAN offload is disabled by default?
Could you point the code, please?

> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -390,6 +390,9 @@ port_init(uint8_t port)
>   txconf = _info.default_txconf;
>   rxconf->rx_drop_en = 1;
>  
> + /* Enable vlan offload */
> + txconf->txq_flags &= ~ETH_TXQ_FLAGS_NOVLANOFFL;
> +
>   /*
>* Zero copy defers queue RX/TX start to the time when guest
>* finishes its startup and packet buffers from that guest are
> 



[dpdk-dev] [PATCH] examples/vhost: Fix vlan offload issue

2014-12-12 Thread Ouyang Changchun
The following commit break vm2vm hard mode test cases:
commit db4014f2b65cb31bf209cadd5bcec778ca137fe2
Author: Huawei Xie 
Date:   Thu Nov 13 06:34:07 2014 +0800
examples/vhost: use factorized default Rx/Tx configuration

Investigation show that it needs enabling vlan offload since it is turn off by 
default,
and Tx need it, especially when vm2vm is in hard mode.

Signed-off-by: Changchun Ouyang 
---
 examples/vhost/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 9331910..04f0118 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -390,6 +390,9 @@ port_init(uint8_t port)
txconf = _info.default_txconf;
rxconf->rx_drop_en = 1;

+   /* Enable vlan offload */
+   txconf->txq_flags &= ~ETH_TXQ_FLAGS_NOVLANOFFL;
+
/*
 * Zero copy defers queue RX/TX start to the time when guest
 * finishes its startup and packet buffers from that guest are
-- 
1.8.4.2