From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by dpdk.org (Postfix) with ESMTP id CA6CB7E75 for ; Wed, 12 Nov 2014 00:19:23 +0100 (CET) Received: by mail-wi0-f181.google.com with SMTP id n3so3199253wiv.8 for ; Tue, 11 Nov 2014 15:29:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=QEpVi1jip/mMVeTN2gUklwfa/ANmlm49hATOWdw5zdo=; b=Tm/IHtH+GQWeoPjuzqzrGElqa4oEW17hcd5SIME9HD+gW/Sj4djb/ackgcum7Q2aMp V61pRpBKl7mxZhMRBhh2hvsXiqsMoQ5Ml/333noJIGu16+fWDrMSzhlxNJqyUQBeym+j 6wzTtIYxtF+1blaNHW3CJZ1NotIQh/3HsHQGAlouqYxXrql12VQhzNo68UroycW1vKN+ +TAoXg+Kb71F4QgKAOjKhTDlRmc7VJCz795vGRdmHxbvhbKkJXV5Ymh1+1Xuf4lCe0hg Is6UsY7cu0elGCVGYBKTR4Omgxj5wG4qsWdpXzyrCLlzrMEH1teYOgqcjLiNBxKD+q2F HeSQ== X-Gm-Message-State: ALoCoQlxCz9hRFeH+iO9XJoyGRfLUXOSujQNxJLSggY0F3PnSIPhITyxdOgiYFSsRzwaU0EiJuOK X-Received: by 10.180.212.52 with SMTP id nh20mr33786564wic.2.1415748555491; Tue, 11 Nov 2014 15:29:15 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id hh14sm19349505wib.13.2014.11.11.15.29.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Nov 2014 15:29:14 -0800 (PST) From: Thomas Monjalon To: Cunming Liang Date: Wed, 12 Nov 2014 00:28:57 +0100 Message-ID: <1427772.VCf4Ea8VoU@xps13> Organization: 6WIND User-Agent: KMail/4.14.2 (Linux/3.17.2-1-ARCH; KDE/4.14.2; x86_64; ; ) In-Reply-To: <1414372809-14044-3-git-send-email-cunming.liang@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> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2014 23:19:24 -0000 Hi Cunming, 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 > +#include > > #include > #include > @@ -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]); > +} 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. > --- 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 = 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 = 0; > + > ixgbe_dev_clear_queues(dev); > } Please, this patch needs a separate patch with a clear explanation in the log. Thanks -- Thomas