From: Bing Zhao <bingz@nvidia.com>
To: Matan Azrad <matan@nvidia.com>,
Slava Ovsiienko <viacheslavo@nvidia.com>,
Ori Kam <orika@nvidia.com>, Li Zhang <lizh@nvidia.com>
Cc: "cristian.dumitrescu@intel.com" <cristian.dumitrescu@intel.com>,
NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,
Ferruh Yigit <ferruh.yigit@intel.com>,
"andrew.rybchenko@oktetlabs.ru" <andrew.rybchenko@oktetlabs.ru>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] [RFC] Support metering policy for yellow color in mlx5 PMD
Date: Wed, 2 Jun 2021 13:25:22 +0000 [thread overview]
Message-ID: <CH0PR12MB5041A487299087F0FFA278CBD03D9@CH0PR12MB5041.namprd12.prod.outlook.com> (raw)
The current API of metering can support different policies for different
colors, as described in the header file "rte_mtr.h".
/**
* Meter policy
*/
struct rte_mtr_meter_policy_params {
/**
* Policy action list per color.
* actions[i] potentially represents a chain of rte_flow actions
* terminated by the END action, exactly as specified by the rte_flow
* API for the flow definition, and not just a single action.
*/
const struct rte_flow_action *actions[RTE_COLORS];
};
In the real-life, when doing QoS or traffic shaping with metering, there is no
restriction of the packets handling for different colors. After the metering,
the packet will be marked with different colors and it is the application's
responsibility to decide the next step of handling packets with different
colors. The policies of different colors can be either the same or different.
In the current implementation of mlx5 PMD, when adding a meter policy, only
the actions list for GREEN was supported, like RSS, queue, mark, etc., but no
support for YELLOW. The support of policy actions of YELLOW color is added to
provide better flexibility.
1. The actions to be supported are as same as those for GREEN, including
terminating and non-terminating actions.
2. The policies of GREEN and YELLOW colors are independent.
3. When RSS is used for both GREEN and YELLOW in one policy parameter,
except the queues list, all the other configurations of RSS should be
the same, like level, hash fields, and so on.
4. No change for the RED color is needed, and the default behavior should
still be the "drop".
The testpmd command line example is like below:
add port meter profile srtcm_rfc2697 0 24 65536 1024 0 0
add port meter policy 0 1 g_actions rss queues 0 end types udp end / end y_actions rss queues 1 end types udp end / end r_actions drop / end
create port meter 0 1 24 1 yes 0xffff 1 0
...
The actions list configuration for different colors in testpmd CLI was
already supported. There is no major change needed for the testpmd CLI.
Signed-off-by: Bing Zhao <bingz@nvidia.com>
next reply other threads:[~2021-06-02 13:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-02 13:25 Bing Zhao [this message]
2021-06-08 10:38 ` Dumitrescu, Cristian
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=CH0PR12MB5041A487299087F0FFA278CBD03D9@CH0PR12MB5041.namprd12.prod.outlook.com \
--to=bingz@nvidia.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=lizh@nvidia.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=thomas@monjalon.net \
--cc=viacheslavo@nvidia.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).