From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by dpdk.org (Postfix) with ESMTP id B3687E72 for ; Thu, 9 Jul 2015 12:15:02 +0200 (CEST) Received: by wibdq8 with SMTP id dq8so237464521wib.1 for ; Thu, 09 Jul 2015 03:15:02 -0700 (PDT) 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=Kl6ENqEj8NNw2SXYtKRdfvfTO1p4wHueJWrE4qb5Mr4=; b=aZwuALCWuJ2Y5UB9o/MDm9W5FARzo7esTMgV9esbZYP+L6YWBb5YTk+ADMqUXhKKAW 3/2QtNT69tbzhFeYKP64CkL9bJK3UmO4te3EY+URWcVsqYeHcIiYc48Fmh6t1sh/4Fj8 8DB61u74pWlqtYha7cu8i4hN9wXUKv/wWPoYQAsyW2e7VvI738HbjSBAQu1th7okOXgI eUN1ig/qidYlEviIFPu5y3AODu+nUuJj5it4Qq/f1hLHYD9IHYHOAbmBggiOMJkJzVhc rOfOvwwyzsqimju4qzOiLGPBhAExAJvMK7Pr/muuqnheF0sW1Rs1n9PPhTVHJ7LYExWL Uaqw== X-Gm-Message-State: ALoCoQkm8fDzxW+2Ngm83TM2nEer/zEGHLY39q7YFQTD8d2D3HrsiG2rFQPtnbpfSYv7NTvOCAR7 X-Received: by 10.195.13.1 with SMTP id eu1mr29158241wjd.131.1436436902564; Thu, 09 Jul 2015 03:15:02 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id w8sm748073wja.15.2015.07.09.03.15.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jul 2015 03:15:01 -0700 (PDT) From: Thomas Monjalon To: "Kulasek, TomaszX" Date: Thu, 09 Jul 2015 12:13:56 +0200 Message-ID: <2174109.IecguKbUpa@xps13> Organization: 6WIND User-Agent: KMail/4.14.8 (Linux/4.0.4-2-ARCH; KDE/4.14.8; x86_64; ; ) In-Reply-To: <3042915272161B4EB253DA4D77EB373A019FD874@IRSMSX102.ger.corp.intel.com> References: <1434723200-7528-1-git-send-email-tomaszx.kulasek@intel.com> <12941587.YRQEe5TYyV@xps13> <3042915272161B4EB253DA4D77EB373A019FD874@IRSMSX102.ger.corp.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 v3 5/8] ring: queue stats mapping set dummy implementation 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: Thu, 09 Jul 2015 10:15:03 -0000 2015-07-09 09:55, Kulasek, TomaszX: > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > Sent: Thursday, July 9, 2015 03:58 > > To: Kulasek, TomaszX > > Cc: dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH v3 5/8] ring: queue stats mapping set dummy > > implementation > > > > 2015-06-29 16:50, Tomasz Kulasek: > > > Per queue statistics are already implemented for ring device, but with > > > static mapping (stat_idx == queue_id). > > > > > > This fix is required, if you want to use ring device in test > > > application and is used only to point that per queue statistics are > > > provided for this device. > > > > > > Signed-off-by: Tomasz Kulasek > > [...] > > > +static int > > > +eth_queue_stats_mapping_set(__rte_unused struct rte_eth_dev *dev, > > > + __rte_unused uint16_t queue_id, __rte_unused uint8_t stat_idx, > > > + __rte_unused uint8_t is_rx) > > > +{ > > > + /* Do nothing, just return ok */ > > > + return 0; > > > +} > > > > I've just realized how this is broken. > > Some Intel devices use a mapping to select hardware queues which will have > > some stats. But we may have stats per queues without requiring such > > mapping. > > > > I may miss something but I suggest these 3 actions: > > - remove this patch > > - replace checks on stats_mapping by an ethdev flag > > - remove device-specific stats_mapping from ethdev > > > For Niantic NICs all queues stats for port are mapped to stats_idx=0 by default, and stats mapping is required to have per-queue statistics (even in testpmd). > > Anyway, this patch, for ring pmd, was intended more as a cleanup than feature and was inspired by implementation in virtio driver: > > virtio_ethdev.c: > > /* > * It enables testpmd to collect per queue stats. > */ It should be removed in virtio. > static int > virtio_dev_queue_stats_mapping_set(__rte_unused struct rte_eth_dev *eth_dev, > __rte_unused uint16_t queue_id, __rte_unused uint8_t stat_idx, > __rte_unused uint8_t is_rx) > { > return 0; > } > > > This patch can be safely removed, if you think such a cleanup is not required, OK > or lack of this implementation should be common behavior for this case. > That will cause only few more warning messages, if you want to use ring pmd > as a slave in example application. > > Do you need v4? No, thank you