Message ID | 1418357726-25141-1-git-send-email-changchun.ouyang@intel.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 87A3E8047; Fri, 12 Dec 2014 05:15:35 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id C2D6F8045 for <dev@dpdk.org>; Fri, 12 Dec 2014 05:15:33 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 11 Dec 2014 20:13:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,561,1413270000"; d="scan'208";a="652659655" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 11 Dec 2014 20:15:32 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id sBC4FUw5022684; Fri, 12 Dec 2014 12:15:30 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id sBC4FSKr025174; Fri, 12 Dec 2014 12:15:30 +0800 Received: (from couyang@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id sBC4FRVi025170; Fri, 12 Dec 2014 12:15:27 +0800 From: Ouyang Changchun <changchun.ouyang@intel.com> To: dev@dpdk.org Date: Fri, 12 Dec 2014 12:15:26 +0800 Message-Id: <1418357726-25141-1-git-send-email-changchun.ouyang@intel.com> X-Mailer: git-send-email 1.7.12.2 Subject: [dpdk-dev] [PATCH] examples/vhost: Fix vlan offload issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Ouyang Changchun
Dec. 12, 2014, 4:15 a.m. UTC
The following commit break vm2vm hard mode test cases:
commit db4014f2b65cb31bf209cadd5bcec778ca137fe2
Author: Huawei Xie <huawei.xie@intel.com>
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 <changchun.ouyang@intel.com>
---
examples/vhost/main.c | 3 +++
1 file changed, 3 insertions(+)
Comments
2014-12-12 12:15, Ouyang Changchun: > The following commit break vm2vm hard mode test cases: > commit db4014f2b65cb31bf209cadd5bcec778ca137fe2 > Author: Huawei Xie <huawei.xie@intel.com> > 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 = &dev_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 >
Hi Thomas, > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Wednesday, December 17, 2014 12:37 AM > To: Ouyang, Changchun > Cc: dev@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 <huawei.xie@intel.com> > > 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
2014-12-17 00:51, Ouyang, Changchun: > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > 2014-12-12 12:15, Ouyang Changchun: > > > The following commit break vm2vm hard mode test cases: > > > commit db4014f2b65cb31bf209cadd5bcec778ca137fe2 > > > Author: Huawei Xie <huawei.xie@intel.com> > > > 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.
2014-12-17 11:04, Thomas Monjalon: > 2014-12-17 00:51, Ouyang, Changchun: > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > 2014-12-12 12:15, Ouyang Changchun: > > > > The following commit break vm2vm hard mode test cases: > > > > commit db4014f2b65cb31bf209cadd5bcec778ca137fe2 > > > > Author: Huawei Xie <huawei.xie@intel.com> > > > > 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
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 = &dev_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