From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 2CA475A54 for ; Fri, 12 Jun 2015 03:15:47 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 11 Jun 2015 18:15:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,598,1427785200"; d="scan'208";a="586400865" Received: from pgsmsx104.gar.corp.intel.com ([10.221.44.91]) by orsmga003.jf.intel.com with ESMTP; 11 Jun 2015 18:15:46 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by PGSMSX104.gar.corp.intel.com (10.221.44.91) with Microsoft SMTP Server (TLS) id 14.3.224.2; Fri, 12 Jun 2015 09:15:43 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.246]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.146]) with mapi id 14.03.0224.002; Fri, 12 Jun 2015 09:15:42 +0800 From: "Qiu, Michael" To: "Chen, Jing D" , "dev@dpdk.org" Thread-Topic: [PATCH 2/6] fm10k: Fix jumbo frame issue Thread-Index: AQHQmecE092PxT+YKEO9A4Flvrpagg== Date: Fri, 12 Jun 2015 01:15:41 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E602860469B19E@SHSMSX101.ccr.corp.intel.com> References: <1432887044-24777-1-git-send-email-jing.d.chen@intel.com> <1432887044-24777-3-git-send-email-jing.d.chen@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "He, Shaopeng" Subject: Re: [dpdk-dev] [PATCH 2/6] fm10k: Fix jumbo frame issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 01:15:47 -0000 Tested-by: Michael Qiu =0A= =0A= - OS: Fedora20 3.11.10-301=0A= - GCC: gcc version 4.8.3 2014911=0A= - CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz=0A= - NIC: Ethernet controller: Intel Corporation Device 15a4 (rev 01)=0A= - Default x86_64-native-linuxapp-gcc configuration=0A= - Total 5 cases, 5 passed, 0 failed=0A= =0A= - Case: Normal frames with no jumbo frame support=0A= - Case: Jumbo frames with no jumbo frame support=0A= - Case: Normal frames with jumbo frame support=0A= - Case: Jumbo frames with jumbo frame support=0A= - Case: Frames bigger than jumbo frames, wwith jumbo frame support=0A= =0A= =0A= On 5/29/2015 4:11 PM, Chen, Jing D wrote:=0A= > From: "Chen Jing D(Mark)" =0A= >=0A= > fm10k can't receive frame greater than 1536 and Scatter RX=0A= > function can't work correctly. The root cause is=0A= > SRRCTL.FM10K_SRRCTL_BUFFER_CHAINING_EN bit is not enabled.=0A= >=0A= > Signed-off-by: Chen Jing D(Mark) =0A= > ---=0A= > drivers/net/fm10k/fm10k_ethdev.c | 12 ++++++------=0A= > 1 files changed, 6 insertions(+), 6 deletions(-)=0A= >=0A= > diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_e= thdev.c=0A= > index a5e09a0..19e718b 100644=0A= > --- a/drivers/net/fm10k/fm10k_ethdev.c=0A= > +++ b/drivers/net/fm10k/fm10k_ethdev.c=0A= > @@ -439,9 +439,14 @@ fm10k_dev_rx_init(struct rte_eth_dev *dev)=0A= > =0A= > /* It adds dual VLAN length for supporting dual VLAN */=0A= > if ((dev->data->dev_conf.rxmode.max_rx_pkt_len +=0A= > - 2 * FM10K_VLAN_TAG_SIZE) > buf_size){=0A= > + 2 * FM10K_VLAN_TAG_SIZE) > buf_size ||=0A= > + dev->data->dev_conf.rxmode.enable_scatter) {=0A= > + uint32_t reg;=0A= > dev->data->scattered_rx =3D 1;=0A= > dev->rx_pkt_burst =3D fm10k_recv_scattered_pkts;=0A= > + reg =3D FM10K_READ_REG(hw, FM10K_SRRCTL(i));=0A= > + reg |=3D FM10K_SRRCTL_BUFFER_CHAINING_EN;=0A= > + FM10K_WRITE_REG(hw, FM10K_SRRCTL(i), reg);=0A= > }=0A= > =0A= > /* Enable drop on empty, it's RO for VF */=0A= > @@ -452,11 +457,6 @@ fm10k_dev_rx_init(struct rte_eth_dev *dev)=0A= > FM10K_WRITE_FLUSH(hw);=0A= > }=0A= > =0A= > - if (dev->data->dev_conf.rxmode.enable_scatter) {=0A= > - dev->rx_pkt_burst =3D fm10k_recv_scattered_pkts;=0A= > - dev->data->scattered_rx =3D 1;=0A= > - }=0A= > -=0A= > /* Configure RSS if applicable */=0A= > fm10k_dev_mq_rx_configure(dev);=0A= > return 0;=0A= =0A=