DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [RFC] Support metering policy for yellow color in mlx5 PMD
@ 2021-06-02 13:25 Bing Zhao
  2021-06-08 10:38 ` Dumitrescu, Cristian
  0 siblings, 1 reply; 2+ messages in thread
From: Bing Zhao @ 2021-06-02 13:25 UTC (permalink / raw)
  To: Matan Azrad, Slava Ovsiienko, Ori Kam, Li Zhang
  Cc: cristian.dumitrescu, NBU-Contact-Thomas Monjalon, Ferruh Yigit,
	andrew.rybchenko, dev

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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-08 10:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02 13:25 [dpdk-dev] [RFC] Support metering policy for yellow color in mlx5 PMD Bing Zhao
2021-06-08 10:38 ` Dumitrescu, Cristian

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).