From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by dpdk.org (Postfix) with ESMTP id 0EFB9C408 for ; Mon, 11 May 2015 14:54:30 +0200 (CEST) Received: by wiun10 with SMTP id n10so95157000wiu.1 for ; Mon, 11 May 2015 05:54:29 -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=ZPBm0qo1T+trtQrIRXkY99w8R1m27jPLpq1NEZxb6eA=; b=Zg9Al5Y5A5xQdrf8/S9kV/0oYnwOM5DtfliWoHtJT8cqx58DpnF+Hj6FWBYtiPXaqe zEwFtxeG6O8iZY/AGjCmP6r6foOQZmUSY9+kKnqQKFkhjvqzoRetYetGPqmrBaCI3EM1 ZuEXpnB89C+03BGaQy5mhn84uXxCdAjI96R6Uk25Gvt9w7zr2MEOOEzgBUWayP+luyns Q3XmJLvvNzpMv66bAvsiD9ZYWy2egumAWx051oeYcJnLB2VBO2c6aQdvF6/7ArJmmPJW Mp7dE7Fyl0so9RgjtClf+EV+R4PasVFsp396hu6JaEAH56RE8XtN8oK+P65HxV+5ua5g wkDg== X-Gm-Message-State: ALoCoQk0zuPM65+AbW2LTnFMIcipCtt0zTQuF5dTkOZHKLAPNwYs9q5pgW2gMNT4qgZAuEwynrLJ X-Received: by 10.180.19.100 with SMTP id d4mr19298768wie.29.1431348869898; Mon, 11 May 2015 05:54:29 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id r9sm22725916wjo.26.2015.05.11.05.54.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 May 2015 05:54:29 -0700 (PDT) From: Thomas Monjalon To: Stephen Hemminger Date: Mon, 11 May 2015 14:53:48 +0200 Message-ID: <2579875.fqTZsmi9Ai@xps13> Organization: 6WIND User-Agent: KMail/4.14.7 (Linux/4.0.1-1-ARCH; KDE/4.14.7; x86_64; ; ) In-Reply-To: <1430327080-12642-5-git-send-email-stephen@networkplumber.org> References: <1430327080-12642-1-git-send-email-stephen@networkplumber.org> <1430327080-12642-5-git-send-email-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 4/6] rte_sched: allow reading without clearing 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, 11 May 2015 12:54:30 -0000 2015-04-29 10:04, Stephen Hemminger: > The rte_sched statistics API should allow reading statistics without > clearing. Make auto-clear optional. >=20 > Signed-off-by: Stephen Hemminger > --- > app/test/test_sched.c | 4 ++-- > examples/qos_sched/stats.c | 16 +++++++++++----- > lib/librte_sched/rte_sched.c | 44 ++++++++++++++++++++++------------= ---------- > lib/librte_sched/rte_sched.h | 18 ++++++++++-------- [...] This API change needs more adjustments in the example app: examples/qos_sched/stats.c: In function =E2=80=98subport_stat=E2=80=99:= examples/qos_sched/stats.c:263:9: error: too few arguments to function = =E2=80=98rte_sched_subport_read_stats=E2=80=99 rte_sched_subport_read_stats(port, subport_id, &stats, tc_ov);= ^ examples/qos_sched/stats.c: In function =E2=80=98pipe_stat=E2=80=99: examples/qos_sched/stats.c:309:25: error: too few arguments to function= =E2=80=98rte_sched_queue_read_stats=E2=80=99 rte_sched_queue_read_stats(port, queue_id + (i= * RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS + j), &stats, &qlen); ^ [...] > --- a/lib/librte_sched/rte_sched.h > +++ b/lib/librte_sched/rte_sched.h > @@ -308,14 +308,15 @@ rte_sched_port_get_memory_footprint(struct rte_= sched_port_params *params); > * @param tc_ov > * Pointer to pre-allocated 4-entry array where the oversubscripti= on status for > * each of the 4 subport traffic classes should be stored. > + * @parm clear > + * Reset statistics after read > * @return > * 0 upon success, error code otherwise > */ > int > -rte_sched_subport_read_stats(struct rte_sched_port *port, > -=09uint32_t subport_id, > -=09struct rte_sched_subport_stats *stats, > -=09uint32_t *tc_ov); > +rte_sched_subport_read_stats(struct rte_sched_port *port, uint32_t s= ubport_id, > +=09=09=09 struct rte_sched_subport_stats *stats, > +=09=09=09 uint32_t *tc_ov, int clear); > =20 > /** > * Hierarchical scheduler queue statistics read > @@ -329,14 +330,15 @@ rte_sched_subport_read_stats(struct rte_sched_p= ort *port, > * counters should be stored > * @param qlen > * Pointer to pre-allocated variable where the current queue lengt= h should be stored. > + * @parm clear > + * Reset statistics after read > * @return > * 0 upon success, error code otherwise > */ > int > -rte_sched_queue_read_stats(struct rte_sched_port *port, > -=09uint32_t queue_id, > -=09struct rte_sched_queue_stats *stats, > -=09uint16_t *qlen); > +rte_sched_queue_read_stats(struct rte_sched_port *port, uint32_t que= ue_id, > +=09=09=09 struct rte_sched_queue_stats *stats, > +=09=09=09 uint16_t *qlen, int clear); > =20 > /* > * Run-time >=20 What about ABI versioning? compatibility?