DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 4/6] rte_sched: allow reading without clearing
Date: Mon, 11 May 2015 14:53:48 +0200	[thread overview]
Message-ID: <2579875.fqTZsmi9Ai@xps13> (raw)
In-Reply-To: <1430327080-12642-5-git-send-email-stephen@networkplumber.org>

2015-04-29 10:04, Stephen Hemminger:
> The rte_sched statistics API should allow reading statistics without
> clearing. Make auto-clear optional.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  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 ‘subport_stat’:
examples/qos_sched/stats.c:263:9: error: too few arguments to function ‘rte_sched_subport_read_stats’
         rte_sched_subport_read_stats(port, subport_id, &stats, tc_ov);
         ^
examples/qos_sched/stats.c: In function ‘pipe_stat’:
examples/qos_sched/stats.c:309:25: error: too few arguments to function ‘rte_sched_queue_read_stats’
                         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 oversubscription 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,
> -	uint32_t subport_id,
> -	struct rte_sched_subport_stats *stats,
> -	uint32_t *tc_ov);
> +rte_sched_subport_read_stats(struct rte_sched_port *port, uint32_t subport_id,
> +			     struct rte_sched_subport_stats *stats,
> +			     uint32_t *tc_ov, int clear);
>  
>  /**
>   * Hierarchical scheduler queue statistics read
> @@ -329,14 +330,15 @@ rte_sched_subport_read_stats(struct rte_sched_port *port,
>   *   counters should be stored
>   * @param qlen
>   *   Pointer to pre-allocated variable where the current queue length 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,
> -	uint32_t queue_id,
> -	struct rte_sched_queue_stats *stats,
> -	uint16_t *qlen);
> +rte_sched_queue_read_stats(struct rte_sched_port *port, uint32_t queue_id,
> +			   struct rte_sched_queue_stats *stats,
> +			   uint16_t *qlen, int clear);
>  
>  /*
>   * Run-time
> 

What about ABI versioning? compatibility?

  reply	other threads:[~2015-05-11 12:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-29 17:04 [dpdk-dev] [PATCH 0/6] rte_sched: patches against 2.o Stephen Hemminger
2015-04-29 17:04 ` [dpdk-dev] [PATCH 1/6] rte_sched: make RED optional at runtime Stephen Hemminger
2015-04-29 17:04 ` [dpdk-dev] [PATCH 2/6] rte_sched: expand scheduler hierarchy for more VLAN's Stephen Hemminger
2015-05-11 12:46   ` Thomas Monjalon
2015-04-29 17:04 ` [dpdk-dev] [PATCH 3/6] rte_sched: keep track of RED drops Stephen Hemminger
2015-04-29 17:04 ` [dpdk-dev] [PATCH 4/6] rte_sched: allow reading without clearing Stephen Hemminger
2015-05-11 12:53   ` Thomas Monjalon [this message]
2015-04-29 17:04 ` [dpdk-dev] [PATCH 5/6] rte_sched: don't put tabs in log messages Stephen Hemminger
2015-04-29 17:04 ` [dpdk-dev] [PATCH 6/6] rte_sched: use correct log level Stephen Hemminger
2015-05-05 15:45 ` [dpdk-dev] [PATCH 0/6] rte_sched: patches against 2.o Dumitrescu, Cristian
2015-05-11 17:07 [dpdk-dev] [PATCH v3 0/6] rte_sched: cleanups and API changes Stephen Hemminger
2015-05-11 17:07 ` [dpdk-dev] [PATCH 4/6] rte_sched: allow reading without clearing Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2579875.fqTZsmi9Ai@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).