From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <cunming.liang@intel.com>
Received: from mga09.intel.com (mga09.intel.com [134.134.136.24])
 by dpdk.org (Postfix) with ESMTP id 17FBF7F89
 for <dev@dpdk.org>; Wed, 12 Nov 2014 07:23:49 +0100 (CET)
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by orsmga102.jf.intel.com with ESMTP; 11 Nov 2014 22:31:48 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.07,367,1413270000"; d="scan'208";a="635508321"
Received: from kmsmsx153.gar.corp.intel.com ([172.21.73.88])
 by orsmga002.jf.intel.com with ESMTP; 11 Nov 2014 22:33:41 -0800
Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by
 KMSMSX153.gar.corp.intel.com (172.21.73.88) with Microsoft SMTP Server (TLS)
 id 14.3.195.1; Wed, 12 Nov 2014 14:32:18 +0800
Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.136]) by
 SHSMSX152.ccr.corp.intel.com ([169.254.6.242]) with mapi id 14.03.0195.001;
 Wed, 12 Nov 2014 14:32:17 +0800
From: "Liang, Cunming" <cunming.liang@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Thread-Topic: [dpdk-dev] [PATCH v6 2/3] app/test: measure the cost of rx/tx
 routines by cycle number
Thread-Index: AQHP8YQ3WXgtdUuO6EOmDVTWmCRaDpxbpWKAgAD72DA=
Date: Wed, 12 Nov 2014 06:32:16 +0000
Message-ID: <D0158A423229094DA7ABF71CF2FA0DA31186C095@shsmsx102.ccr.corp.intel.com>
References: <1414130282-17981-1-git-send-email-cunming.liang@intel.com>
 <1414372809-14044-1-git-send-email-cunming.liang@intel.com>
 <1414372809-14044-3-git-send-email-cunming.liang@intel.com>
 <1427772.VCf4Ea8VoU@xps13>
In-Reply-To: <1427772.VCf4Ea8VoU@xps13>
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
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v6 2/3] app/test: measure the cost of rx/tx
 routines by cycle number
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>
X-List-Received-Date: Wed, 12 Nov 2014 06:23:50 -0000

Hi Thomas,

I've split the patch in v7 and also do cleanup by the new API.
Thanks.

-Liang Cunming

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Wednesday, November 12, 2014 7:29 AM
> To: Liang, Cunming
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v6 2/3] app/test: measure the cost of rx/t=
x
> routines by cycle number
>=20
> Hi Cunming,
>=20
> 2014-10-27 09:20, Cunming Liang:
> > --- a/lib/librte_ether/rte_ether.h
> > +++ b/lib/librte_ether/rte_ether.h
> > @@ -45,6 +45,7 @@ extern "C" {
> >  #endif
> >
> >  #include <stdint.h>
> > +#include <stdio.h>
> >
> >  #include <rte_memcpy.h>
> >  #include <rte_random.h>
> > @@ -266,6 +267,30 @@ static inline void ether_addr_copy(const struct
> ether_addr *ea_from,
> >  #endif
> >  }
> >
> > +#define ETHER_ADDR_FMT_SIZE         18
> > +/**
> > + * Format 48bits Ethernet address in pattern xx:xx:xx:xx:xx:xx.
> > + *
> > + * @param buf
> > + *   A pointer to buffer contains the formatted MAC address.
> > + * @param size
> > + *   The format buffer size.
> > + * @param ea_to
> > + *   A pointer to a ether_addr structure.
> > + */
> > +static inline void
> > +ether_format_addr(char *buf, uint16_t size,
> > +		  const struct ether_addr *eth_addr)
> > +{
> > +	snprintf(buf, size, "%02X:%02X:%02X:%02X:%02X:%02X",
> > +		 eth_addr->addr_bytes[0],
> > +		 eth_addr->addr_bytes[1],
> > +		 eth_addr->addr_bytes[2],
> > +		 eth_addr->addr_bytes[3],
> > +		 eth_addr->addr_bytes[4],
> > +		 eth_addr->addr_bytes[5]);
> > +}
>=20
> Please, could you do a separate patch for this new API?
> Could it be used in some apps or PMDs? It would be a nice cleanup.
>=20
> > --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
> > +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
> > @@ -1600,6 +1600,9 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
> >
> >  	ixgbe_dev_clear_queues(dev);
> >
> > +	/* Clear stored conf */
> > +	dev->data->scattered_rx =3D 0;
> > +
> >  	/* Clear recorded link status */
> >  	memset(&link, 0, sizeof(link));
> >  	rte_ixgbe_dev_atomic_write_link_status(dev, &link);
> > @@ -2888,6 +2891,9 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
> >  	  */
> >  	ixgbevf_set_vfta_all(dev,0);
> >
> > +	/* Clear stored conf */
> > +	dev->data->scattered_rx =3D 0;
> > +
> >  	ixgbe_dev_clear_queues(dev);
> >  }
>=20
> Please, this patch needs a separate patch with a clear explanation in the=
 log.
>=20
> Thanks
> --
> Thomas