From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id A102D2BAA for ; Fri, 24 Feb 2017 10:48:15 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP; 24 Feb 2017 01:48:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,200,1484035200"; d="scan'208";a="827984333" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 24 Feb 2017 01:48:14 -0800 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 24 Feb 2017 01:48:14 -0800 Received: from bgsmsx154.gar.corp.intel.com (10.224.48.47) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 24 Feb 2017 01:48:14 -0800 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.43]) by BGSMSX154.gar.corp.intel.com ([169.254.7.110]) with mapi id 14.03.0248.002; Fri, 24 Feb 2017 15:18:11 +0530 From: "Yang, Zhiyong" To: "Richardson, Bruce" CC: "dev@dpdk.org" , "Chen, Jing D" , "Zhang, Helin" , "Wu, Jingjing" Thread-Topic: [dpdk-dev] [PATCH 1/5] net/fm10k: remove limit of fm10k_xmit_pkts_vec burst size Thread-Index: AQHSjnrawoD9WmODPU2aVjadJG+rTaF3iMwAgAAA/oCAAF7GcA== Date: Fri, 24 Feb 2017 09:48:09 +0000 Message-ID: References: <1487926101-4637-1-git-send-email-zhiyong.yang@intel.com> <1487926101-4637-2-git-send-email-zhiyong.yang@intel.com> <20170224093256.GA87688@bricha3-MOBL3.ger.corp.intel.com> <20170224093629.GB87688@bricha3-MOBL3.ger.corp.intel.com> In-Reply-To: <20170224093629.GB87688@bricha3-MOBL3.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWFjYmUwNzQtMTZmZS00NmRhLTk2NDQtZTRhYmEwMTQzYTRmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlwvNklBeUJcL0QrK2hsZnFsc2lia2w0M3F2VWJpaVwvcVRGUmpONFU1ZkkwVjA9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/5] net/fm10k: remove limit of fm10k_xmit_pkts_vec burst size X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2017 09:48:16 -0000 Hi, Bruce: > -----Original Message----- > From: Richardson, Bruce > Sent: Friday, February 24, 2017 5:36 PM > To: Yang, Zhiyong > Cc: dev@dpdk.org; Chen, Jing D > Subject: Re: [dpdk-dev] [PATCH 1/5] net/fm10k: remove limit of > fm10k_xmit_pkts_vec burst size >=20 > On Fri, Feb 24, 2017 at 09:32:56AM +0000, Bruce Richardson wrote: > > On Fri, Feb 24, 2017 at 04:48:17PM +0800, Zhiyong Yang wrote: > > > To add a wrapper function fm10k_xmit_pkts_vec_simple to remove the > > > limit of tx burst size. The patch makes fm10k vec function an best > > > effort to transmit the pkts in the consistent behavior like > > > fm10k_xmit_pkts does that. > > > > > > Cc: Jing Chen > > > > > > Signed-off-by: Zhiyong Yang > > > --- > > > drivers/net/fm10k/fm10k_ethdev.c | 27 > ++++++++++++++++++++++++++- > > > 1 file changed, 26 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/net/fm10k/fm10k_ethdev.c > > > b/drivers/net/fm10k/fm10k_ethdev.c > > > index c4fe746..e9b6254 100644 > > > --- a/drivers/net/fm10k/fm10k_ethdev.c > > > +++ b/drivers/net/fm10k/fm10k_ethdev.c > > > @@ -2741,6 +2741,31 @@ fm10k_check_ftag(struct rte_devargs > *devargs) > > > return 1; > > > } > > > > > > +static uint16_t > > > +fm10k_xmit_pkts_vec_simple(void *tx_queue, struct rte_mbuf > **tx_pkts, > > > + uint16_t nb_pkts) > > > +{ > > > + uint16_t nb_tx =3D 0; > > > + struct fm10k_tx_queue *txq =3D (struct fm10k_tx_queue *)tx_queue; > > > + > > > + if (likely(nb_pkts <=3D txq->rs_thresh)) > > > + return fm10k_xmit_pkts_vec(tx_queue, tx_pkts, nb_pkts); > > > + > > > + /* transmit in chunks of at least txq->rs_thresh */ > > > + while (nb_pkts) { > > > + uint16_t ret, num; > > > + > > > + num =3D (uint16_t)RTE_MIN(nb_pkts, txq->rs_thresh); > > > + ret =3D fm10k_xmit_pkts_vec(tx_queue, &tx_pkts[nb_tx], > num); > > > + nb_tx +=3D ret; > > > + nb_pkts -=3D ret; > > > + if (ret < num) > > > + break; > > > + } > > > + > > > + return nb_tx; > > > +} > > > + > > > static void __attribute__((cold)) > > > fm10k_set_tx_function(struct rte_eth_dev *dev) { @@ -2766,7 > > > +2791,7 @@ fm10k_set_tx_function(struct rte_eth_dev *dev) > > > txq =3D dev->data->tx_queues[i]; > > > fm10k_txq_vec_setup(txq); > > > } > > > - dev->tx_pkt_burst =3D fm10k_xmit_pkts_vec; > > > + dev->tx_pkt_burst =3D fm10k_xmit_pkts_vec_simple; > > > dev->tx_pkt_prepare =3D NULL; > > > } else { > > > > The names of the functions do not look right to me. I don't think the > > suffic "_simple" is suitable for describing the functionality of the > > wrapper function vs the original function. I think instead that the > > original function should be renamed to indicate that it is only > > handles a fixed size burst of pkts, and the new wrapper function takes > > the original name. For example: > > > > fm10k_xmit_fixed_burst_vec (original fn) > > fm10k_xmit_pkts_vec (new fn) > > > This comment applies for the other patches in the set too. I use the suffix "_simple" only because I see the similar wrapper function i40e_xmit_pkts_simple, Your suggestion looks better obviously. Thanks Zhiyong >=20 > /Bruce