DPDK patches and discussions
 help / color / mirror / Atom feed
From: Suanming Mou <suanmingm@mellanox.com>
To: Shahaf Shuler <shahafs@mellanox.com>,
	Slava Ovsiienko <viacheslavo@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] [RFC] net/mlx5: add metering support
Date: Tue, 3 Sep 2019 07:18:38 +0000	[thread overview]
Message-ID: <b994cd03-02f6-cd50-120f-dcf0941e4485@mellanox.com> (raw)

The mlx5 PMD will support the rte_mtr APIs with type srTCM(IETF RFC 
2697) color blind mode.

The metering flow will be composed of three flow tables, the prefix 
table, the metering table and the suffix table.
         packet ----> prefix table ----> metering table ----> suffix table

The prefix table and suffix table divide the user defined flow actions 
as some of the actions only make sense after the metering and some need 
before the metering(mainly for the *_DECAP actions).
The metering table validates the packet should pass or not and can be 
updated independently once the metering policy updating comes.

The register with unique flow id for the packet will be used to match 
the prefix and suffix flow tables for one flow in case messing up with 
other flows sharing the same metering rule.
The color of the packet also uses register match but will be the 
different register.

For the prefix table, mainly two actions, reformat action set the unique 
flow id, metering action generate the color.
         packet ----> pattern match ----> user defined actions apply 
----> set unique id ----> set color ----> metering table

For the metering table, validate the color with the configured policy, 
send to the next table or dropped.
         packet ----> color match(drop not matched packet) ----> suffix 
table

For the suffix table, apply the left actions if the id matches the 
prefix table reformat action has been set.
         packet ----> id match ----> user defined actions apply

The APIs will be supported:
rte_mtr_capabilities_get
rte_mtr_meter_profile_add
rte_mtr_meter_profile_delete
rte_mtr_create
rte_mtr_destroy
rte_mtr_meter_disable
rte_mtr_meter_enable
rte_mtr_meter_profile_update
rte_mtr_stats_update
rte_mtr_stats_read

The APIs will not be supported:
rte_mtr_meter_dscp_table_update
rte_mtr_policer_actions_update


                 reply	other threads:[~2019-09-03  7:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=b994cd03-02f6-cd50-120f-dcf0941e4485@mellanox.com \
    --to=suanmingm@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=shahafs@mellanox.com \
    --cc=viacheslavo@mellanox.com \
    /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).