From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id EEF6AC3F0 for ; Mon, 3 Aug 2015 04:40:17 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 02 Aug 2015 19:40:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,598,1432623600"; d="scan'208";a="760538570" Received: from pgsmsx102.gar.corp.intel.com ([10.221.44.80]) by fmsmga001.fm.intel.com with ESMTP; 02 Aug 2015 19:40:16 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by PGSMSX102.gar.corp.intel.com (10.221.44.80) with Microsoft SMTP Server (TLS) id 14.3.224.2; Mon, 3 Aug 2015 10:40:15 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.126]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.213]) with mapi id 14.03.0224.002; Mon, 3 Aug 2015 10:40:13 +0800 From: "Liang, Cunming" To: Zoltan Kiss , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v1] ixgbe: remove vector pmd burst size restriction Thread-Index: AQHQy2lvtOg+50M+R0aTJweQ4Ueq053002mAgAS47QA= Date: Mon, 3 Aug 2015 02:40:12 +0000 Message-ID: References: <1438330669-25942-1-git-send-email-cunming.liang@intel.com> <55BB47FB.3000409@linaro.org> In-Reply-To: <55BB47FB.3000409@linaro.org> Accept-Language: zh-CN, 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 v1] ixgbe: remove vector pmd burst size restriction 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: Mon, 03 Aug 2015 02:40:18 -0000 Hi,=20 [...] > > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_r= xtx.c > > index 3f808b3..dbdb761 100644 > > --- a/drivers/net/ixgbe/ixgbe_rxtx.c > > +++ b/drivers/net/ixgbe/ixgbe_rxtx.c > > @@ -4008,7 +4008,8 @@ ixgbe_set_rx_function(struct rte_eth_dev *dev) > > */ > > } else if (adapter->rx_vec_allowed) { > > PMD_INIT_LOG(DEBUG, "Vector rx enabled, please make sure > RX " > > - "burst size no less than 32."); > > + "burst size no less than 4 (port=3D%d).", > > + dev->data->port_id); >=20 > I think it would be better to use RTE_IXGBE_DESCS_PER_LOOP instead of a > constant 4. > > [...] > > > > /* > > - * vPMD receive routine, now only accept (nb_pkts =3D=3D > RTE_IXGBE_VPMD_RX_BURST) > > - * in one loop > > + * vPMD raw receive routine > I would keep some warning there, like "(if nb_pkts < > RTE_IXGBE_DESCS_PER_LOOP, won't receive anything)" >=20 > > * > > * Notice: > > - * - nb_pkts < RTE_IXGBE_VPMD_RX_BURST, just return no packet > > - * - nb_pkts > RTE_IXGBE_VPMD_RX_BURST, only scan > RTE_IXGBE_VPMD_RX_BURST > > - * numbers of DD bit > > + * - floor align nb_pkts to a RTE_IXGBE_DESC_PER_LOOP power-of-two > > + * - 'nb_pkts < 4' causes 0 packet receiving > Again, RTE_IXGBE_DESCS_PER_LOOP would be better than 4 >=20 [...] > > uint16_t > > ixgbe_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pk= ts, > > uint16_t nb_pkts) > > { > > struct ixgbe_rx_queue *rxq =3D rx_queue; > > - uint8_t split_flags[RTE_IXGBE_VPMD_RX_BURST] =3D {0}; > > + uint8_t split_flags[nb_pkts]; > > + > > + memset(split_flags, 0, nb_pkts); > > > > /* get some new buffers */ > > uint16_t nb_bufs =3D _recv_raw_pkts_vec(rxq, rx_pkts, nb_pkts, >=20 > After this _recv_raw_pkts_vec it checks 32 bytes in split_flags (4x8 > bytes), that can overrun or miss some flags. > Btw. Bruce just fixed that part in "ixgbe: fix check for split packets" >=20 >=20 Thanks for all these valuable comments, will keep the max burst size 32.