From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 49B9619F5 for ; Wed, 24 Dec 2014 04:09:33 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 23 Dec 2014 19:09:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,636,1413270000"; d="scan'208";a="628509810" Received: from kmsmsx151.gar.corp.intel.com ([172.21.73.86]) by orsmga001.jf.intel.com with ESMTP; 23 Dec 2014 19:09:19 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by KMSMSX151.gar.corp.intel.com (172.21.73.86) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 24 Dec 2014 11:08:16 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.182]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.110]) with mapi id 14.03.0195.001; Wed, 24 Dec 2014 11:08:15 +0800 From: "Zhang, Helin" To: "Ouyang, Changchun" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup Thread-Index: AQHQHyVS2jdLT8OVMUqRGqDQCceeBJyeDu+Q Date: Wed, 24 Dec 2014 03:08:14 +0000 Message-ID: References: <1418612225-6095-1-git-send-email-changchun.ouyang@intel.com> <1419389808-9559-1-git-send-email-changchun.ouyang@intel.com> <1419389808-9559-2-git-send-email-changchun.ouyang@intel.com> In-Reply-To: <1419389808-9559-2-git-send-email-changchun.ouyang@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 Subject: Re: [dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup 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: Wed, 24 Dec 2014 03:09:34 -0000 Is header split really supported in ixgbe? I guess not. If not, this code c= hanges are not needed at all. Regards, Helin > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ouyang Changchun > Sent: Wednesday, December 24, 2014 10:57 AM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup >=20 > Put global register configuring out of loop for queue; also fix typo and = indent. >=20 > Signed-off-by: Changchun Ouyang > --- > lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 29 +++++++++++++++-------------- > 1 file changed, 15 insertions(+), 14 deletions(-) >=20 > diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c > b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c > index 5c36bff..f58f98e 100644 > --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c > +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c > @@ -3985,7 +3985,7 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev) > struct igb_rx_queue *rxq; > struct rte_pktmbuf_pool_private *mbp_priv; > uint64_t bus_addr; > - uint32_t srrctl; > + uint32_t srrctl, psrtype =3D 0; > uint16_t buf_size; > uint16_t i; > int ret; > @@ -4039,20 +4039,10 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev) > * Configure Header Split > */ > if (dev->data->dev_conf.rxmode.header_split) { > - > - /* Must setup the PSRTYPE register */ > - uint32_t psrtype; > - psrtype =3D IXGBE_PSRTYPE_TCPHDR | > - IXGBE_PSRTYPE_UDPHDR | > - IXGBE_PSRTYPE_IPV4HDR | > - IXGBE_PSRTYPE_IPV6HDR; > - > - IXGBE_WRITE_REG(hw, IXGBE_VFPSRTYPE(i), psrtype); > - > srrctl =3D ((dev->data->dev_conf.rxmode.split_hdr_size << > - IXGBE_SRRCTL_BSIZEHDRSIZE_SHIFT) & > - IXGBE_SRRCTL_BSIZEHDR_MASK); > - srrctl |=3D E1000_SRRCTL_DESCTYPE_HDR_SPLIT_ALWAYS; > + IXGBE_SRRCTL_BSIZEHDRSIZE_SHIFT) & > + IXGBE_SRRCTL_BSIZEHDR_MASK); > + srrctl |=3D IXGBE_SRRCTL_DESCTYPE_HDR_SPLIT_ALWAYS; > } else > #endif > srrctl =3D IXGBE_SRRCTL_DESCTYPE_ADV_ONEBUF; @@ -4095,6 > +4085,17 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev) > } > } >=20 > +#ifdef RTE_HEADER_SPLIT_ENABLE > + if (dev->data->dev_conf.rxmode.header_split) { > + /* Must setup the PSRTYPE register */ > + psrtype =3D IXGBE_PSRTYPE_TCPHDR | > + IXGBE_PSRTYPE_UDPHDR | > + IXGBE_PSRTYPE_IPV4HDR | > + IXGBE_PSRTYPE_IPV6HDR; > +#endif > + > + IXGBE_WRITE_REG(hw, IXGBE_VFPSRTYPE, psrtype); > + > if (dev->data->dev_conf.rxmode.enable_scatter) { > if (!dev->data->scattered_rx) > PMD_INIT_LOG(DEBUG, "forcing scatter mode"); > -- > 1.8.4.2